forked from pachterlab/kallisto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSnakefile
60 lines (55 loc) · 1.17 KB
/
Snakefile
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
58
59
60
PRE = "transcripts"
GTF = "{0}.gtf.gz".format(PRE)
FASTA = "{0}.fasta.gz".format(PRE)
INDEX = "{0}.kidx".format(PRE)
rule all:
input:
"quant_out/abundance.tsv",
"bus_out/output.bus"
rule index:
input: FASTA
output: INDEX
shell:
"""
kallisto index -i {output} {input}
mkdir quant_out
mkdir bus_out
"""
rule kallisto_quant:
input:
"reads_1.fastq.gz",
"reads_2.fastq.gz",
INDEX
output:
"quant_out/abundance.tsv",
"quant_out/run_info.json"
shell:
"""
kallisto quant \
-i {INDEX} \
-b 30 \
-o quant_out/ \
--genomebam \
--gtf {GTF} \
--chromosomes chrom.txt \
{input[0]} {input[1]}
"""
rule kallisto_bus:
input:
"sc_reads_1.fastq.gz",
"sc_reads_2.fastq.gz",
INDEX
output:
"bus_out/matrix.ec",
"bus_out/transcripts.txt",
"bus_out/output.bus",
"bus_out/run_info.json"
shell:
"""
kallisto bus \
-i {INDEX} \
-x 10xv2 \
-o bus_out \
-t 4 \
{input[0]} {input[1]}
"""