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

Commit d441417

Browse files
author
Szilveszter Juhos
authored
Merge pull request #563 from MaxUlysse/snpEff
Actually use SnpEFF reports in MultiQC
2 parents 3825602 + cd552e8 commit d441417

4 files changed

Lines changed: 17 additions & 9 deletions

File tree

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ services:
1111

1212
env:
1313
- NXF_VER=0.27.0 SGT_VER=2.4.2 PROFILE=singularity TEST=TOOLS TOOL_INSTALL=all
14-
- NXF_VER=0.27.0 PROFILE=docker TEST=TOOLS TOOL_INSTALL=nextflow
15-
- NXF_VER=0.27.0 SGT_VER=2.4.2 PROFILE=singularity TEST=STEP TOOL_INSTALL=all
1614
- NXF_VER=0.27.0 SGT_VER=2.4.2 PROFILE=singularity TEST=MANTA TOOL_INSTALL=all
15+
- NXF_VER=0.27.0 PROFILE=docker TEST=MANTA TOOL_INSTALL=nextflow
16+
- NXF_VER=0.27.0 PROFILE=docker TEST=TOOLS TOOL_INSTALL=nextflow
17+
- NXF_VER=0.27.0 PROFILE=docker TEST=ANNOTATEVEP TOOL_INSTALL=nextflow
1718
- NXF_VER=0.27.0 SGT_VER=2.4.2 PROFILE=singularity TEST=ANNOTATESNPEFF TOOL_INSTALL=all
19+
- NXF_VER=0.27.0 SGT_VER=2.4.2 PROFILE=singularity TEST=STEP TOOL_INSTALL=all
1820
- NXF_VER=0.27.0 SGT_VER=2.4.2 PROFILE=singularity TEST=GERMLINE TOOL_INSTALL=all
19-
- NXF_VER=0.27.0 PROFILE=docker TEST=ANNOTATEVEP TOOL_INSTALL=nextflow
20-
- NXF_VER=0.27.0 PROFILE=docker TEST=ANNOTATESNPEFF TOOL_INSTALL=nextflow
2121
- NXF_VER=0.27.0 SGT_VER=2.4.2 PROFILE=singularity TEST=DIR TOOL_INSTALL=all
22-
- NXF_VER=0.27.0 PROFILE=docker TEST=MANTA TOOL_INSTALL=nextflow
22+
- NXF_VER=0.27.0 PROFILE=docker TEST=ANNOTATESNPEFF TOOL_INSTALL=nextflow
2323
- NXF_VER=0.27.0 PROFILE=docker TEST=STEP TOOL_INSTALL=nextflow
2424
- NXF_VER=0.27.0 PROFILE=docker TEST=GERMLINE TOOL_INSTALL=nextflow
2525
- NXF_VER=0.27.0 PROFILE=docker TEST=DIR TOOL_INSTALL=nextflow

annotate.nf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ if (params.verbose) bcfReport = bcfReport.view {
131131
process RunSnpeff {
132132
tag {vcf}
133133

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

136136
input:
137137
set variantCaller, file(vcf) from vcfForSnpeff
@@ -228,6 +228,7 @@ def defineDirectoryMap() {
228228
'strelka' : "${params.outDir}/VariantCalling/Strelka",
229229
'strelkabp' : "${params.outDir}/VariantCalling/StrelkaBP",
230230
'bcftoolsStats' : "${params.outDir}/Reports/BCFToolsStats",
231+
'snpeffReports' : "${params.outDir}/Reports/SnpEff",
231232
'snpeff' : "${params.outDir}/Annotation/SnpEff",
232233
'vep' : "${params.outDir}/Annotation/VEP"
233234
]

runMultiQC.nf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ process GenerateMultiQCconfig {
8888
echo "- 'picard'" >> multiqc_config.yaml
8989
echo "- 'samtools'" >> multiqc_config.yaml
9090
echo "- 'qualimap'" >> multiqc_config.yaml
91+
echo "- 'bcftools'" >> multiqc_config.yaml
9192
echo "- 'snpeff'" >> multiqc_config.yaml
92-
echo "- 'vep'" >> multiqc_config.yaml
9393
"""
9494
}
9595

@@ -105,6 +105,7 @@ reportsForMultiQC = Channel.empty()
105105
Channel.fromPath("${directoryMap.fastQC}/*/*"),
106106
Channel.fromPath("${directoryMap.markDuplicatesQC}/*"),
107107
Channel.fromPath("${directoryMap.samtoolsStats}/*"),
108+
Channel.fromPath("${directoryMap.snpeffReports}/*"),
108109
multiQCconfig
109110
).collect()
110111

@@ -147,6 +148,7 @@ def defineDirectoryMap() {
147148
'bamQC' : "${params.outDir}/Reports/bamQC",
148149
'bcftoolsStats' : "${params.outDir}/Reports/BCFToolsStats",
149150
'fastQC' : "${params.outDir}/Reports/FastQC",
151+
'snpeffReports' : "${params.outDir}/Reports/SnpEff",
150152
'markDuplicatesQC' : "${params.outDir}/Reports/MarkDuplicates",
151153
'multiQC' : "${params.outDir}/Reports/MultiQC",
152154
'samtoolsStats' : "${params.outDir}/Reports/SamToolsStats"

scripts/test.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
set -xeuo pipefail
33

44
BUILD=false
5+
KEEP=false
56
GENOME=smallGRCh37
67
PROFILE=singularity
78
SAMPLE=data/tsv/tiny.tsv
@@ -32,6 +33,10 @@ do
3233
shift # past argument
3334
shift # past value
3435
;;
36+
-k|--keep)
37+
KEEP=true
38+
shift # past value
39+
;;
3540
-b|--build)
3641
BUILD=true
3742
shift # past value
@@ -52,7 +57,7 @@ function run_wrapper() {
5257
}
5358

5459
function clean_repo() {
55-
if [[ $TRAVIS == false ]]
60+
if [[ $TRAVIS == false ]] && [[ $KEEP == true ]]
5661
then
5762
rm -rf work .nextflow* Preprocessing Reports Annotation VariantCalling Results
5863
fi
@@ -127,7 +132,7 @@ then
127132
rm -rf work/singularity/picard-latest.img
128133
fi
129134
run_wrapper --annotate --tools ${ANNOTATOR} --annotateVCF data/tiny/vcf/Strelka_1234N_variants.vcf.gz --noReports
130-
run_wrapper --annotate --tools ${ANNOTATOR} --annotateVCF data/tiny/vcf/Strelka_1234N_variants.vcf.gz,data/tiny/vcf/Strelka_9876T_variants.vcf.gz --noReports
135+
run_wrapper --annotate --tools ${ANNOTATOR} --annotateVCF data/tiny/vcf/Strelka_1234N_variants.vcf.gz,data/tiny/vcf/Strelka_9876T_variants.vcf.gz
131136
clean_repo
132137
fi
133138

0 commit comments

Comments
 (0)