Skip to content
Draft
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [1695](https://github.com/nf-core/sarek/pull/1695) - Fix and update input_schema.json
- [1702](https://github.com/nf-core/sarek/pull/1702) - Update nf-schema tests that were not failing on lenient mode
- [1712](https://github.com/nf-core/sarek/pull/1712) - Fix missing import statements on error messages when starting without samplesheet
- [1733](https://github.com/nf-core/sarek/pull/1733) - Use original quality values if DeepVariant is run on recalibrated data

### Removed

Expand Down
5 changes: 4 additions & 1 deletion conf/modules/deepvariant.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
process {

withName: 'DEEPVARIANT_RUNDEEPVARIANT' {
ext.args = { params.wes ? "--model_type=WES" : "--model_type=WGS" }
ext.args = [
params.wes ? "--model_type=WES" : "--model_type=WGS" ,
!params.skip_tools?.contains("baserecalibrator") ? "--make_examples_extra_args '--parse_sam_aux_fields=true,--use_original_quality_scores=true'" : ''

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
!params.skip_tools?.contains("baserecalibrator") ? "--make_examples_extra_args '--parse_sam_aux_fields=true,--use_original_quality_scores=true'" : ''
!params.skip_tools?.contains("baserecalibrator") ? "--make_examples_extra_args 'parse_sam_aux_fields=true,use_original_quality_scores=true'" : ''

That way it works for me.

].join(' ').trim()
ext.prefix = { meta.num_intervals <= 1 ? "${meta.id}.deepvariant" : "${meta.id}.deepvariant.${intervals.baseName}" }
ext.when = { params.tools && params.tools.split(',').contains('deepvariant') }
publishDir = [
Expand Down
1 change: 0 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ profiles {
targeted { includeConfig 'conf/test/targeted.config' }
tools { includeConfig 'conf/test/tools.config' }
tools_germline { includeConfig 'conf/test/tools_germline.config' }
tools_germline_deepvariant { includeConfig 'conf/test/tools_germline_deepvariant.config' }
tools_somatic { includeConfig 'conf/test/tools_somatic.config' }
tools_somatic_ascat { includeConfig 'conf/test/tools_somatic_ascat.config' }
tools_tumoronly { includeConfig 'conf/test/tools_tumoronly.config' }
Expand Down
93 changes: 93 additions & 0 deletions tests/variant_calling_deepvariant.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
nextflow_pipeline {

name "Test pipeline"
script "../main.nf"
tag "pipeline"
tag "pipeline_sarek"

test("Run with profile test | --tools deepvariant") {

when {
params {
modules_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/'
fasta = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/genome.fasta"
fasta_fai = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/genome.fasta.fai"
intervals = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/genome.bed"
input = "${projectDir}/tests/csv/3.0/mapped_single_cram.csv"
outdir = "$outputDir"
nucleotides_per_second = 20
step = "variant_calling"
tools = 'deepvariant'
wes = true
}
}

then {
// stable_name: All files + folders in ${params.outdir}/ with a stable name
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
// stable_path: All files in ${params.outdir}/ with stable content
def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore')
// cram_files: All cram files
def cram_files = getAllFilesFromDir(params.outdir, include: ['**/*.cram'])
def fasta = params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta'
assertAll(
{ assert workflow.success},
{ assert snapshot(
// Number of successful tasks
workflow.trace.succeeded().size(),
// pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions
removeNextflowVersion("$outputDir/pipeline_info/nf_core_sarek_software_mqc_versions.yml"),
// All stable path name, with a relative path
stable_name,
// All files with stable contents
stable_path,
// All cram files
cram_files.collect{ file -> [ file.getName(), cram(file.toString(), fasta).getReadsMD5() ] }
).match() }
)
}
}

test("Run with profile test | --tools deepvariant --no_intervals") {

when {
params {
modules_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/'
fasta = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/genome.fasta"
fasta_fai = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/genome.fasta.fai"
intervals = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/genome.bed"
input = "${projectDir}/tests/csv/3.0/mapped_single_cram.csv"
outdir = "$outputDir"
no_intervals = true
step = "variant_calling"
tools = 'deepvariant'
wes = true
}
}

then {
// stable_name: All files + folders in ${params.outdir}/ with a stable name
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
// stable_path: All files in ${params.outdir}/ with stable content
def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore')
// cram_files: All cram files
def cram_files = getAllFilesFromDir(params.outdir, include: ['**/*.cram'])
def fasta = params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta'
assertAll(
{ assert workflow.success},
{ assert snapshot(
// Number of successful tasks
workflow.trace.succeeded().size(),
// pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions
removeNextflowVersion("$outputDir/pipeline_info/nf_core_sarek_software_mqc_versions.yml"),
// All stable path name, with a relative path
stable_name,
// All files with stable contents
stable_path,
// All cram files
cram_files.collect{ file -> [ file.getName(), cram(file.toString(), fasta).getReadsMD5() ] }
).match() }
)
}
}
}