-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipeline_config.py
57 lines (48 loc) · 1.24 KB
/
pipeline_config.py
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
from moduleultra.pipeline_config_utils import *
from packagemega import Repo as PMRepo
from packagemega.mini_language import processOperand
from sys import stderr
pipeDir = fromPipelineDir('')
pmrepo = PMRepo.loadRepo()
def scriptDir(fpath):
dname = pipeDir + '/scripts/'
return dname + fpath
def pmegaDB(operand):
try:
res = processOperand(pmrepo, operand, stringify=True)
except KeyError:
stderr.write('[packagemega] {} not found.\n'.format(operand))
res = ''
return res
def which(tool):
cmd = 'which {}'.format(tool)
return resolveCmd(cmd)
config = {
'bt2': {
'exc': {
'filepath': which('bowtie2'),
'version': resolveCmd('bowtie2 --version')
}
},
'filter_human_dna': {
'db': {
'filepath': pmegaDB('hg38_ucsc.bt2.prefix')
},
'threads': 6,
'time': 10,
'ram': 10
},
'samtools': {
'filepath': which('samtools')
},
'python2': which('python2'),
'adapter_removal': {
'time': 5,
'threads': 6,
'ram': 10,
'exc': {
'filepath': which('AdapterRemoval'),
'version': resolveCmd('AdapterRemoval --version 2>&1')
}
}
}