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
7 changes: 7 additions & 0 deletions assets/schema_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@
"default": 0,
"enum": [0, 1]
},
"ploidy": {
"type": "integer",
"errorMessage": "Ploidy must be a positive integer. Defaults to 2 if none is supplied.",
"meta": ["ploidy"],
"default": 2,
"minimum": 1
},
"lane": {
"anyOf": [{ "type": "integer" }, { "type": "string" }],
"pattern": "^\\S+$",
Expand Down
2 changes: 2 additions & 0 deletions conf/modules/haplotypecaller.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
process {

withName: 'GATK4_HAPLOTYPECALLER' {
// Default ploidy is 2 as most common model organisms (human, mouse, etc.) are diploid
ext.args = { [
"--sample-ploidy ${meta.ploidy ?: 2}",
params.joint_germline ? "-ERC GVCF" : "",
params.gatk_pcr_indel_model ? "--pcr-indel-model ${params.gatk_pcr_indel_model}" : "",
].join(" ").trim() }
Expand Down
6 changes: 5 additions & 1 deletion conf/modules/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ process {

withName: 'VCFTOOLS_.*' {
ext.prefix = { variant_file.baseName - ".vcf" }
ext.when = { !(params.skip_tools && params.skip_tools.split(',').contains('vcftools')) }
// VCFtools TsTv does not support polyploid samples (ploidy > 2)
ext.when = {
!(params.skip_tools && params.skip_tools.split(',').contains('vcftools')) &&
(meta.ploidy == null || meta.ploidy <= 2)
}
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/reports/vcftools/${meta.variantcaller}/${meta.id}/" },
Expand Down
33 changes: 33 additions & 0 deletions conf/test/tools_germline_haploid.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running minimal tests with haploid samples
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.
Tests the ploidy parameter with haploid (ploidy=1) samples.

Use as follows:
nextflow run nf-core/sarek -profile test_tools_germline_haploid,<docker/singularity> --outdir <OUTDIR>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

params {
input = "${projectDir}/tests/csv/3.0/recalibrated_germline_haploid.csv"
genome = null
igenomes_ignore = true
dbsnp = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/germlineresources/dbsnp_138.hg38.vcf.gz"
dbsnp_tbi = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/germlineresources/dbsnp_138.hg38.vcf.gz.tbi"
fasta = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta"
fasta_fai = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai"
intervals = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed"
known_indels = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/germlineresources/mills_and_1000G.indels.hg38.vcf.gz"
known_indels_tbi = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/germlineresources/mills_and_1000G.indels.hg38.vcf.gz.tbi"
known_indels_vqsr = "--resource:1000G,known=false,training=true,truth=true,prior=10.0 mills_and_1000G.indels.hg38.vcf.gz"
known_snps = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/germlineresources/hapmap_3.3.hg38.vcf.gz"
known_snps_tbi = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/germlineresources/hapmap_3.3.hg38.vcf.gz.tbi"
known_snps_vqsr = "--resource:hapmap,known=false,training=true,truth=true,prior=10.0 hapmap_3.3.hg38.vcf.gz"
ngscheckmate_bed = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/germlineresources/SNP_GRCh38_hg38_wChr.bed"
nucleotides_per_second = 20
step = 'variant_calling'
tools = null
wes = true
}
34 changes: 34 additions & 0 deletions conf/test/tools_germline_triploid.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running minimal tests with triploid samples
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.
Tests the ploidy parameter with triploid (ploidy=3) samples.
VCFtools should be skipped for ploidy > 2.

Use as follows:
nextflow run nf-core/sarek -profile test,tools_germline_triploid,docker --outdir <OUTDIR>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

params {
input = "${projectDir}/tests/csv/3.0/recalibrated_germline_triploid.csv"
genome = null
igenomes_ignore = true
dbsnp = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/germlineresources/dbsnp_138.hg38.vcf.gz"
dbsnp_tbi = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/germlineresources/dbsnp_138.hg38.vcf.gz.tbi"
fasta = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta"
fasta_fai = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai"
intervals = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed"
known_indels = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/germlineresources/mills_and_1000G.indels.hg38.vcf.gz"
known_indels_tbi = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/germlineresources/mills_and_1000G.indels.hg38.vcf.gz.tbi"
known_indels_vqsr = "--resource:1000G,known=false,training=true,truth=true,prior=10.0 mills_and_1000G.indels.hg38.vcf.gz"
known_snps = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/germlineresources/hapmap_3.3.hg38.vcf.gz"
known_snps_tbi = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/germlineresources/hapmap_3.3.hg38.vcf.gz.tbi"
known_snps_vqsr = "--resource:hapmap,known=false,training=true,truth=true,prior=10.0 hapmap_3.3.hg38.vcf.gz"
ngscheckmate_bed = "${params.modules_testdata_base_path}/genomics/homo_sapiens/genome/chr21/germlineresources/SNP_GRCh38_hg38_wChr.bed"
nucleotides_per_second = 20
step = 'variant_calling'
tools = null
wes = true
}
2 changes: 2 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@ profiles {
targeted { includeConfig 'conf/test/targeted.config' }
tools { includeConfig 'conf/test/tools.config' }
tools_germline { includeConfig 'conf/test/tools_germline.config' }
tools_germline_haploid { includeConfig 'conf/test/tools_germline_haploid.config' }
tools_germline_triploid { includeConfig 'conf/test/tools_germline_triploid.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
2 changes: 2 additions & 0 deletions tests/csv/3.0/recalibrated_germline_haploid.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
patient,sex,status,sample,ploidy,cram,crai
test,XX,0,sample1,1,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram.crai
2 changes: 2 additions & 0 deletions tests/csv/3.0/recalibrated_germline_triploid.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
patient,sex,status,sample,ploidy,cram,crai
test,XX,0,sample1,3,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram.crai
Loading