-
Notifications
You must be signed in to change notification settings - Fork 2
/
Snakefile
100 lines (77 loc) · 2.26 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import pandas as pd
import yaml
from snakemake.utils import min_version
min_version("5.0")
shell.prefix("set -euo pipefail;")
params = yaml.load(open("params.yml", "r"), Loader=yaml.FullLoader)
features = yaml.load(open("features.yml", "r"), Loader=yaml.FullLoader)
samples = pd.read_table("samples.tsv")
singularity: "docker://continuumio/miniconda3:4.4.10"
shell.prefix("set -euo pipefail;")
SAMPLES_PE = samples[samples["type"] == "PE"]["sample"].tolist()
snakefiles = "src/snakefiles/"
include: snakefiles + "folders.smk"
include: snakefiles + "clean.smk"
include: snakefiles + "raw.smk"
include: snakefiles + "map.smk"
include: snakefiles + "quant.smk"
include: snakefiles + "de.smk"
rule all:
input:
# RAW
# RAW + "reference.fa",
# RAW + "reference.gtf",
# expand(
# RAW + "{sample}_{end}.fq.gz",
# sample = SAMPLES_PE,
# end = "1 2".split()
# ),
# MAP
# MAP + "splice_sites.tsv",
# MAP + "exons.tsv",
# MAP + "reference",
# expand(
# MAP + "{sample}.cram",
# sample=SAMPLES_PE
# ),
# QUANT
# expand(
# QUANT + "{sample}/{sample}.gtf",
# sample=SAMPLES_PE
# ),
# QUANT + "merged.gtf",
# expand(
# QUANT + "merged.{extension}",
# extension="annotated.gtf loci merged.gtf.refmap merged.gtf.tmap stats tracking".split()
# ),
# expand(
# QUANT + "{sample}/{sample}_ballgown.gtf",
# sample=SAMPLES_PE
# ),
# DE
# DE + "pheno_data.tsv",
DE + "chrX_transcript_results.csv",
DE + "chrX_gene_results.csv",
DE + "ballgown.RData",
# DE + "fpkm_boxplot.pdf",
# DE + "NM_012227.pdf",
# DE + "xist.pdf",
# DE + "plotMeans.pdf"
rule map:
"""Build index and map"""
input:
expand(
MAP + "{sample}.cram",
sample=SAMPLES_PE
)
rule quant:
"""Assemble and quantify"""
input:
expand(
QUANT + "{sample}/{sample}_ballgown.gtf",
sample=SAMPLES_PE
)
rule de:
"""Perform differential expression analysis"""
input:
DE + "ballgown.RData"