Skip to content
This repository has been archived by the owner on Jan 27, 2020. It is now read-only.

Actually use SnpEFF reports in MultiQC #563

Merged
merged 5 commits into from
Apr 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ services:

env:
- NXF_VER=0.27.0 SGT_VER=2.4.2 PROFILE=singularity TEST=TOOLS TOOL_INSTALL=all
- NXF_VER=0.27.0 PROFILE=docker TEST=TOOLS TOOL_INSTALL=nextflow
- NXF_VER=0.27.0 SGT_VER=2.4.2 PROFILE=singularity TEST=STEP TOOL_INSTALL=all
- NXF_VER=0.27.0 SGT_VER=2.4.2 PROFILE=singularity TEST=MANTA TOOL_INSTALL=all
- NXF_VER=0.27.0 PROFILE=docker TEST=MANTA TOOL_INSTALL=nextflow
- NXF_VER=0.27.0 PROFILE=docker TEST=TOOLS TOOL_INSTALL=nextflow
- NXF_VER=0.27.0 PROFILE=docker TEST=ANNOTATEVEP TOOL_INSTALL=nextflow
- NXF_VER=0.27.0 SGT_VER=2.4.2 PROFILE=singularity TEST=ANNOTATESNPEFF TOOL_INSTALL=all
- NXF_VER=0.27.0 SGT_VER=2.4.2 PROFILE=singularity TEST=STEP TOOL_INSTALL=all
- NXF_VER=0.27.0 SGT_VER=2.4.2 PROFILE=singularity TEST=GERMLINE TOOL_INSTALL=all
- NXF_VER=0.27.0 PROFILE=docker TEST=ANNOTATEVEP TOOL_INSTALL=nextflow
- NXF_VER=0.27.0 PROFILE=docker TEST=ANNOTATESNPEFF TOOL_INSTALL=nextflow
- NXF_VER=0.27.0 SGT_VER=2.4.2 PROFILE=singularity TEST=DIR TOOL_INSTALL=all
- NXF_VER=0.27.0 PROFILE=docker TEST=MANTA TOOL_INSTALL=nextflow
- NXF_VER=0.27.0 PROFILE=docker TEST=ANNOTATESNPEFF TOOL_INSTALL=nextflow
- NXF_VER=0.27.0 PROFILE=docker TEST=STEP TOOL_INSTALL=nextflow
- NXF_VER=0.27.0 PROFILE=docker TEST=GERMLINE TOOL_INSTALL=nextflow
- NXF_VER=0.27.0 PROFILE=docker TEST=DIR TOOL_INSTALL=nextflow
Expand Down
3 changes: 2 additions & 1 deletion annotate.nf
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ if (params.verbose) bcfReport = bcfReport.view {
process RunSnpeff {
tag {vcf}

publishDir directoryMap.snpeff, mode: 'link'
publishDir params.outDir , saveAs: { it == "${vcf.baseName}.snpEff.csv" ? "${directoryMap.snpeffReports}/${it}" : "${directoryMap.snpeff}/${it}" }, mode: 'link'

input:
set variantCaller, file(vcf) from vcfForSnpeff
Expand Down Expand Up @@ -228,6 +228,7 @@ def defineDirectoryMap() {
'strelka' : "${params.outDir}/VariantCalling/Strelka",
'strelkabp' : "${params.outDir}/VariantCalling/StrelkaBP",
'bcftoolsStats' : "${params.outDir}/Reports/BCFToolsStats",
'snpeffReports' : "${params.outDir}/Reports/SnpEff",
'snpeff' : "${params.outDir}/Annotation/SnpEff",
'vep' : "${params.outDir}/Annotation/VEP"
]
Expand Down
4 changes: 3 additions & 1 deletion runMultiQC.nf
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ process GenerateMultiQCconfig {
echo "- 'picard'" >> multiqc_config.yaml
echo "- 'samtools'" >> multiqc_config.yaml
echo "- 'qualimap'" >> multiqc_config.yaml
echo "- 'bcftools'" >> multiqc_config.yaml
echo "- 'snpeff'" >> multiqc_config.yaml
echo "- 'vep'" >> multiqc_config.yaml
"""
}

Expand All @@ -105,6 +105,7 @@ reportsForMultiQC = Channel.empty()
Channel.fromPath("${directoryMap.fastQC}/*/*"),
Channel.fromPath("${directoryMap.markDuplicatesQC}/*"),
Channel.fromPath("${directoryMap.samtoolsStats}/*"),
Channel.fromPath("${directoryMap.snpeffReports}/*"),
multiQCconfig
).collect()

Expand Down Expand Up @@ -147,6 +148,7 @@ def defineDirectoryMap() {
'bamQC' : "${params.outDir}/Reports/bamQC",
'bcftoolsStats' : "${params.outDir}/Reports/BCFToolsStats",
'fastQC' : "${params.outDir}/Reports/FastQC",
'snpeffReports' : "${params.outDir}/Reports/SnpEff",
'markDuplicatesQC' : "${params.outDir}/Reports/MarkDuplicates",
'multiQC' : "${params.outDir}/Reports/MultiQC",
'samtoolsStats' : "${params.outDir}/Reports/SamToolsStats"
Expand Down
9 changes: 7 additions & 2 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
set -xeuo pipefail

BUILD=false
KEEP=false
GENOME=smallGRCh37
PROFILE=singularity
SAMPLE=data/tsv/tiny.tsv
Expand Down Expand Up @@ -32,6 +33,10 @@ do
shift # past argument
shift # past value
;;
-k|--keep)
KEEP=true
shift # past value
;;
-b|--build)
BUILD=true
shift # past value
Expand All @@ -52,7 +57,7 @@ function run_wrapper() {
}

function clean_repo() {
if [[ $TRAVIS == false ]]
if [[ $TRAVIS == false ]] && [[ $KEEP == true ]]
then
rm -rf work .nextflow* Preprocessing Reports Annotation VariantCalling Results
fi
Expand Down Expand Up @@ -127,7 +132,7 @@ then
rm -rf work/singularity/picard-latest.img
fi
run_wrapper --annotate --tools ${ANNOTATOR} --annotateVCF data/tiny/vcf/Strelka_1234N_variants.vcf.gz --noReports
run_wrapper --annotate --tools ${ANNOTATOR} --annotateVCF data/tiny/vcf/Strelka_1234N_variants.vcf.gz,data/tiny/vcf/Strelka_9876T_variants.vcf.gz --noReports
run_wrapper --annotate --tools ${ANNOTATOR} --annotateVCF data/tiny/vcf/Strelka_1234N_variants.vcf.gz,data/tiny/vcf/Strelka_9876T_variants.vcf.gz
clean_repo
fi

Expand Down