-
Notifications
You must be signed in to change notification settings - Fork 14
/
Snakefile
53 lines (48 loc) · 1.21 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
rule download_data:
output:
reads="raw_data/sample1.fastq.gz"
shell:
"""
mkdir -p raw_data
cd raw_data
wget https://raw.githubusercontent.com/deto/Snakemake_Tutorial/master/misc/sample1.fastq.gz
"""
rule fastqc:
input:
reads=rules.download_data.output
output:
"fastqc/results.html"
shell:
"""
fastqc --outdir="fastqc" {input.reads}
"""
rule align_reads:
input:
reads=rules.download_data.output
output:
"STAR/results.bam"
shell:
"""
STAR --genomeDir "/some/directory/to/reference" \
--outFileNamePrefix "STAR/results" \
--readFilesIn {input.reads}
"""
rule quantify_transcripts:
input:
bam=rules.align_reads.output
output:
isoforms="rsem/sample.isoforms.results"
shell:
"""
rsem-calculate-expression --alignments {input.bam} rsem/sample
"""
rule plot_results:
input:
isoforms=rules.quantify_transcripts.output.isoforms
output:
plot="plots/my_plot.png"
script: "scripts/plot_things.py"
rule all:
input:
rules.plot_results.output,
rules.fastqc.output,