conf.py 4.14 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",
aknecht2's avatar
aknecht2 committed
39
40
    "ccat",
    "music"
41
42
]

43
44
45
46
executables = [
    "bedtools",
    "samtools",
    "idr",
47
48
49
50
51
52
53
    "picard",
    "bwa",
    "bowtie2",
    "macs2",
    "gem",
    "peakranger",
    "MUSIC",
54
    "CCAT",
55
56
57
58
59
60
61
62
63
64
65
    "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",
    "chip-job-zcat-peak"
66
]
67

68
69
70
71
72
73
# Peak_type validation
peak_types = {
    "spp": ["narrow", "broad"],
    "macs2": ["narrow", "broad"],
    "gem": ["narrow"],
    "peakranger": ["narrow"],
aknecht2's avatar
aknecht2 committed
74
75
    "ccat": ["broad"],
    "music": ["narrow", "punctate", "broad"]
76
77
}

78
79
# File extensions
file_extensions = {
80
    "genome_index": ["fa", "fna"],
81
    "fastq": ["fastq", "fastq.gz"],
82
    "sai": ["sai"],
83
84
    "sam": ["sam"],
    "bam": ["bam"],
85
    "bed": ["bed", "peak", "region", "narrowPeak", "broadPeak", "tagAlign", "narrowPeak.gz", "broadPeak.gz"],
aknecht2's avatar
aknecht2 committed
86
    "bin": ["bin"],
87
    "bwa_genome": ["amb", "ann", "bwt", "pac", "sa"],
88
    "bowtie2_genome": ["1.bt2", "2.bt2", "3.bt2", "4.bt2", "rev.1.bt2", "rev.2.bt2"],
aknecht2's avatar
aknecht2 committed
89
    "quality": ["quality"],
90
91
    "qc": ["qc"],
    "pdf": ["pdf"],
92
    "ccscore": ["ccscore"],
93
94
    "xls": ["xls"],
    "yaml": ["yaml"],
Adam Caprez's avatar
Adam Caprez committed
95
    "result": ["bed", "narrowPeak", "broadPeak", "tagAlign", "bam"],
96
    "txt": ["txt"],
97
    "chrom_sizes": ["sizes"],
98
    "read_dist" : ["txt"],
99
100
101
    "plaintext": ["txt", "md"],
    "ccat_conf": ["txt", "conf"],
    "log": ["log"]
102
}
aknecht2's avatar
aknecht2 committed
103
file_extensions["any"] = list(string.ascii_lowercase)
104

Adam Caprez's avatar
Adam Caprez committed
105
106
# list of resources that can be specified per job (step) in
# the workflow and corresponding Pegasus profile info
107
108
109
110
111
112
113
114
resources = {
    "walltime": {
        "namespace": "globus",
        "key": "maxwalltime"
    },
    "memory": {
        "namespace": "condor",
        "key": "request_memory"
115
116
    },
    "cores": {
aknecht2's avatar
aknecht2 committed
117
        "namespace": "pegasus",
118
        "key": "cores"
119
120
121
122
    },
    "nodes": {
        "namespace": "pegasus",
        "key": "nodes"
123
    }
Adam Caprez's avatar
Adam Caprez committed
124
125
}

126
127
# Defines the types of input / output arguments
# argument -> Any non file argument
128
129
#   string -> Any string argument
#   numeric -> Numeric arguments.
130
# file -> Any file argument that isn't redirected
131
132
133
#   file -> Normal file arguments.
#   stdout -> Any file argument that is redirected from stdout
#   stderr -> Any file argument that is redirected from stderr
134
135
# list -> For variable argument inputs
#   list -> Currently a list of files.
136
argument_types = {
137
    "argument": ["string", "numeric"],
138
    "file": ["file", "rawfile", "stdout", "stderr"],
aknecht2's avatar
aknecht2 committed
139
140
    "list": ["list"],
    "folder": ["folder", "rawfolder"]
141
142
143
144
}

# Defines information about arguments
argument_keys = {
145
146
    "required": ["type", "changeable", "has_value", "required"],
    "optional": ["default", "path"]
147
148
149
150
}

# workflow_job keys
job_keys = {
151
    "required": ["inputs", "outputs", "command", "arguments"] + resources.keys(),
152
    "optional": []
153
}
154

155
156
157
158
159
job_inout_keys = {
    "required": ["type"],
    "optional": ["file_type"]
}

160
161
# param keys
param_keys = {
162
163
    "required": [],
    "optional": ["arguments"] + resources.keys()
164
165
166
167
}

# workflow order
workflow = ["align", "remove_duplicates", "peak_calling"]
168
169
170
171
172
173
174
175
176
177
178
179

# 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"]
    }
}
180
181
182
183
184
185
186
187
188

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