-
Notifications
You must be signed in to change notification settings - Fork 18
/
ssaha.jx
57 lines (53 loc) · 1.31 KB
/
ssaha.jx
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
{
"define":
{
"QUERY":"query.fastq",
"DB":"db.fastq",
"SSAHA":"./ssaha2",
"OPTIONS":"-tags 1 -rtype abi -score 30 -seeds 5 -output ssaha2",
"SPLIT":"./fastq_split.pl",
"SEQ_PER_SPLIT":1000,
"TOTAL_SEQ":100000
},
"rules":
[
{
"command":template("{SPLIT} {QUERY} {SEQ_PER_SPLIT}"),
"inputs":
[
SPLIT,
QUERY
],
"outputs":
[
template("{QUERY}.{x}") for x in range(ceil(TOTAL_SEQ/SEQ_PER_SPLIT))
],
"local_job":true
},
{
"command":template("{SSAHA} {OPTIONS} {DB} {QUERY}.{x} > output.fastq.{x}"),
"inputs":
[
SSAHA,
DB,
template("{QUERY}.{x}")
],
"outputs":
[
template("output.fastq.{x}")
]
} for x in range(ceil(TOTAL_SEQ/SEQ_PER_SPLIT)),
{
"command":format("cat %s > output.fastq",join([template("output.fastq.{x}") for x in range(ceil(TOTAL_SEQ/SEQ_PER_SPLIT))])),
"inputs":
[
template("output.fastq.{x}") for x in range(ceil(TOTAL_SEQ/SEQ_PER_SPLIT))
],
"outputs":
[
"output.fastq"
],
"local_job":true
}
]
}