-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathSnakefile
79 lines (67 loc) · 2.65 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
import pandas as pd
from snakemake.utils import validate, min_version
import re
##### set minimum snakemake version #####
min_version("5.1.2")
##### load config and sample sheets #####
#configfile: "config.yaml"
## USER FILES ##
samples = pd.read_csv(config["samples"], index_col="sample", sep="\t")
units = pd.read_csv(config["units"], index_col=["unit"], dtype=str, sep="\t")
reheader = pd.read_csv(config["reheader"],index_col="Client", dtype=str, sep="\t")
reheader = reheader[reheader["LIMS"].isin(samples.index.values)]
## ---------- ##
units_se=units[units["fq2"].isna()]
units_pe=units[units["fq2"].notna()]
##############################
include:
"rules/functions.py"
rule all:
input:
# Kallisto+Sleuth workflow
expand("kallisto/{sample.sample}/abundance.tsv", sample=samples.reset_index().itertuples()),
# Star
expand("star/{sample.sample}/{sample.sample}.Aligned.sortedByCoord.out.bam", sample=samples.reset_index().itertuples()),
# Rseqc
# expand("rseqc/{sample.sample}/{sample.sample}.saturation.pdf", sample=samples.reset_index().itertuples()),
"qc/multiqc.html",
# expand("star/{sample.sample}/count/{sample.sample}_featurecounts.cnt",sample=samples.reset_index().itertuples()),
expand("star/{sample.sample}/count/{sample.sample}_HTSeqcounts.cnt",sample=samples.reset_index().itertuples()),
# "results/Heatmap_Most_Var.png",
expand("qc/bbmap_qchist/{sample.sample}-R1.fq.gz.qchist",sample=samples.reset_index().itertuples()),
# expand("delivery/abundance/{Client.Client}.tsv",Client=reheader.reset_index().itertuples()),
# expand("delivery/bams/{Client.Client}.bam",Client=reheader.reset_index().itertuples()),
# expand("delivery/bams/{Client.Client}.bam.bai",Client=reheader.reset_index().itertuples())
include_prefix="rules"
include:
include_prefix + "/rseqc.smk"
# include:
# include_prefix + "/plots.smk"
include:
include_prefix + "/concatenate_fq.smk"
include:
include_prefix + "/bbmap.smk"
# include:
# include_prefix + "/delivery.smk"
if config.get("read_type")=="se":
include:
include_prefix + "/trimming_se.smk"
include:
include_prefix + "/qc_se.smk"
include:
include_prefix + "/reads_feature_count.smk"
include:
include_prefix + "/kallisto.smk"
include:
include_prefix + "/star2.smk"
else:
include:
include_prefix + "/trimming_pe.smk"
include:
include_prefix + "/qc_pe.smk"
include:
include_prefix + "/kallisto_pe.smk"
include:
include_prefix + "/star2_pe.smk"
include:
include_prefix + "/reads_feature_count_pe.smk"