conf.py 3.68 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
47
48
49
50
executables = [
    "bedtools",
    "bamtools",
    "samtools",
    "idr",
    "picard"
] + align_tools + peak_tools

51
52
53
54
55
56
# Peak_type validation
peak_types = {
    "spp": ["narrow", "broad"],
    "macs2": ["narrow", "broad"],
    "gem": ["narrow"],
    "peakranger": ["narrow"],
aknecht2's avatar
aknecht2 committed
57
58
    "ccat": ["broad"],
    "music": ["narrow", "punctate", "broad"]
59
60
}

61
62
# File extensions
file_extensions = {
63
    "genome_index": ["fa", "fna"],
64
    "fastq": ["fastq", "fastq.gz"],
65
    "sai": ["sai"],
66
67
    "sam": ["sam"],
    "bam": ["bam"],
68
    "bed": ["bed", "peak", "region", "narrowPeak", "broadPeak", "tagAlign", "narrowPeak.gz", "broadPeak.gz"],
aknecht2's avatar
aknecht2 committed
69
    "bin": ["bin"],
70
    "bwa_genome": ["amb", "ann", "bwt", "pac", "sa"],
71
    "bowtie2_genome": ["1.bt2", "2.bt2", "3.bt2", "4.bt2", "rev.1.bt2", "rev.2.bt2"],
aknecht2's avatar
aknecht2 committed
72
    "quality": ["quality"],
73
74
    "qc": ["qc"],
    "pdf": ["pdf"],
75
    "ccscore": ["ccscore"],
76
77
    "xls": ["xls"],
    "yaml": ["yaml"],
Adam Caprez's avatar
Adam Caprez committed
78
    "result": ["bed", "narrowPeak", "broadPeak", "tagAlign", "bam"],
79
    "txt": ["txt"],
80
    "chrom_sizes": ["sizes"],
81
    "read_dist" : ["txt"],
82
83
84
    "plaintext": ["txt", "md"],
    "ccat_conf": ["txt", "conf"],
    "log": ["log"]
85
}
aknecht2's avatar
aknecht2 committed
86
file_extensions["any"] = list(string.ascii_lowercase)
87

Adam Caprez's avatar
Adam Caprez committed
88
89
# list of resources that can be specified per job (step) in
# the workflow and corresponding Pegasus profile info
90
91
92
93
94
95
96
97
resources = {
    "walltime": {
        "namespace": "globus",
        "key": "maxwalltime"
    },
    "memory": {
        "namespace": "condor",
        "key": "request_memory"
98
99
    },
    "cores": {
aknecht2's avatar
aknecht2 committed
100
        "namespace": "pegasus",
101
        "key": "cores"
102
103
104
105
    },
    "nodes": {
        "namespace": "pegasus",
        "key": "nodes"
106
    }
Adam Caprez's avatar
Adam Caprez committed
107
108
}

109
110
# Defines the types of input / output arguments
# argument -> Any non file argument
111
112
#   string -> Any string argument
#   numeric -> Numeric arguments.
113
# file -> Any file argument that isn't redirected
114
115
116
#   file -> Normal file arguments.
#   stdout -> Any file argument that is redirected from stdout
#   stderr -> Any file argument that is redirected from stderr
117
118
# list -> For variable argument inputs
#   list -> Currently a list of files.
119
argument_types = {
120
    "argument": ["string", "numeric"],
121
    "file": ["file", "rawfile", "stdout", "stderr"],
aknecht2's avatar
aknecht2 committed
122
123
    "list": ["list"],
    "folder": ["folder", "rawfolder"]
124
125
126
127
128
}

# Defines information about arguments
argument_keys = {
    "required": ["type", "changeable", "has_value"],
129
    "optional": ["required", "default", "file_type", "path"]
130
131
132
133
134
135
}

# workflow_job keys
job_keys = {
    "required": ["inputs", "additional_inputs", "outputs", "command", "arguments"] + resources.keys(),
    "optional": []
136
}
137

138
139
# param keys
param_keys = {
140
141
    "required": [],
    "optional": ["arguments"] + resources.keys()
142
143
}

144
145
146
147
148
file_list_keys = {
    "required": ["name", "type"],
    "optional": ["file_type"]
}

149
150
# workflow order
workflow = ["align", "remove_duplicates", "peak_calling"]
151
152
153
154
155
156
157
158
159
160
161
162

# 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"]
    }
}