-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSnakefile
76 lines (63 loc) · 5.12 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
# ********************************
# * Snakefile for metqc pipeline *
# ********************************
# **** Variables ****
configfile: "config.yaml"
# **** Imports ****
import pandas as pd
import os
SAMPLES = pd.read_csv(config["list_files"], header = None)
SAMPLES = SAMPLES[0].tolist()
# The forward read number for output files.
forward_read_num = config["forward_read_suffix"].split(".",1)[0]
# The reverse read number for output files.
reverse_read_num = config["reverse_read_suffix"].split(".",1)[0]
# **** Rules ****
rule all:
input:
os.path.join(config["output_dir"],"metqc/multiqc","multiqc_report_raw.html"),
os.path.join(config["output_dir"],"metqc/multiqc","multiqc_report_prinseq_filtered.html"),
os.path.join(config["output_dir"],"metqc/multiqc","multiqc_report_bmtagger_filtered.html"),
## comment out the line below if host_contamination rule fails.
os.path.join(config["output_dir"],"metqc/seqkit","qc_seqkit.csv"),
expand(config["output_dir"] + "/metaphlan/SGB/{sample}_bowtie2.bz2",sample=SAMPLES),
expand(config["output_dir"] + "/metaphlan/SGB/{sample}_profile.txt",sample=SAMPLES),
expand(config["output_dir"] + "/metaphlan/GTDB/{sample}_profile.txt",sample=SAMPLES),
config["output_dir"] + "/metaphlan/results/merged_abundance_table_SGB.txt",
config["output_dir"] + "/metaphlan/results/merged_abundance_table_SGB_species.txt",
config["output_dir"] + "/metaphlan/results/merged_abundance_table_GTDB.txt",
config["output_dir"] + "/metaphlan/results/merged_abundance_table_GTDB_species.txt",
config["output_dir"] + "/metannotate/final_results_relab/merged_genefamilies_uniref_renamed_relab_stratified.tsv",
config["output_dir"] + "/metannotate/final_results_relab/merged_genefamilies_ko_renamed_relab_stratified.tsv",
config["output_dir"] + "/metannotate/final_results_relab/merged_genefamilies_rxn_renamed_relab_stratified.tsv",
config["output_dir"] + "/metannotate/final_results_relab/merged_genefamilies_eggnog_renamed_relab_stratified.tsv",
config["output_dir"] + "/metannotate/final_results_relab/merged_pathabundance_relab_stratified.tsv",
config["output_dir"] + "/metannotate/final_results_relab/merged_genefamilies_uniref_renamed_relab_unstratified.tsv",
config["output_dir"] + "/metannotate/final_results_relab/merged_genefamilies_ko_renamed_relab_unstratified.tsv",
config["output_dir"] + "/metannotate/final_results_relab/merged_genefamilies_rxn_renamed_relab_unstratified.tsv",
config["output_dir"] + "/metannotate/final_results_relab/merged_genefamilies_eggnog_renamed_relab_unstratified.tsv",
config["output_dir"] + "/metannotate/final_results_relab/merged_pathabundance_relab_unstratified.tsv",
config["output_dir"] + "/metannotate/final_results_raw/merged_genefamilies_uniref_renamed_stratified.tsv",
config["output_dir"] + "/metannotate/final_results_raw/merged_genefamilies_ko_renamed_stratified.tsv",
config["output_dir"] + "/metannotate/final_results_raw/merged_genefamilies_rxn_renamed_stratified.tsv",
config["output_dir"] + "/metannotate/final_results_raw/merged_genefamilies_eggnog_renamed_stratified.tsv",
config["output_dir"] + "/metannotate/final_results_raw/merged_pathabundance_stratified.tsv",
config["output_dir"] + "/metannotate/final_results_raw/merged_genefamilies_uniref_renamed_unstratified.tsv",
config["output_dir"] + "/metannotate/final_results_raw/merged_genefamilies_ko_renamed_unstratified.tsv",
config["output_dir"] + "/metannotate/final_results_raw/merged_genefamilies_rxn_renamed_unstratified.tsv",
config["output_dir"] + "/metannotate/final_results_raw/merged_genefamilies_eggnog_renamed_unstratified.tsv",
config["output_dir"] + "/metannotate/final_results_raw/merged_pathabundance_unstratified.tsv",
config["output_dir"] + "/metannotate/final_results_cpm/merged_genefamilies_uniref_renamed_cpm_stratified.tsv",
config["output_dir"] + "/metannotate/final_results_cpm/merged_genefamilies_ko_renamed_cpm_stratified.tsv",
config["output_dir"] + "/metannotate/final_results_cpm/merged_genefamilies_rxn_renamed_cpm_stratified.tsv",
config["output_dir"] + "/metannotate/final_results_cpm/merged_genefamilies_eggnog_renamed_cpm_stratified.tsv",
config["output_dir"] + "/metannotate/final_results_cpm/merged_pathabundance_cpm_stratified.tsv",
config["output_dir"] + "/metannotate/final_results_cpm/merged_genefamilies_uniref_renamed_cpm_unstratified.tsv",
config["output_dir"] + "/metannotate/final_results_cpm/merged_genefamilies_ko_renamed_cpm_unstratified.tsv",
config["output_dir"] + "/metannotate/final_results_cpm/merged_genefamilies_rxn_renamed_cpm_unstratified.tsv",
config["output_dir"] + "/metannotate/final_results_cpm/merged_genefamilies_eggnog_renamed_cpm_unstratified.tsv",
config["output_dir"] + "/metannotate/final_results_cpm/merged_pathabundance_cpm_unstratified.tsv"
include: "utils/rules/metqc.smk"
include: "utils/rules/sortmerna.smk"
include: "utils/rules/metaphlan.smk"
include: "utils/rules/metannotate.smk"