File: settings.py

package info (click to toggle)
python-pybedtools 0.8.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 16,140 kB
  • sloc: python: 9,589; cpp: 899; makefile: 149; sh: 116
file content (91 lines) | stat: -rw-r--r-- 2,233 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
_bedtools_path = ""
_R_path = ""

tempfile_prefix = 'pybedtools.'
tempfile_suffix = '.tmp'

# Checking for BEDTools will happen when creating the first BedTool; other
# checks happen at first use (BAM object creation; tabix-ing a BedTool)
_bedtools_installed = False
_R_installed = False
_v_2_15_plus = False
_v_2_27_plus = False
bedtools_version = []

KEEP_TEMPFILES = False
_DEBUG = True

# Check calls against these names to only allow calls to known BEDTools
# programs (basic security)
#
_prog_names = {

    # Genome arithmetic
    'intersectBed': 'intersect',
    'windowBed': 'window',
    'closestBed': 'closest',
    'coverageBed': 'coverage',
    'mapBed': 'map',
    'genomeCoverageBed': 'genomecov',
    'mergeBed': 'merge',
    'clusterBed': 'cluster',
    'complementBed': 'complement',
    'subtractBed': 'subtract',
    'slopBed': 'slop',
    'shiftBed': 'shift',
    'flankBed': 'flank',
    'sortBed': 'sort',
    'randomBed': 'random',
    'shuffleBed': 'shuffle',
    'annotateBed': 'annotate',
    'spacing': 'spacing',

    # multi-way
    'multiIntersectBed': 'multiinter',
    'unionBedGraphs': 'unionbedg',

    # PE
    'pairToBed': 'pairtobed',
    'pairToPair': 'pairtopair',

    # format conversion
    'bamToBed': 'bamtobed',
    'bedToBam': 'bedtobam',
    'bedpeToBam': 'bedpetobam',
    'bed12ToBed6': 'bed12tobed6',
    'bamToFastq': 'bamtofastq',

    # fasta
    'fastaFromBed': 'getfasta',
    'maskFastaFromBed': 'maskfasta',
    'nucBed': 'nuc',

    # bam-centric
    'multiBamCov': 'multicov',
    'tagBam': 'tag',

    # stats
    'jaccard': 'jaccard',
    'reldist': 'reldist',

    # misc
    'getOverlap': 'overlap',
    'bedToIgv': 'igv',
    'linksBed': 'links',
    'windowMaker': 'makewindows',
    'groupBy': 'groupby',
    'expandCols': 'expand',
    'sample': 'sample',
    'fisher': 'fisher',

    'split': 'split',
}

_old_names = list(_prog_names.keys())
_new_names = list(_prog_names.values())

_column_names = {
    'bed': ['chrom', 'start', 'end', 'name', 'score', 'strand', 'thickStart',
            'thickEnd', 'itemRgb', 'blockCount', 'blockSizes', 'blockStarts'],
    'gff': ['seqname', 'source', 'feature', 'start', 'end', 'score', 'strand', 'frame', 'attributes'],
}