-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathshrimp.jx
57 lines (53 loc) · 1.27 KB
/
shrimp.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.csfasta",
"GENOME":"genome.fasta",
"MAPPER":"./rmapper-cs",
"MOPTIONS":"-M fast -M 50bp",
"SPLIT":"./split_fasta",
"SEQ_PER_SPLIT":10000,
"TOTAL_SEQ":7620000
},
"rules":
[
{
"command":template("{SPLIT} {SEQ_PER_SPLIT} {QUERY}"),
"inputs":
[
QUERY,
SPLIT
],
"outputs":
[
template("{QUERY}.{x}") for x in range(ceil(TOTAL_SEQ/SEQ_PER_SPLIT))
],
"local_job":true
},
{
"command":template("{MAPPER} {MOPTIONS} {QUERY}.{x} {GENOME} > output.{x}"),
"inputs":
[
MAPPER,
GENOME,
template("{QUERY}.{x}")
],
"outputs":
[
template("output.{x}")
]
} for x in range(ceil(TOTAL_SEQ/SEQ_PER_SPLIT)),
{
"command":format("cat %s > output.txt",join([template("output.{x}") for x in range(ceil(TOTAL_SEQ/SEQ_PER_SPLIT))])),
"inputs":
[
template("output.{x}") for x in range(ceil(TOTAL_SEQ/SEQ_PER_SPLIT))
],
"outputs":
[
"output.txt"
],
"local_job":true
}
]
}