conf.py 4.49 KB
Newer Older
aknecht2's avatar
aknecht2 committed
1
2
import string

3
4
5
6
7
8
# Module directory
job_modules = "jobs/modules/"

# Job params directory
job_params = "jobs/params/"

9
10
11
# Job wrappers directory
job_wrappers = "jobs/wrappers/"

12
13
14
# Job scripts directory
job_scripts = "jobs/scripts/"

15
16
17
18
19
20
21
22
23
24
25
26
# SYSTEM PATH, probably /bin
system_path = "/bin/"

# System commands mv, cp, sort, zcat, awk e.t.c
system_commands = [
    "mv",
    "cp",
    "sort",
    "zcat",
    "awk"
]

27
28
29
30
31
32
# Current align tools
align_tools = [
    "bwa",
    "bowtie2"
]

33
# Current peak calling tools
34
35
peak_tools = [
    "spp",
36
    "macs2",
37
    "gem",
38
    "peakranger",
39
    "ccat",
40
    "music",
41
42
43
    "zerone",
    "hiddendomains",
    "pepr"
44
45
]

46
47
48
49
executables = [
    "bedtools",
    "samtools",
    "idr",
50
51
52
53
54
55
56
    "picard",
    "bwa",
    "bowtie2",
    "macs2",
    "gem",
    "peakranger",
    "MUSIC",
57
    "CCAT",
58
59
60
    "PePr",
    "hiddenDomains",
    "zerone",
61
62
63
64
65
66
67
68
69
70
    "run_spp_nodups",
    "chip-job-cat-peak",
    "chip-job-ccat-format-bed",
    "chip-job-chr-convert",
    "chip-job-save-result",
    "chip-job-download-encode",
    "chip-job-download-gridfs",
    "chip-job-music",
    "chip-job-peakranger-format",
    "chip-job-sort-peak",
71
    "chip-job-zcat-peak",
72
73
    "chip-job-zerone-format",
    "chip-job-hd-format"
74
]
75

76
77
78
79
80
# Java needs to have -Xmx specified...
java_tools = [
    "gem"
]

81
82
83
84
85
86
# Peak_type validation
peak_types = {
    "spp": ["narrow", "broad"],
    "macs2": ["narrow", "broad"],
    "gem": ["narrow"],
    "peakranger": ["narrow"],
87
    "ccat": ["broad"],
88
    "music": ["narrow", "punctate", "broad"],
89
90
    "zerone": ["broad"],
    "hiddendomains": ["broad"],
aknecht2's avatar
aknecht2 committed
91
    "pepr": ["broad", "sharp"],
92
93
}

94
95
# File extensions
file_extensions = {
96
    "genome_index": ["fa", "fna"],
97
    "fastq": ["fastq", "fastq.gz"],
98
    "sai": ["sai"],
99
100
    "sam": ["sam"],
    "bam": ["bam"],
101
    "bed": ["bed", "peak", "region", "narrowPeak", "broadPeak", "tagAlign", "narrowPeak.gz", "broadPeak.gz"],
aknecht2's avatar
aknecht2 committed
102
    "bin": ["bin"],
103
    "bwa_genome": ["amb", "ann", "bwt", "pac", "sa"],
104
    "bowtie2_genome": ["1.bt2", "2.bt2", "3.bt2", "4.bt2", "rev.1.bt2", "rev.2.bt2"],
aknecht2's avatar
aknecht2 committed
105
    "quality": ["quality"],
106
107
    "qc": ["qc"],
    "pdf": ["pdf"],
108
    "ccscore": ["ccscore"],
109
110
    "xls": ["xls"],
    "yaml": ["yaml"],
Adam Caprez's avatar
Adam Caprez committed
111
    "result": ["bed", "narrowPeak", "broadPeak", "tagAlign", "bam"],
112
    "txt": ["txt"],
113
    "chrom_sizes": ["sizes"],
114
    "read_dist" : ["txt"],
115
116
117
    "plaintext": ["txt", "md"],
    "ccat_conf": ["txt", "conf"],
    "log": ["log"]
118
}
aknecht2's avatar
aknecht2 committed
119
file_extensions["any"] = list(string.ascii_lowercase)
120

Adam Caprez's avatar
Adam Caprez committed
121
122
# list of resources that can be specified per job (step) in
# the workflow and corresponding Pegasus profile info
123
124
125
126
127
128
129
130
resources = {
    "walltime": {
        "namespace": "globus",
        "key": "maxwalltime"
    },
    "memory": {
        "namespace": "condor",
        "key": "request_memory"
131
132
    },
    "cores": {
aknecht2's avatar
aknecht2 committed
133
        "namespace": "pegasus",
134
        "key": "cores"
135
136
137
138
    },
    "nodes": {
        "namespace": "pegasus",
        "key": "nodes"
139
    }
Adam Caprez's avatar
Adam Caprez committed
140
141
}

142
143
# Defines the types of input / output arguments
# argument -> Any non file argument
144
145
#   string -> Any string argument
#   numeric -> Numeric arguments.
146
# file -> Any file argument that isn't redirected
147
148
149
#   file -> Normal file arguments.
#   stdout -> Any file argument that is redirected from stdout
#   stderr -> Any file argument that is redirected from stderr
150
151
# list -> For variable argument inputs
#   list -> Currently a list of files.
152
argument_types = {
153
    "argument": ["string", "numeric"],
154
    "file": ["file", "rawfile", "stdout", "stderr"],
155
    "list": ["file_list", "argument_list"],
aknecht2's avatar
aknecht2 committed
156
    "folder": ["folder", "rawfolder"]
157
158
159
160
161
}

# Defines information about arguments
argument_keys = {
    "required": ["type", "changeable", "has_value"],
162
    "optional": ["required", "default", "file_type", "path", "separator"]
163
164
165
166
}

# workflow_job keys
job_keys = {
167
    "required": ["inputs", "outputs", "command", "arguments"] + resources.keys(),
168
    "optional": []
169
}
170

171
172
173
174
175
job_inout_keys = {
    "required": ["type"],
    "optional": ["file_type"]
}

176
177
# param keys
param_keys = {
178
179
    "required": [],
    "optional": ["arguments"] + resources.keys()
180
181
182
183
}

# workflow order
workflow = ["align", "remove_duplicates", "peak_calling"]
184
185
186
187
188
189
190
191
192
193
194
195

# genome info
genomes = {
    "bwa": {
        "base_file": file_extensions["genome_index"],
        "additional_files": file_extensions["bwa_genome"]
    },
    "bowtie2": {
        "base_file": file_extensions["genome_index"],
        "additional_files": file_extensions["bowtie2_genome"]
    }
}
196
197
198
199
200
201
202
203
204

config_file = {
    "required_keys": [
        "chipathlon_bin", "idr_bin", "pegasus_home", "email"
    ],
    "optional_keys": [
        "arch", "os"
    ]
}