Skip to content

Commit

Permalink
Adding project-level matrices for counts, cov, contigs at different t…
Browse files Browse the repository at this point in the history
…axonomic levels
  • Loading branch information
skchronicles committed Feb 4, 2025
1 parent f4a9210 commit dd22d9b
Show file tree
Hide file tree
Showing 2 changed files with 355 additions and 12 deletions.
31 changes: 19 additions & 12 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ rule all:
input:
# FastQValidator, only runs if Snakemake is
# invoked with the --use-singularity option
# @imported from rules/paired-end.smk
# @imported from rules/metavirs.smk
expand(
join(workpath,"{name}","rawQC","{name}.validated.R1.fastq.log"),
name=provided(samples, wf_api.use_singularity)
Expand All @@ -67,7 +67,7 @@ rule all:
name=samples
),
# FastQC (before and after trimming)
# @imported from rules/paired-end.smk
# @imported from rules/metavirs.smk
expand(
join(workpath,"{name}","rawQC","{name}.R1_fastqc.zip"),
name=samples
Expand All @@ -77,19 +77,19 @@ rule all:
name=samples
),
# Cutadapt, remove adapter sequences
# @imported from rules/paired-end.smk
# @imported from rules/metavirs.smk
expand(
join(workpath,"{name}","trim","{name}.R1.trim.fastq"),
name=samples
),
# Remove Host contamination
# @imported from rules/paired-end.smk
# @imported from rules/metavirs.smk
expand(
join(workpath,"{name}","trim","{name}.R1.trim.host_removed.fastq.gz"),
name=samples
),
# Kraken2, viral taxonomic classification
# @imported from rules/paired-end.smk
# @imported from rules/metavirs.smk
expand(
join(workpath,"{name}","kraken2","{name}.reads.krona.html"),
name=samples
Expand All @@ -98,13 +98,13 @@ rule all:
# conditional runs with pair-end samples,
# metaspades does NOT support single-end,
# https://github.com/ablab/spades/discussions/1026
# @imported from rules/paired-end.smk
# @imported from rules/metavirs.smk
expand(
join(workpath,"{name}","output","{name}.metaspades.bam"),
name=pe_samples
),
# Megahit, viral assembly, annotation, and alignment to contigs
# @imported from rules/paired-end.smk
# @imported from rules/metavirs.smk
expand(
join(workpath,"{name}","output","{name}.megahit.bam"),
name=samples
Expand All @@ -113,7 +113,7 @@ rule all:
# conditional runs with pair-end samples,
# metaspades does NOT support single-end,
# https://github.com/ablab/spades/discussions/1026
# @imported from rules/paired-end.smk
# @imported from rules/metavirs.smk
expand(
join(workpath,"{name}","output","{name}.metaspades_blast.tsv"),
name=pe_samples
Expand All @@ -123,14 +123,14 @@ rule all:
pe_samples
),
# BLAST Megahit contigs against nt virsuses database,
# @imported from rules/paired-end.smk
# @imported from rules/metavirs.smk
expand(
join(workpath,"{name}","output","{name}.megahit_blast.tsv"),
name=samples
),
join(workpath,"Project","megahit_blast.xlsx"),
# Krona, taxonomic classification report
# @imported from rules/paired-end.smk
# @imported from rules/metavirs.smk
expand(
join(workpath,"{name}","output","{name}.contig.classification.html"),
name=samples
Expand All @@ -145,12 +145,19 @@ rule all:
name=samples
),
# Krona, project-level multi-sample report
# @imported from rules/paired-end.smk
# @imported from rules/metavirs.smk
expand(
join(workpath,"Project","temp","{name}.megahit.contigs.CAT.krona.meta"),
name=provided(samples, do_aggregate),
),
provided(
[join(workpath,"Project","Project.contig.classification.html")],
do_aggregate
)
),
# Project-level family, genus, species viral matrices
# of counts, coverage, contig IDs, and number of contigs
join(workpath,"Project","megahit.kraken2_viraltable.family-level.counts.tsv"),
provided(
[join(workpath,"Project","metaspades.kraken2_viraltable.family-level.counts.tsv")],
pe_samples
),
Loading

0 comments on commit dd22d9b

Please sign in to comment.