diff --git a/CHANGELOG.md b/CHANGELOG.md index a6647909..c80c1970 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +- Add `a_mini-all-tools-vcf-input` to `nftest` +- Add option to input VCFs for intersection ## [8.1.0] - 2024-05-15 diff --git a/config/F16.config b/config/F16.config index f8f3a6b3..51387251 100644 --- a/config/F16.config +++ b/config/F16.config @@ -6,99 +6,101 @@ process { cpus = 1 memory = 1.GB } - withName: call_sSNV_SomaticSniper { - cpus = 1 - memory = 1.GB - retry_strategy { - memory { - strategy = 'add' - operand = 3.GB + if (params.input_type == 'bam') { + withName: call_sSNV_SomaticSniper { + cpus = 1 + memory = 1.GB + retry_strategy { + memory { + strategy = 'add' + operand = 3.GB + } } } - } - withName: convert_BAM2Pileup_SAMtools { - cpus = 1 - memory = 1.GB - retry_strategy { - memory { - strategy = 'add' - operand = 5.GB + withName: convert_BAM2Pileup_SAMtools { + cpus = 1 + memory = 1.GB + retry_strategy { + memory { + strategy = 'add' + operand = 5.GB + } } } - } - withName: create_IndelCandidate_SAMtools { - cpus = 1 - memory = 1.GB - retry_strategy { - memory { - strategy = 'add' - operand = 5.GB + withName: create_IndelCandidate_SAMtools { + cpus = 1 + memory = 1.GB + retry_strategy { + memory { + strategy = 'add' + operand = 5.GB + } } } - } - withName: call_sIndel_Manta { - cpus = 6 - memory = 6.GB - retry_strategy { - memory { - strategy = 'add' - operand = 5.GB + withName: call_sIndel_Manta { + cpus = 6 + memory = 6.GB + retry_strategy { + memory { + strategy = 'add' + operand = 5.GB + } } - } - } - withName: call_sSNV_Strelka2 { - cpus = 6 - memory = 2.GB - retry_strategy { - memory { - strategy = 'add' - operand = 12.GB + withName: call_sSNV_Strelka2 { + cpus = 6 + memory = 2.GB + retry_strategy { + memory { + strategy = 'add' + operand = 12.GB + } + } } } - } - withName: call_sSNV_Mutect2 { - cpus = 1 - memory = 2.GB - retry_strategy { - memory { - strategy = 'add' - operand = 2.GB + withName: call_sSNV_Mutect2 { + cpus = 1 + memory = 2.GB + retry_strategy { + memory { + strategy = 'add' + operand = 2.GB + } } } - } - withName: run_LearnReadOrientationModel_GATK { - cpus = 1 - memory = 8.GB - retry_strategy { - memory { - strategy = 'add' - operand = 20.GB + withName: run_LearnReadOrientationModel_GATK { + cpus = 1 + memory = 8.GB + retry_strategy { + memory { + strategy = 'add' + operand = 20.GB + } } - } - } - withName: call_sSNV_MuSE { - cpus = 6 - memory = 24.GB - retry_strategy { - memory { - strategy = 'add' - operand = 8.GB + withName: call_sSNV_MuSE { + cpus = 6 + memory = 24.GB + retry_strategy { + memory { + strategy = 'add' + operand = 8.GB + } + } } } - } - withName: run_sump_MuSE { - cpus = 8 - memory = 16.GB - retry_strategy { - memory { - strategy = 'add' - operand = 16.GB + withName: run_sump_MuSE { + cpus = 8 + memory = 16.GB + retry_strategy { + memory { + strategy = 'add' + operand = 16.GB + } } } } withName: plot_VennDiagram_R { - cpus = 2 - memory = 5.GB + cpus = 1 + memory = 1.GB retry_strategy { memory { strategy = 'add' @@ -107,8 +109,8 @@ process { } } withName: concat_VCFs_BCFtools { - cpus = 2 - memory = 5.GB + cpus = 1 + memory = 1.GB retry_strategy { memory { strategy = 'add' diff --git a/config/F2.config b/config/F2.config index d79e9549..51686737 100644 --- a/config/F2.config +++ b/config/F2.config @@ -8,28 +8,30 @@ process { cpus = 1 memory = 1500.MB } - withName: call_sSNV_SomaticSniper { - cpus = 1 - memory = 1500.MB - } - withName: convert_BAM2Pileup_SAMtools { - cpus = 1 - memory = 1500.MB - } - withName: create_IndelCandidate_SAMtools { - cpus = 1 - memory = 1500.MB - } - withName: call_sIndel_Manta { - cpus = 2 - } - withName: call_sSNV_Strelka2 { - cpus = 2 + if (params.input_type == 'bam') { + withName: call_sSNV_SomaticSniper { + cpus = 1 + memory = 1500.MB + } + withName: convert_BAM2Pileup_SAMtools { + cpus = 1 + memory = 1500.MB + } + withName: create_IndelCandidate_SAMtools { + cpus = 1 + memory = 1500.MB + } + withName: call_sIndel_Manta { + cpus = 2 + } + withName: call_sSNV_Strelka2 { + cpus = 2 + } } withName: plot_VennDiagram_R { - cpus = 2 + cpus = 1 } withName: concat_VCFs_BCFtools { - cpus = 2 + cpus = 1 } } diff --git a/config/F32.config b/config/F32.config index 57f820b8..49318d96 100644 --- a/config/F32.config +++ b/config/F32.config @@ -6,99 +6,101 @@ process { cpus = 1 memory = 1.GB } - withName: call_sSNV_SomaticSniper { - cpus = 1 - memory = 1.GB - retry_strategy { - memory { - strategy = 'add' - operand = 5.GB + if (params.input_type == 'bam') { + withName: call_sSNV_SomaticSniper { + cpus = 1 + memory = 1.GB + retry_strategy { + memory { + strategy = 'add' + operand = 5.GB + } } } - } - withName: convert_BAM2Pileup_SAMtools { - cpus = 1 - memory = 1.GB - retry_strategy { - memory { - strategy = 'add' - operand = 5.GB + withName: convert_BAM2Pileup_SAMtools { + cpus = 1 + memory = 1.GB + retry_strategy { + memory { + strategy = 'add' + operand = 5.GB + } } } - } - withName: create_IndelCandidate_SAMtools { - cpus = 1 - memory = 1.GB - retry_strategy { - memory { - strategy = 'add' - operand = 5.GB + withName: create_IndelCandidate_SAMtools { + cpus = 1 + memory = 1.GB + retry_strategy { + memory { + strategy = 'add' + operand = 5.GB + } } } - } - withName: call_sIndel_Manta { - cpus = 8 - memory = 6.GB - retry_strategy { - memory { - strategy = 'add' - operand = 5.GB + withName: call_sIndel_Manta { + cpus = 8 + memory = 6.GB + retry_strategy { + memory { + strategy = 'add' + operand = 5.GB + } } } - } - withName: call_sSNV_Strelka2 { - cpus = 8 - memory = 2.GB - retry_strategy { - memory { - strategy = 'add' - operand = 12.GB + withName: call_sSNV_Strelka2 { + cpus = 8 + memory = 2.GB + retry_strategy { + memory { + strategy = 'add' + operand = 12.GB + } } } - } - withName: call_sSNV_Mutect2 { - cpus = 1 - memory = 2.GB - retry_strategy { - memory { - strategy = 'add' - operand = 2.GB + withName: call_sSNV_Mutect2 { + cpus = 1 + memory = 2.GB + retry_strategy { + memory { + strategy = 'add' + operand = 2.GB + } } } - } - withName: run_LearnReadOrientationModel_GATK { - cpus = 1 - memory = 12.GB - retry_strategy { - memory { - strategy = 'add' - operand = 20.GB + withName: run_LearnReadOrientationModel_GATK { + cpus = 1 + memory = 12.GB + retry_strategy { + memory { + strategy = 'add' + operand = 20.GB + } } } - } - withName: call_sSNV_MuSE { - cpus = 12 - memory = 48.GB - retry_strategy { - memory { - strategy = 'add' - operand = 16.GB + withName: call_sSNV_MuSE { + cpus = 12 + memory = 48.GB + retry_strategy { + memory { + strategy = 'add' + operand = 16.GB + } } } - } - withName: run_sump_MuSE { - cpus = 12 - memory = 18.GB - retry_strategy { - memory { - strategy = 'add' - operand = 16.GB + withName: run_sump_MuSE { + cpus = 12 + memory = 18.GB + retry_strategy { + memory { + strategy = 'add' + operand = 16.GB + } } } } withName: plot_VennDiagram_R { - cpus = 2 - memory = 5.GB + cpus = 1 + memory = 1.GB retry_strategy { memory { strategy = 'add' @@ -107,8 +109,8 @@ process { } } withName: concat_VCFs_BCFtools { - cpus = 2 - memory = 5.GB + cpus = 1 + memory = 1.GB retry_strategy { memory { strategy = 'add' diff --git a/config/F72.config b/config/F72.config index df37d16f..0ee916ca 100644 --- a/config/F72.config +++ b/config/F72.config @@ -6,99 +6,101 @@ process { cpus = 1 memory = 1.GB } - withName: call_sSNV_SomaticSniper { - cpus = 1 - memory = 2.GB - retry_strategy { - memory { - strategy = 'add' - operand = 5.GB + if (params.input_type == 'bam') { + withName: call_sSNV_SomaticSniper { + cpus = 1 + memory = 2.GB + retry_strategy { + memory { + strategy = 'add' + operand = 5.GB + } } } - } - withName: convert_BAM2Pileup_SAMtools { - cpus = 1 - memory = 2.GB - retry_strategy { - memory { - strategy = 'add' - operand = 16.GB + withName: convert_BAM2Pileup_SAMtools { + cpus = 1 + memory = 2.GB + retry_strategy { + memory { + strategy = 'add' + operand = 16.GB + } } } - } - withName: create_IndelCandidate_SAMtools { - cpus = 1 - memory = 1.GB - retry_strategy { - memory { - strategy = 'add' - operand = 5.GB + withName: create_IndelCandidate_SAMtools { + cpus = 1 + memory = 1.GB + retry_strategy { + memory { + strategy = 'add' + operand = 5.GB + } } } - } - withName: call_sIndel_Manta { - cpus = 8 - memory = 6.GB - retry_strategy { - memory { - strategy = 'add' - operand = 5.GB + withName: call_sIndel_Manta { + cpus = 8 + memory = 6.GB + retry_strategy { + memory { + strategy = 'add' + operand = 5.GB + } } } - } - withName: call_sSNV_Strelka2 { - cpus = 8 - memory = 2.GB - retry_strategy { - memory { - strategy = 'add' - operand = 12.GB + withName: call_sSNV_Strelka2 { + cpus = 8 + memory = 2.GB + retry_strategy { + memory { + strategy = 'add' + operand = 12.GB + } } } - } - withName: call_sSNV_Mutect2 { - cpus = 1 - memory = 3.GB - retry_strategy { - memory { - strategy = 'add' - operand = 3.GB + withName: call_sSNV_Mutect2 { + cpus = 1 + memory = 3.GB + retry_strategy { + memory { + strategy = 'add' + operand = 3.GB + } } } - } - withName: run_LearnReadOrientationModel_GATK { - cpus = 1 - memory = 12.GB - retry_strategy { - memory { - strategy = 'add' - operand = 20.GB + withName: run_LearnReadOrientationModel_GATK { + cpus = 1 + memory = 12.GB + retry_strategy { + memory { + strategy = 'add' + operand = 20.GB + } } } - } - withName: call_sSNV_MuSE { - cpus = 12 - memory = 60.GB - retry_strategy { - memory { - strategy = 'add' - operand = 20.GB + withName: call_sSNV_MuSE { + cpus = 12 + memory = 60.GB + retry_strategy { + memory { + strategy = 'add' + operand = 20.GB + } } } - } - withName: run_sump_MuSE { - cpus = 12 - memory = 18.GB - retry_strategy { - memory { - strategy = 'add' - operand = 24.GB + withName: run_sump_MuSE { + cpus = 12 + memory = 18.GB + retry_strategy { + memory { + strategy = 'add' + operand = 24.GB + } } } } withName: plot_VennDiagram_R { - cpus = 2 - memory = 5.GB + cpus = 1 + memory = 1.GB retry_strategy { memory { strategy = 'add' @@ -107,8 +109,8 @@ process { } } withName: concat_VCFs_BCFtools { - cpus = 2 - memory = 5.GB + cpus = 1 + memory = 1.GB retry_strategy { memory { strategy = 'add' diff --git a/config/F8.config b/config/F8.config index 91721c3f..0ea30b4c 100644 --- a/config/F8.config +++ b/config/F8.config @@ -6,99 +6,101 @@ process { cpus = 1 memory = 1.GB } - withName: call_sSNV_SomaticSniper { - cpus = 1 - memory = 1.GB - retry_strategy { - memory { - strategy = 'add' - operand = 2.GB + if (params.input_type == 'bam') { + withName: call_sSNV_SomaticSniper { + cpus = 1 + memory = 1.GB + retry_strategy { + memory { + strategy = 'add' + operand = 2.GB + } } } - } - withName: convert_BAM2Pileup_SAMtools { - cpus = 1 - memory = 1.GB - retry_strategy { - memory { - strategy = 'add' - operand = 2.GB + withName: convert_BAM2Pileup_SAMtools { + cpus = 1 + memory = 1.GB + retry_strategy { + memory { + strategy = 'add' + operand = 2.GB + } } } - } - withName: create_IndelCandidate_SAMtools { - cpus = 1 - memory = 1.GB - retry_strategy { - memory { - strategy = 'add' - operand = 2.GB + withName: create_IndelCandidate_SAMtools { + cpus = 1 + memory = 1.GB + retry_strategy { + memory { + strategy = 'add' + operand = 2.GB + } } } - } - withName: call_sIndel_Manta { - cpus = 4 - memory = 3.GB - retry_strategy { - memory { - strategy = 'add' - operand = 3.GB + withName: call_sIndel_Manta { + cpus = 4 + memory = 3.GB + retry_strategy { + memory { + strategy = 'add' + operand = 3.GB + } } } - } - withName: call_sSNV_Strelka2 { - cpus = 4 - memory = 2.GB - retry_strategy { - memory { - strategy = 'add' - operand = 2.GB + withName: call_sSNV_Strelka2 { + cpus = 4 + memory = 2.GB + retry_strategy { + memory { + strategy = 'add' + operand = 2.GB + } } } - } - withName: call_sSNV_Mutect2 { - cpus = 1 - memory = 3.GB - retry_strategy { - memory { - strategy = 'add' - operand = 2.GB + withName: call_sSNV_Mutect2 { + cpus = 1 + memory = 3.GB + retry_strategy { + memory { + strategy = 'add' + operand = 2.GB + } } } - } - withName: run_LearnReadOrientationModel_GATK { - cpus = 1 - memory = 8.GB - retry_strategy { - memory { - strategy = 'exponential' - operand = 2 + withName: run_LearnReadOrientationModel_GATK { + cpus = 1 + memory = 8.GB + retry_strategy { + memory { + strategy = 'exponential' + operand = 2 + } } } - } - withName: call_sSNV_MuSE { - cpus = 4 - memory = 10.GB - retry_strategy { - memory { - strategy = 'add' - operand = 6.GB + withName: call_sSNV_MuSE { + cpus = 4 + memory = 10.GB + retry_strategy { + memory { + strategy = 'add' + operand = 6.GB + } } } - } - withName: run_sump_MuSE { - cpus = 4 - memory = 12.GB - retry_strategy { - memory { - strategy = 'add' - operand = 4.GB + withName: run_sump_MuSE { + cpus = 4 + memory = 12.GB + retry_strategy { + memory { + strategy = 'add' + operand = 4.GB + } } } } withName: plot_VennDiagram_R { - cpus = 2 - memory = 5.GB + cpus = 1 + memory = 1.GB retry_strategy { memory { strategy = 'add' @@ -107,8 +109,8 @@ process { } } withName: concat_VCFs_BCFtools { - cpus = 2 - memory = 5.GB + cpus = 1 + memory = 1.GB retry_strategy { memory { strategy = 'add' diff --git a/config/M64.config b/config/M64.config index 8631270e..57b902cc 100644 --- a/config/M64.config +++ b/config/M64.config @@ -6,91 +6,93 @@ process { cpus = 1 memory = 1.GB } - withName: call_sSNV_SomaticSniper { - cpus = 1 - memory = 316.GB - } - withName: convert_BAM2Pileup_SAMtools { - cpus = 1 - memory = 316.GB - } - withName: create_IndelCandidate_SAMtools { - cpus = 1 - memory = 316.GB - } - withName: call_sIndel_Manta { - cpus = 36 - memory = 15.GB - retry_strategy { - memory { - strategy = 'add' - operand = 5.GB + if (params.input_type == 'bam') { + withName: call_sSNV_SomaticSniper { + cpus = 1 + memory = 316.GB + } + withName: convert_BAM2Pileup_SAMtools { + cpus = 1 + memory = 316.GB + } + withName: create_IndelCandidate_SAMtools { + cpus = 1 + memory = 316.GB + } + withName: call_sIndel_Manta { + cpus = 36 + memory = 15.GB + retry_strategy { + memory { + strategy = 'add' + operand = 5.GB + } } } - } - withName: call_sSNV_Strelka2 { - cpus = 36 - memory = 10.GB - retry_strategy { - memory { - strategy = 'add' - operand = 5.GB + withName: call_sSNV_Strelka2 { + cpus = 36 + memory = 10.GB + retry_strategy { + memory { + strategy = 'add' + operand = 5.GB + } } } - } - withName: call_sSNV_Mutect2 { - cpus = 2 - memory = 5.GB - retry_strategy { - memory { - strategy = 'add' - operand = 5.GB + withName: call_sSNV_Mutect2 { + cpus = 2 + memory = 5.GB + retry_strategy { + memory { + strategy = 'add' + operand = 5.GB + } } } - } - withName: run_LearnReadOrientationModel_GATK { - cpus = 4 - memory = 8.GB - retry_strategy { - memory { - strategy = 'exponential' - operand = 2 + withName: run_LearnReadOrientationModel_GATK { + cpus = 4 + memory = 8.GB + retry_strategy { + memory { + strategy = 'exponential' + operand = 2 + } } } - } - withName: call_sSNV_MuSE { - cpus = 16 - memory = 128.GB - retry_strategy { - memory { - strategy = 'add' - operand = 10.GB + withName: call_sSNV_MuSE { + cpus = 16 + memory = 128.GB + retry_strategy { + memory { + strategy = 'add' + operand = 10.GB + } } } - } - withName: run_sump_MuSE { - cpus = 2 - memory = 128.GB - retry_strategy { - memory { - strategy = 'add' - operand = 10.GB + withName: run_sump_MuSE { + cpus = 2 + memory = 128.GB + retry_strategy { + memory { + strategy = 'add' + operand = 10.GB + } } } } - withName: plot_VennDiagram_R { - cpus = 2 - memory = 5.GB - retry_strategy { - memory { - strategy = 'add' - operand = 10.GB - } + withName: plot_VennDiagram_R { + cpus = 1 + memory = 1.GB + retry_strategy { + memory { + strategy = 'add' + operand = 10.GB } } + } withName: concat_VCFs_BCFtools { - cpus = 2 - memory = 5.GB + cpus = 1 + memory = 1.GB retry_strategy { memory { strategy = 'add' diff --git a/config/base.config b/config/base.config index cfa3ca24..1f8ef8b6 100644 --- a/config/base.config +++ b/config/base.config @@ -2,8 +2,10 @@ process { cpus = { methods.check_limits( 1 * task.attempt, 'cpus' ) } commonRetryCodes = [104, 134, 137, 139, 143, 247] // Common out-of-memory error codes - withName: 'call_sSNV_Strelka2' { - ext.retry_codes = [1] // call_sSNV_Strelka2 doesn't differentiate memory errors + if (params.input_type == 'bam') { + withName: 'call_sSNV_Strelka2' { + ext.retry_codes = [1] // call_sSNV_Strelka2 doesn't differentiate memory errors + } } errorStrategy = { task.exitStatus in (((task?.ext?.retry_codes) ? task.ext.retry_codes : []) + process.commonRetryCodes) ? 'retry' : 'terminate' } diff --git a/config/custom_schema_types.config b/config/custom_schema_types.config index 3a2c30ce..d7961f53 100644 --- a/config/custom_schema_types.config +++ b/config/custom_schema_types.config @@ -2,9 +2,13 @@ * This custom schema namespace implements a custom type for checking input BAMs as a list of Maps. */ custom_schema_types { - allowed_sample_types = [ + allowed_input_types = [ 'normal', - 'tumor' + 'tumor', + 'muse', + 'mutect2', + 'somaticsniper', + 'strelka2' ] allowed_resource_types = [ 'memory', @@ -14,7 +18,7 @@ custom_schema_types { /** * Check that input types are in allowed list */ - check_sample_type_keys = { List given, String name, List choices=custom_schema_types.allowed_sample_types -> + check_input_type_keys = { List given, String name, List choices=custom_schema_types.allowed_input_types -> for (elem in given) { if (!(elem in choices)) { throw new Exception("Invalid paramter ${name}. Valid types: ${choices}.") @@ -80,7 +84,38 @@ custom_schema_types { // Check parameters keys custom_schema_types.check_if_namespace(options[name], name) def given_keys = options[name].keySet() as ArrayList - custom_schema_types.check_sample_type_keys(given_keys, name) + custom_schema_types.check_input_type_keys(given_keys, name) + // Perform input presence and exclusivity check + def bam_given = options[name].containsKey('normal') || options[name].containsKey('tumor') + def vcf_given = options[name].containsKey('muse') || options[name].containsKey('mutect2') || + options[name].containsKey('somaticsniper') || options[name].containsKey('strelka2') + + if (!bam_given && !vcf_given) { + throw new Exception("At least one input type (BAM or VCF) must be provided in ${name}.") + } + + if (bam_given && vcf_given) { + throw new Exception("Only one input type (either BAM or VCF) should be provided in ${name}.") + } + if (bam_given) { + params.input_type = 'bam' + } else { + params.input_type = 'vcf' + params.sample_id = params.tumor_id + } + + // If VCFs are given, check for a minimum of 2 VCF files + if (vcf_given) { + def vcf_count = 0 + ['muse', 'mutect2', 'somaticsniper', 'strelka2'].each { vcf_type -> + if (options[name].containsKey(vcf_type)) { + vcf_count++ + } + } + if (vcf_count < 2) { + throw new Exception("At least 2 VCF files should be provided in ${name}.") + } + } options[name].each { entry -> def entry_as_map = [:] @@ -98,7 +133,7 @@ custom_schema_types { if (given_keys.size() <= 0) { return } - custom_schema_types.check_sample_type_keys(given_keys, name, custom_schema_types.allowed_resource_types) + custom_schema_types.check_input_type_keys(given_keys, name, custom_schema_types.allowed_resource_types) options[name].each { entry -> def entry_as_map = [:] diff --git a/config/default.config b/config/default.config index 64fee4f2..c43652a1 100644 --- a/config/default.config +++ b/config/default.config @@ -5,6 +5,7 @@ params { ucla_cds = true cache_intermediate_pipeline_steps = false + keep_input_prefix = false //max_number_of_parallel_jobs = 1 max_cpus = SysHelper.getAvailCpus() diff --git a/config/methods.config b/config/methods.config index c19133cd..8d5d3bc7 100644 --- a/config/methods.config +++ b/config/methods.config @@ -53,6 +53,19 @@ methods { } } + get_vcfs_to_process = { + params.tumor_id = methods.sanitize_string(params.input_tumor_id) + params.sample_id = params.tumor_id + params.normal_id = methods.sanitize_string(params.input_normal_id) + params.samples_to_process = [] as Set + params.input.each { k, v -> + params.samples_to_process.add([ + 'path': v, + 'algorithm': k] + ) + } + } + set_sample_params = { params.single_NT_paired = false def tumor_ids = params.samples_to_process.findAll { it['sample_type'] == 'tumor' }['id'] @@ -71,17 +84,6 @@ methods { } } - set_intersect_regions_params = { - if (params.containsKey("intersect_regions") && params.intersect_regions) { - params.intersect_regions_index = "${params.intersect_regions}.tbi" - params.use_intersect_regions = true - } else { - params.intersect_regions = "${params.work_dir}/NO_FILE.bed" - params.intersect_regions_index = "${params.work_dir}/NO_FILE.bed.tbi" - params.use_intersect_regions = false - } - } - set_mutect2_params = { if (params.containsKey("germline_resource_gnomad_vcf") && params.germline_resource_gnomad_vcf) { params.germline = true @@ -92,6 +94,15 @@ methods { params.germline_resource_gnomad_vcf_index = "${params.germline_resource_gnomad_vcf}.tbi" } + check_valid_algorithms = { + valid_algorithms = params.single_NT_paired ? ['somaticsniper', 'strelka2', 'mutect2', 'muse'] : ['mutect2'] + for (algo in params.algorithm) { + if (!(algo in valid_algorithms)) { + throw new Exception("ERROR: params.algorithm ${params.algorithm} contains an invalid value. Valid algorithms for given inputs: ${valid_algorithms}") + } + } + } + set_output_directory = { def tz = TimeZone.getTimeZone("UTC") def date = new Date().format("yyyyMMdd'T'HHmmss'Z'", tz) @@ -99,6 +110,17 @@ methods { params.log_output_dir = "${params.output_dir_base}/log-${manifest.name}-${manifest.version}-${date}" } + set_intersect_regions_params = { + if (params.containsKey("intersect_regions") && params.intersect_regions) { + params.intersect_regions_index = "${params.intersect_regions}.tbi" + params.use_intersect_regions = true + } else { + params.intersect_regions = "${params.work_dir}/NO_FILE.bed" + params.intersect_regions_index = "${params.work_dir}/NO_FILE.bed.tbi" + params.use_intersect_regions = false + } + } + set_pipeline_log = { trace.enabled = true trace.file = "${params.log_output_dir}/nextflow-log/trace.txt" @@ -110,30 +132,25 @@ methods { report.file = "${params.log_output_dir}/nextflow-log/report.html" } - check_valid_algorithms = { - valid_algorithms = params.single_NT_paired ? ['somaticsniper', 'strelka2', 'mutect2', 'muse'] : ['mutect2'] - for (algo in params.algorithm) { - if (!(algo in valid_algorithms)) { - throw new Exception("ERROR: params.algorithm ${params.algorithm} contains an invalid value. Valid algorithms for given inputs: ${valid_algorithms}") - } - } - } - setup = { schema.load_custom_types("${projectDir}/config/custom_schema_types.config") schema.validate() + if (params.input_type == 'bam') { + methods.get_ids_from_bams() + methods.set_sample_params() + methods.set_mutect2_params() + methods.check_valid_algorithms() + } else { + methods.get_vcfs_to_process() + } methods.set_process() methods.set_resources_allocation() methods.modify_base_allocations() retry.setup_retry() methods.set_env() - methods.get_ids_from_bams() - methods.set_sample_params() - methods.set_intersect_regions_params() - methods.set_mutect2_params() methods.set_output_directory() + methods.set_intersect_regions_params() methods.set_pipeline_log() - methods.check_valid_algorithms() methods.setup_docker_cpus() } } diff --git a/config/schema.yaml b/config/schema.yaml index 57b0dcb7..b8f248fd 100644 --- a/config/schema.yaml +++ b/config/schema.yaml @@ -112,11 +112,11 @@ base_resource_update: input: type: 'InputNamespace' required: true - help: 'Input samples' + help: 'Input to process' elements: tumor: type: 'BAMEntryList' - required: true + required: false help: 'Tumor id/path input' elements: BAM: @@ -139,3 +139,23 @@ input: mode: 'r' required: true help: 'Absolute path to normal sample BAM files' + muse: + type: 'Path' + mode: 'r' + required: false + help: 'Absolute path to muse VCF file' + mutect2: + type: 'Path' + mode: 'r' + required: false + help: 'Absolute path to mutect2 VCF file' + somaticsniper: + type: 'Path' + mode: 'r' + required: false + help: 'Absolute path to somaticsniper VCF file' + strelka2: + type: 'Path' + mode: 'r' + required: false + help: 'Absolute path to strelka2 VCF file' diff --git a/input/call-sSNV-template-VCF.yaml b/input/call-sSNV-template-VCF.yaml new file mode 100644 index 00000000..0a7d15c9 --- /dev/null +++ b/input/call-sSNV-template-VCF.yaml @@ -0,0 +1,9 @@ +--- +patient_id: 'patient_id' +input_tumor_id: 'tumor_id' # tumor ID in the VCF files must match this or 'TUMOR' +input_normal_id: 'normal_id' # normal ID in the VCF files must match this or 'NORMAL' +input: + muse: /path/to/muse.vcf.gz + mutect2: /path/to/mutect2.vcf.gz + somaticsniper: /path/to/somaticsniper.vcf.gz + strelka2: /path/to/strelka2.vcf.gz diff --git a/main.nf b/main.nf index 8865f885..51a049d3 100755 --- a/main.nf +++ b/main.nf @@ -49,55 +49,105 @@ log.info """\ normal_out: ${params.samples_to_process.findAll{ it.sample_type == 'normal' }['id']} """ -if (params.max_cpus < 8 || params.max_memory < 16) { - if (params.algorithm.contains('muse') || params.algorithm.contains('mutect2')) { - throw new Exception( - "Insufficient resources: ${params.max_cpus} CPUs and ${params.max_memory} of memory." + - " To run Mutect2 this pipeline requires at least 8 CPUs and 16 GB of memory." + - " To run MuSE this pipeline requires at least 16 CPUs and 32 GB of memory." - ) +params.reference_index = "${params.reference}.fai" +params.reference_dict = "${file(params.reference).parent / file(params.reference).baseName}.dict" + +if (params.input_type == 'bam') { + if (params.max_cpus < 8 || params.max_memory < 16) { + if (params.algorithm.contains('muse') || params.algorithm.contains('mutect2')) { + throw new Exception( + "Insufficient resources: ${params.max_cpus} CPUs and ${params.max_memory} of memory." + + " To run Mutect2 this pipeline requires at least 8 CPUs and 16 GB of memory." + + " To run MuSE this pipeline requires at least 16 CPUs and 32 GB of memory." + ) + } } - } -else if (params.max_cpus < 16 || params.max_memory < 32) { - if (params.algorithm.contains('muse')) { - throw new Exception( - "Insufficient resources: ${params.max_cpus} CPUs and ${params.max_memory} of memory." + - " To run MuSE this pipeline requires at least 16 CPUs and 32 GB of memory." - ) + else if (params.max_cpus < 16 || params.max_memory < 32) { + if (params.algorithm.contains('muse')) { + throw new Exception( + "Insufficient resources: ${params.max_cpus} CPUs and ${params.max_memory} of memory." + + " To run MuSE this pipeline requires at least 16 CPUs and 32 GB of memory." + ) + } } - } -params.reference_index = "${params.reference}.fai" -params.reference_dict = "${file(params.reference).parent / file(params.reference).baseName}.dict" + include { somaticsniper } from './module/somaticsniper' addParams( + workflow_output_dir: "${params.output_dir_base}/SomaticSniper-${params.somaticsniper_version}", + workflow_log_output_dir: "${params.log_output_dir}/process-log/SomaticSniper-${params.somaticsniper_version}", + output_filename: generate_standard_filename("SomaticSniper-${params.somaticsniper_version}", + params.dataset_id, + params.sample_id, + [:])) + include { strelka2 } from './module/strelka2' addParams( + workflow_output_dir: "${params.output_dir_base}/Strelka2-${params.strelka2_version}", + workflow_log_output_dir: "${params.log_output_dir}/process-log/Strelka2-${params.strelka2_version}", + output_filename: generate_standard_filename("Strelka2-${params.strelka2_version}", + params.dataset_id, + params.sample_id, + [:])) + include { mutect2 } from './module/mutect2' addParams( + workflow_output_dir: "${params.output_dir_base}/Mutect2-${params.GATK_version}", + workflow_log_output_dir: "${params.log_output_dir}/process-log/Mutect2-${params.GATK_version}", + output_filename: generate_standard_filename("Mutect2-${params.GATK_version}", + params.dataset_id, + params.sample_id, + [:])) + include { muse } from './module/muse' addParams( + workflow_output_dir: "${params.output_dir_base}/MuSE-${params.MuSE_version}", + workflow_log_output_dir: "${params.log_output_dir}/process-log/MuSE-${params.MuSE_version}", + output_filename: generate_standard_filename("MuSE-${params.MuSE_version}", + params.dataset_id, + params.sample_id, + [:])) -include { somaticsniper } from './module/somaticsniper' addParams( - workflow_output_dir: "${params.output_dir_base}/SomaticSniper-${params.somaticsniper_version}", - workflow_log_output_dir: "${params.log_output_dir}/process-log/SomaticSniper-${params.somaticsniper_version}", - output_filename: generate_standard_filename("SomaticSniper-${params.somaticsniper_version}", - params.dataset_id, - params.sample_id, - [:])) -include { strelka2 } from './module/strelka2' addParams( - workflow_output_dir: "${params.output_dir_base}/Strelka2-${params.strelka2_version}", - workflow_log_output_dir: "${params.log_output_dir}/process-log/Strelka2-${params.strelka2_version}", - output_filename: generate_standard_filename("Strelka2-${params.strelka2_version}", - params.dataset_id, - params.sample_id, - [:])) -include { mutect2 } from './module/mutect2' addParams( - workflow_output_dir: "${params.output_dir_base}/Mutect2-${params.GATK_version}", - workflow_log_output_dir: "${params.log_output_dir}/process-log/Mutect2-${params.GATK_version}", - output_filename: generate_standard_filename("Mutect2-${params.GATK_version}", - params.dataset_id, - params.sample_id, - [:])) -include { muse } from './module/muse' addParams( - workflow_output_dir: "${params.output_dir_base}/MuSE-${params.MuSE_version}", - workflow_log_output_dir: "${params.log_output_dir}/process-log/MuSE-${params.MuSE_version}", - output_filename: generate_standard_filename("MuSE-${params.MuSE_version}", + Channel + .from( params.samples_to_process ) + .filter{ it.sample_type == 'tumor' } + .multiMap{ it -> + tumor_bam: it['path'] + tumor_index: indexFile(it['path']) + contamination_est: it['contamination_table'] + } + .set { tumor_input_chs } + + Channel + .from( params.samples_to_process ) + .filter{ it.sample_type == 'normal' } + .ifEmpty(['path': "${params.work_dir}/NO_FILE.bam"]) + .multiMap{ it -> + normal_bam: it['path'] + normal_index: indexFile(it['path']) + } + .set { normal_input_chs } + + // Set empty channels so any unused tools don't cause failure at intersect step + Channel.empty().set { somaticsniper_gzvcf_ch } + Channel.empty().set { strelka2_gzvcf_ch } + Channel.empty().set { muse_gzvcf_ch } + Channel.empty().set { mutect2_gzvcf_ch } + + Channel.empty().set { somaticsniper_idx_ch } + Channel.empty().set { strelka2_idx_ch } + Channel.empty().set { muse_idx_ch } + Channel.empty().set { mutect2_idx_ch } + +} else if (params.input_type == 'vcf') { + include { process_vcfs } from './module/process-vcfs' addParams( + workflow_output_dir: "${params.output_dir_base}/Intersect-BCFtools-${params.BCFtools_version}", + workflow_log_output_dir: "${params.log_output_dir}/process-log/Intersect-BCFtools-${params.BCFtools_version}", + output_filename: generate_standard_filename("BCFtools-${params.BCFtools_version}", params.dataset_id, params.sample_id, - [:])) + [:]), + ) + + Channel + .fromList(params.samples_to_process) + .map { vcf -> + return tuple(vcf.path, indexFile(vcf.path), vcf.algorithm) + } + .set { samplesToProcess_ch } + } include { intersect } from './module/intersect' addParams( workflow_output_dir: "${params.output_dir_base}/Intersect-BCFtools-${params.BCFtools_version}", @@ -107,33 +157,12 @@ include { intersect } from './module/intersect' addParams( params.sample_id, [:])) -Channel - .from( params.samples_to_process ) - .filter{ it.sample_type == 'tumor' } - .multiMap{ it -> - tumor_bam: it['path'] - tumor_index: indexFile(it['path']) - contamination_est: it['contamination_table'] - } - .set { tumor_input_chs } - -Channel - .from( params.samples_to_process ) - .filter{ it.sample_type == 'normal' } - .ifEmpty(['path': "${params.work_dir}/NO_FILE.bam"]) - .multiMap{ it -> - normal_bam: it['path'] - normal_index: indexFile(it['path']) - } - .set { normal_input_chs } - script_dir_ch = Channel.fromPath( "$projectDir/r-scripts", checkIfExists: true ) workflow { - // Input file validation reference_ch = Channel.from( params.reference, params.reference_index, @@ -145,90 +174,85 @@ workflow { params.intersect_regions_index ) - files_to_validate_ch = reference_ch - .mix(intersect_regions_ch) - .mix(tumor_input_chs.tumor_bam, tumor_input_chs.tumor_index) - - if (params.samples_to_process.findAll{ it.sample_type == 'normal' }.size() > 0) { - files_to_validate_ch = files_to_validate_ch - .mix(normal_input_chs.normal_bam, normal_input_chs.normal_index) - } + if (params.input_type == 'bam') { + files_to_validate_ch = reference_ch + .mix(intersect_regions_ch) + .mix(tumor_input_chs.tumor_bam, tumor_input_chs.tumor_index) - run_validate_PipeVal(files_to_validate_ch) - run_validate_PipeVal.out.validation_result.collectFile( - name: 'input_validation.txt', newLine: true, - storeDir: "${params.output_dir_base}/validation" - ) - - // Set empty channels so any unused tools don't cause failure at intersect step - Channel.empty().set { somaticsniper_gzvcf_ch } - Channel.empty().set { strelka2_gzvcf_ch } - Channel.empty().set { mutect2_gzvcf_ch } - Channel.empty().set { muse_gzvcf_ch } + if (params.samples_to_process.findAll{ it.sample_type == 'normal' }.size() > 0) { + files_to_validate_ch = files_to_validate_ch + .mix(normal_input_chs.normal_bam, normal_input_chs.normal_index) + } - Channel.empty().set { somaticsniper_idx_ch } - Channel.empty().set { strelka2_idx_ch } - Channel.empty().set { mutect2_idx_ch } - Channel.empty().set { muse_idx_ch } + run_validate_PipeVal(files_to_validate_ch) + run_validate_PipeVal.out.validation_result.collectFile( + name: 'input_validation.txt', newLine: true, + storeDir: "${params.output_dir_base}/validation" + ) - if ('somaticsniper' in params.algorithm) { - somaticsniper( - tumor_input_chs.tumor_bam, - tumor_input_chs.tumor_index, - normal_input_chs.normal_bam, - normal_input_chs.normal_index + if ('somaticsniper' in params.algorithm) { + somaticsniper( + tumor_input_chs.tumor_bam, + tumor_input_chs.tumor_index, + normal_input_chs.normal_bam, + normal_input_chs.normal_index ) somaticsniper.out.gzvcf.set { somaticsniper_gzvcf_ch } somaticsniper.out.idx.set { somaticsniper_idx_ch } - } - if ('strelka2' in params.algorithm) { - strelka2( - tumor_input_chs.tumor_bam, - tumor_input_chs.tumor_index, - normal_input_chs.normal_bam, - normal_input_chs.normal_index + } + if ('strelka2' in params.algorithm) { + strelka2( + tumor_input_chs.tumor_bam, + tumor_input_chs.tumor_index, + normal_input_chs.normal_bam, + normal_input_chs.normal_index ) strelka2.out.gzvcf.set { strelka2_gzvcf_ch } strelka2.out.idx.set { strelka2_idx_ch } - } - if ('muse' in params.algorithm) { - muse( - tumor_input_chs.tumor_bam, - tumor_input_chs.tumor_index, - normal_input_chs.normal_bam, - normal_input_chs.normal_index + } + if ('muse' in params.algorithm) { + muse( + tumor_input_chs.tumor_bam, + tumor_input_chs.tumor_index, + normal_input_chs.normal_bam, + normal_input_chs.normal_index ) muse.out.gzvcf.set { muse_gzvcf_ch } muse.out.idx.set { muse_idx_ch } - } - if ('mutect2' in params.algorithm) { - mutect2( - tumor_input_chs.tumor_bam.collect(), - tumor_input_chs.tumor_index.collect(), - normal_input_chs.normal_bam.collect(), - normal_input_chs.normal_index.collect(), - tumor_input_chs.contamination_est.collect() + } + if ('mutect2' in params.algorithm) { + mutect2( + tumor_input_chs.tumor_bam.collect(), + tumor_input_chs.tumor_index.collect(), + normal_input_chs.normal_bam.collect(), + normal_input_chs.normal_index.collect(), + tumor_input_chs.contamination_est.collect() ) mutect2.out.gzvcf.set { mutect2_gzvcf_ch } mutect2.out.idx.set { mutect2_idx_ch } + } + // Intersect all vcf files + if (params.algorithm.size() > 1) { + tool_gzvcfs = (somaticsniper_gzvcf_ch + .mix(strelka2_gzvcf_ch) + .mix(mutect2_gzvcf_ch) + .mix(muse_gzvcf_ch)) + .collect() + tool_indices = (somaticsniper_idx_ch + .mix(strelka2_idx_ch) + .mix(mutect2_idx_ch) + .mix(muse_idx_ch)) + .collect() + } + } else if (params.input_type == 'vcf') { + process_vcfs(samplesToProcess_ch) + process_vcfs.out.gzvcf.set { tool_gzvcfs } + process_vcfs.out.idx.set { tool_indices } } - - // Intersect all vcf files - if (params.algorithm.size() > 1) { - tool_gzvcfs = (somaticsniper_gzvcf_ch - .mix(strelka2_gzvcf_ch) - .mix(mutect2_gzvcf_ch) - .mix(muse_gzvcf_ch)) - .collect() - tool_indices = (somaticsniper_idx_ch - .mix(strelka2_idx_ch) - .mix(mutect2_idx_ch) - .mix(muse_idx_ch)) - .collect() - intersect( - tool_gzvcfs, - tool_indices, - script_dir_ch, - ) - } + intersect( + tool_gzvcfs, + tool_indices, + script_dir_ch, + ) } + diff --git a/module/common.nf b/module/common.nf index d5eaad31..e7d9f30b 100644 --- a/module/common.nf +++ b/module/common.nf @@ -57,6 +57,44 @@ process generate_sha512sum { """ } +process split_VCF_BCFtools { + container params.docker_image_BCFtools + publishDir path: "${params.workflow_output_dir}/intermediate/${task.process.split(':')[-1]}", + mode: "copy", + pattern: "*.vcf.gz" + publishDir path: "${params.workflow_log_output_dir}", + mode: "copy", + pattern: ".command.*", + saveAs: { "${task.process.split(':')[-1]}_${var_type}/log${file(it).getName()}" } + + input: + path vcf + each var_type + + output: + tuple val(var_type), path("*.vcf.gz"), emit: gzvcf + path ".command.*" + + script: + if (params.keep_input_prefix) { + output_filename = vcf.getName() + .replace("_all-pass.vcf.gz", "") + .replace("_SNV-pass.vcf.gz", "") + .replace("_hc.vcf.gz", "") + .replace(".vcf.gz", "") + } else { + output_filename = "${params.output_filename}" + } + """ + set -euo pipefail + bcftools view \ + --types $var_type \ + --output-type z \ + --output ${output_filename}_${var_type.replace('snps', 'SNV').replace('indels', 'Indel').replace('mnps', 'MNV')}-split.vcf.gz \ + ${vcf} + """ + } + process rename_samples_BCFtools { container params.docker_image_BCFtools publishDir path: "${params.workflow_output_dir}/output", @@ -82,6 +120,17 @@ process rename_samples_BCFtools { header_replacements = ids .collect { "sed 's/\t${it['orig_id']}/\t${it['id']}/g'" } .join(" | ") + if (params.keep_input_prefix) { + output_filename = vcf.getName() + .replace("_SNV-pass.vcf.gz", "") + .replace("_hc.vcf.gz", "") + .replace("_SNV-split.vcf.gz", "") + .replace("_Indel-split.vcf.gz", "") + .replace("_MNV-split.vcf.gz", "") + .replace(".vcf.gz", "") + } else { + output_filename = "${params.output_filename}" + } """ set -euo pipefail @@ -90,7 +139,7 @@ process rename_samples_BCFtools { bcftools reheader \ --header tmp.fixed.header \ - --output ${params.output_filename}_${var_type.replace('snps', 'SNV').replace('indels', 'Indel').replace('mnps', 'MNV')}.vcf.gz \ + --output ${output_filename}_${var_type.replace('snps', 'SNV').replace('indels', 'Indel').replace('mnps', 'MNV')}.vcf.gz \ ${vcf} """ } diff --git a/module/intersect.nf b/module/intersect.nf index 7cb9870c..e13e148c 100644 --- a/module/intersect.nf +++ b/module/intersect.nf @@ -1,5 +1,4 @@ -include { generate_sha512sum } from './common' -include { compress_file_bzip2} from './common' addParams( +include { compress_file_bzip2; generate_sha512sum} from './common' addParams( compress_publishdir : "${params.workflow_output_dir}/output", compress_enabled : true ) diff --git a/module/mutect2-processes.nf b/module/mutect2-processes.nf index 207c0104..5a197060 100644 --- a/module/mutect2-processes.nf +++ b/module/mutect2-processes.nf @@ -233,32 +233,3 @@ process run_FilterMutectCalls_GATK { ${params.filter_mutect_calls_extra_args} """ } - -process split_VCF_BCFtools { - container params.docker_image_BCFtools - publishDir path: "${params.workflow_output_dir}/intermediate/${task.process.split(':')[-1]}", - mode: "copy", - pattern: "*.vcf.gz" - publishDir path: "${params.workflow_log_output_dir}", - mode: "copy", - pattern: ".command.*", - saveAs: { "${task.process.split(':')[-1]}_${var_type}/log${file(it).getName()}" } - - input: - path vcf - each var_type - - output: - tuple val(var_type), path("*.vcf.gz"), emit: gzvcf - path ".command.*" - - script: - """ - set -euo pipefail - bcftools view \ - --types $var_type \ - --output-type z \ - --output ${params.output_filename}_${var_type.replace('snps', 'SNV').replace('indels', 'Indel').replace('mnps', 'MNV')}-split.vcf.gz \ - ${vcf} - """ - } diff --git a/module/mutect2.nf b/module/mutect2.nf index 04a8bcfc..a2c4195c 100644 --- a/module/mutect2.nf +++ b/module/mutect2.nf @@ -1,5 +1,5 @@ -include { run_SplitIntervals_GATK; call_sSNV_Mutect2; run_MergeVcfs_GATK; run_MergeMutectStats_GATK; run_LearnReadOrientationModel_GATK; run_FilterMutectCalls_GATK; split_VCF_BCFtools } from './mutect2-processes' -include { filter_VCF_BCFtools; rename_samples_BCFtools; generate_sha512sum } from './common' +include { run_SplitIntervals_GATK; call_sSNV_Mutect2; run_MergeVcfs_GATK; run_MergeMutectStats_GATK; run_LearnReadOrientationModel_GATK; run_FilterMutectCalls_GATK } from './mutect2-processes' +include { filter_VCF_BCFtools; split_VCF_BCFtools; rename_samples_BCFtools; generate_sha512sum } from './common' include { compress_index_VCF } from '../external/pipeline-Nextflow-module/modules/common/index_VCF_tabix/main.nf' addParams( options: [ output_dir: params.workflow_output_dir, diff --git a/module/process-vcfs.nf b/module/process-vcfs.nf new file mode 100644 index 00000000..6ab0b816 --- /dev/null +++ b/module/process-vcfs.nf @@ -0,0 +1,53 @@ +include { generate_standard_filename } from '../external/pipeline-Nextflow-module/modules/common/generate_standardized_filename/main.nf' +include { split_VCF_BCFtools; rename_samples_BCFtools; generate_sha512sum} from './common' addParams( + keep_input_prefix: true + ) +include { compress_index_VCF } from '../external/pipeline-Nextflow-module/modules/common/index_VCF_tabix/main.nf' addParams( + options: [ + output_dir: params.workflow_output_dir, + log_output_dir: params.workflow_log_output_dir, + bgzip_extra_args: params.bgzip_extra_args, + tabix_extra_args: params.tabix_extra_args + ]) + +workflow process_vcfs { + take: + samplesToProcess_ch + main: + split_VCF_BCFtools(samplesToProcess_ch + .filter { it[2] == 'mutect2' } + .map{ it -> it[0] }, + ['snps', 'mnps', 'indels'] + ) + rename_files_ch = samplesToProcess_ch + .filter { it[2] != 'mutect2' } + .map{ it -> ['SNV', it[0]] } + .mix(split_VCF_BCFtools.out.gzvcf) + rename_id_ch = Channel.value(['orig_id': params.input_tumor_id,'id': params.tumor_id, 'sample_type': 'tumor' ]) + .mix(Channel.value(['orig_id': params.input_normal_id, 'id': params.normal_id, 'sample_type': 'normal' ])) + .mix(Channel.value(['orig_id': 'TUMOR', 'id': params.tumor_id, 'sample_type': 'tumor' ])) + .mix(Channel.value(['orig_id': 'NORMAL', 'id': params.normal_id, 'sample_type': 'normal' ])) + .collect() + rename_samples_BCFtools( + rename_id_ch + .combine(rename_files_ch) // combine with files channel to get the count right + .map { it.take(it.size() -2) } //remove the files + , + rename_files_ch + ) + compress_index_VCF(rename_samples_BCFtools.out.gzvcf) + file_for_sha512 = compress_index_VCF.out.index_out + .map{ it -> ["${file(it[0]).getName().split('-')[0]}-vcf", it[1]] } + .mix( compress_index_VCF.out.index_out + .map{ it -> ["${file(it[0]).getName().split('-')[0]}-index", it[2]] } + ) + generate_sha512sum(file_for_sha512) + + emit: + gzvcf = compress_index_VCF.out.index_out + .filter { it[0].replace('snps', 'SNV') == 'SNV' } + .map{ it -> ["${it[1]}"] } + idx = compress_index_VCF.out.index_out + .filter { it[0].replace('snps', 'SNV') == 'SNV' } + .map{ it -> ["${it[2]}"] } + } diff --git a/module/somaticsniper.nf b/module/somaticsniper.nf index ff87225f..865b80c0 100644 --- a/module/somaticsniper.nf +++ b/module/somaticsniper.nf @@ -18,7 +18,7 @@ include { compress_index_VCF as compress_index_VCF_fix } from '../external/pipel include { compress_file_bzip2} from './common' addParams( compress_publishdir : "${params.workflow_output_dir}/intermediate/generate_ReadCount_bam_readcount", compress_enabled : params.save_intermediate_files - ) + ) workflow somaticsniper { take: diff --git a/nftest.yml b/nftest.yml index 5f7b1c19..6cbc8f30 100644 --- a/nftest.yml +++ b/nftest.yml @@ -66,19 +66,19 @@ cases: expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-all-tools-std-input/S2-v1.1.5/Intersect-BCFtools-1.17/isec-2-or-more/BCFtools-1.17_TWGSAMIN_S2-v1.1.5_sites.txt method: md5 - - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-1.17/output/MuSE-*_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz + - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/MuSE-*_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-all-tools-std-input/S2-v1.1.5/Intersect-BCFtools-1.17/MuSE-2.0.3_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz script: test/assert_vcf.sh - - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-1.17/output/Mutect2-*_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz + - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/Mutect2-*_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-all-tools-std-input/S2-v1.1.5/Intersect-BCFtools-1.17/Mutect2-4.4.0.0_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz script: test/assert_vcf.sh - - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-1.17/output/SomaticSniper-*_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz + - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/SomaticSniper-*_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-all-tools-std-input/S2-v1.1.5/Intersect-BCFtools-1.17/SomaticSniper-1.0.5.0_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz script: test/assert_vcf.sh - - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-1.17/output/Strelka2-*_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz + - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/Strelka2-*_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-all-tools-std-input/S2-v1.1.5/Intersect-BCFtools-1.17/Strelka2-2.9.10_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz script: test/assert_vcf.sh @@ -229,3 +229,47 @@ cases: - actual: call-sSNV-*/S2-v1.1.5/MuSE-*/output/MuSE-*_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-muse/S2-v1.1.5/MuSE-2.0.3/MuSE-2.0.3_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz script: test/assert_vcf.sh + + - name: a_mini-all-tools-vcf-input + message: test development branch a-mini four VCFs input + nf_script: ./main.nf + nf_config: ./test/config/a_mini-all-tools.config + params_file: ./test/yaml/a_mini-vcf.yaml + skip: true + verbose: true + asserts: + - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/BCFtools-*_TWGSAMIN_S2-v1.1.5_SNV-concat.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-all-tools-vcf-input/S2-v1.1.5/Intersect-BCFtools-1.17/BCFtools-1.17_TWGSAMIN_S2-v1.1.5_SNV-concat.vcf.gz + script: test/assert_vcf.sh + + - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/BCFtools-*_TWGSAMIN_S2-v1.1.5_SNV-concat.maf.bz2 + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-all-tools-vcf-input/S2-v1.1.5/Intersect-BCFtools-1.17/BCFtools-1.17_TWGSAMIN_S2-v1.1.5_SNV-concat.maf.bz2 + method: md5 + + - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/BCFtools-*_TWGSAMIN_S2-v1.1.5_Venn-diagram.tiff + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-all-tools-vcf-input/S2-v1.1.5/Intersect-BCFtools-1.17/BCFtools-1.17_TWGSAMIN_S2-v1.1.5_Venn-diagram.tiff + method: md5 + + - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/isec-1-or-more/BCFtools-*_TWGSAMIN_S2-v1.1.5_sites.txt + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-all-tools-vcf-input/S2-v1.1.5/Intersect-BCFtools-1.17/isec-1-or-more/BCFtools-1.17_TWGSAMIN_S2-v1.1.5_sites.txt + method: md5 + + - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/isec-2-or-more/BCFtools-*_TWGSAMIN_S2-v1.1.5_sites.txt + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-all-tools-vcf-input/S2-v1.1.5/Intersect-BCFtools-1.17/isec-2-or-more/BCFtools-1.17_TWGSAMIN_S2-v1.1.5_sites.txt + method: md5 + + - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/MuSE-*_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-all-tools-vcf-input/S2-v1.1.5/Intersect-BCFtools-1.17/MuSE-2.0.4_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz + script: test/assert_vcf.sh + + - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/Mutect2-*_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-all-tools-vcf-input/S2-v1.1.5/Intersect-BCFtools-1.17/Mutect2-4.5.0.0_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz + script: test/assert_vcf.sh + + - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/SomaticSniper-*_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-all-tools-vcf-input/S2-v1.1.5/Intersect-BCFtools-1.17/SomaticSniper-1.0.5.0_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz + script: test/assert_vcf.sh + + - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/Strelka2-*_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-all-tools-vcf-input/S2-v1.1.5/Intersect-BCFtools-1.17/Strelka2-2.9.10_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz + script: test/assert_vcf.sh diff --git a/test/config/a_mini-all-tools.config b/test/config/a_mini-all-tools.config index 5070e97f..72b48ef4 100644 --- a/test/config/a_mini-all-tools.config +++ b/test/config/a_mini-all-tools.config @@ -17,7 +17,7 @@ params { dataset_id = 'TWGSAMIN' // setting params.exome to TRUE will add the '--exome' option when running manta and strelka2 and the -E option when running MuSE exome = false - save_intermediate_files = true + save_intermediate_files = false // module options bgzip_extra_args = '' @@ -39,7 +39,7 @@ params { vcf2maf_extra_args = '' // Base resource allocation updater - // See README for adding parameters to update the base resource allocations + // See README for adding parameters to update the base resource allocations } // Setup the pipeline config. DO NOT REMOVE THIS LINE! diff --git a/test/configtest-F16.json b/test/configtest-F16.json index 3b8a9d3f..00b6c671 100644 --- a/test/configtest-F16.json +++ b/test/configtest-F16.json @@ -30,6 +30,14 @@ "trace.file", "params.date" ], + "version_fields": [ + "manifest.version", + "params.log_output_dir", + "params.output_dir_base", + "report.file", + "trace.file", + "timeline.file" + ], "expected_result": { "docker": { "all_group_ids": "$(for i in `id --real --groups`; do echo -n \"--group-add=$i \"; done)", @@ -43,7 +51,7 @@ "mainScript": "main.nf", "name": "call-sSNV", "nextflowVersion": ">=20.07.1", - "version": "8.1.0" + "version": "VER.SI.ON" }, "params": { "BCFtools_version": "1.17", @@ -92,9 +100,11 @@ } ] }, + "input_type": "bam", "intersect_regions": "/hot/ref/tool-specific-input/pipeline-call-sSNV-6.0.0/GRCh38-BI-20160721/Homo_sapiens_assembly38_no-decoy.bed.gz", "intersect_regions_index": "/hot/ref/tool-specific-input/pipeline-call-sSNV-6.0.0/GRCh38-BI-20160721/Homo_sapiens_assembly38_no-decoy.bed.gz.tbi", - "log_output_dir": "/tmp/outputs/call-sSNV-8.1.0/0192847/log-call-sSNV-8.1.0-19970704T165655Z", + "keep_input_prefix": false, + "log_output_dir": "/tmp/outputs/call-sSNV-VER.SI.ON/0192847/log-call-sSNV-VER.SI.ON-19970704T165655Z", "manta_version": "1.6.0", "max_cpus": "16", "max_memory": "31 GB", @@ -104,7 +114,7 @@ "ncbi_build": "GRCh38", "normal_id": "0192847", "output_dir": "/tmp/outputs", - "output_dir_base": "/tmp/outputs/call-sSNV-8.1.0/0192847", + "output_dir_base": "/tmp/outputs/call-sSNV-VER.SI.ON/0192847", "patient_id": "TWGSAMIN000001", "pipeval_version": "4.0.0-rc.2", "proc_resource_params": { @@ -113,18 +123,18 @@ "memory": "6 GB", "retry_strategy": { "memory": { - "operand": "5 GB", + "operand": "12 GB", "strategy": "add" } - } - }, - "call_sSNV_MuSE": { - "cpus": "6", - "memory": "24 GB", - "retry_strategy": { - "memory": { - "operand": "8 GB", - "strategy": "add" + }, + "withName:call_sSNV_Strelka2": { + "cpus": "6", + "memory": "2 GB", + "retry_strategy": { + "memory": { + "operand": "12 GB", + "strategy": "add" + } } } }, @@ -149,21 +159,13 @@ } }, "call_sSNV_Strelka2": { - "cpus": "6", "ext": { "retry_codes": [] - }, - "memory": "2 GB", - "retry_strategy": { - "memory": { - "operand": "12 GB", - "strategy": "add" - } } }, "concat_VCFs_BCFtools": { - "cpus": "2", - "memory": "5 GB", + "cpus": "1", + "memory": "1 GB", "retry_strategy": { "memory": { "operand": "10 GB", @@ -192,8 +194,8 @@ } }, "plot_VennDiagram_R": { - "cpus": "2", - "memory": "5 GB", + "cpus": "1", + "memory": "1 GB", "retry_strategy": { "memory": { "operand": "10 GB", @@ -206,9 +208,19 @@ "memory": "8 GB", "retry_strategy": { "memory": { - "operand": "20 GB", + "operand": "8 GB", "strategy": "add" } + }, + "withName:call_sSNV_MuSE": { + "cpus": "6", + "memory": "24 GB", + "retry_strategy": { + "memory": { + "operand": "8 GB", + "strategy": "add" + } + } } }, "run_sump_MuSE": { @@ -238,7 +250,7 @@ }, "{orig_id=0192847, id=0192847, path=/hot/resource/SMC-HET/tumours/A-mini/bams/n2/output/S2.T-n2.bam, contamination_table=/hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/input/data/A-mini/S2.T-n2_getpileupsummaries_calculatecontamination.table, sample_type=tumor}" ], - "save_intermediate_files": true, + "save_intermediate_files": false, "scatter_count": "50", "single_NT_paired": true, "somaticsniper_version": "1.0.5.0", @@ -329,18 +341,19 @@ "cpus": "6", "memory": { "1": "6 GB", - "2": "11 GB", - "3": "16 GB", - "closure": "retry_updater(6 GB, add, 5 GB, $task.attempt, memory)" - } - }, - "withName:call_sSNV_MuSE": { - "cpus": "6", - "memory": { - "1": "24 GB", - "2": "31 GB", - "3": "31 GB", - "closure": "retry_updater(24 GB, add, 8 GB, $task.attempt, memory)" + "2": "18 GB", + "3": "30 GB", + "closure": "retry_updater(6 GB, add, 12 GB, $task.attempt, memory)" + }, + "withName:call_sSNV_Strelka2": { + "cpus": "6", + "memory": "2 GB", + "retry_strategy": { + "memory": { + "operand": "12 GB", + "strategy": "add" + } + } } }, "withName:call_sSNV_Mutect2": { @@ -362,24 +375,17 @@ } }, "withName:call_sSNV_Strelka2": { - "cpus": "6", "ext": { "retry_codes": [] - }, - "memory": { - "1": "2 GB", - "2": "14 GB", - "3": "26 GB", - "closure": "retry_updater(2 GB, add, 12 GB, $task.attempt, memory)" } }, "withName:concat_VCFs_BCFtools": { - "cpus": "2", + "cpus": "1", "memory": { - "1": "5 GB", - "2": "15 GB", - "3": "25 GB", - "closure": "retry_updater(5 GB, add, 10 GB, $task.attempt, memory)" + "1": "1 GB", + "2": "11 GB", + "3": "21 GB", + "closure": "retry_updater(1 GB, add, 10 GB, $task.attempt, memory)" } }, "withName:convert_BAM2Pileup_SAMtools": { @@ -401,21 +407,31 @@ } }, "withName:plot_VennDiagram_R": { - "cpus": "2", + "cpus": "1", "memory": { - "1": "5 GB", - "2": "15 GB", - "3": "25 GB", - "closure": "retry_updater(5 GB, add, 10 GB, $task.attempt, memory)" + "1": "1 GB", + "2": "11 GB", + "3": "21 GB", + "closure": "retry_updater(1 GB, add, 10 GB, $task.attempt, memory)" } }, "withName:run_LearnReadOrientationModel_GATK": { "cpus": "1", "memory": { "1": "8 GB", - "2": "28 GB", - "3": "31 GB", - "closure": "retry_updater(8 GB, add, 20 GB, $task.attempt, memory)" + "2": "16 GB", + "3": "24 GB", + "closure": "retry_updater(8 GB, add, 8 GB, $task.attempt, memory)" + }, + "withName:call_sSNV_MuSE": { + "cpus": "6", + "memory": "24 GB", + "retry_strategy": { + "memory": { + "operand": "8 GB", + "strategy": "add" + } + } } }, "withName:run_sump_MuSE": { @@ -434,16 +450,16 @@ }, "report": { "enabled": true, - "file": "/tmp/outputs/call-sSNV-8.1.0/0192847/log-call-sSNV-8.1.0-19970704T165655Z/nextflow-log/report.html" + "file": "/tmp/outputs/call-sSNV-VER.SI.ON/0192847/log-call-sSNV-VER.SI.ON-19970704T165655Z/nextflow-log/report.html" }, "sm_tag": "0192847", "timeline": { "enabled": true, - "file": "/tmp/outputs/call-sSNV-8.1.0/0192847/log-call-sSNV-8.1.0-19970704T165655Z/nextflow-log/timeline.html" + "file": "/tmp/outputs/call-sSNV-VER.SI.ON/0192847/log-call-sSNV-VER.SI.ON-19970704T165655Z/nextflow-log/timeline.html" }, "trace": { "enabled": true, - "file": "/tmp/outputs/call-sSNV-8.1.0/0192847/log-call-sSNV-8.1.0-19970704T165655Z/nextflow-log/trace.txt" + "file": "/tmp/outputs/call-sSNV-VER.SI.ON/0192847/log-call-sSNV-VER.SI.ON-19970704T165655Z/nextflow-log/trace.txt" }, "valid_algorithms": [ "somaticsniper", diff --git a/test/configtest-F32.json b/test/configtest-F32.json index 776757c1..7728bd3f 100644 --- a/test/configtest-F32.json +++ b/test/configtest-F32.json @@ -30,6 +30,14 @@ "trace.file", "params.date" ], + "version_fields": [ + "manifest.version", + "params.log_output_dir", + "params.output_dir_base", + "report.file", + "trace.file", + "timeline.file" + ], "expected_result": { "docker": { "all_group_ids": "$(for i in `id --real --groups`; do echo -n \"--group-add=$i \"; done)", @@ -43,7 +51,7 @@ "mainScript": "main.nf", "name": "call-sSNV", "nextflowVersion": ">=20.07.1", - "version": "8.1.0" + "version": "VER.SI.ON" }, "params": { "BCFtools_version": "1.17", @@ -92,9 +100,11 @@ } ] }, + "input_type": "bam", "intersect_regions": "/hot/ref/tool-specific-input/pipeline-call-sSNV-6.0.0/GRCh38-BI-20160721/Homo_sapiens_assembly38_no-decoy.bed.gz", "intersect_regions_index": "/hot/ref/tool-specific-input/pipeline-call-sSNV-6.0.0/GRCh38-BI-20160721/Homo_sapiens_assembly38_no-decoy.bed.gz.tbi", - "log_output_dir": "/tmp/outputs/call-sSNV-8.1.0/0192847/log-call-sSNV-8.1.0-19970704T165655Z", + "keep_input_prefix": false, + "log_output_dir": "/tmp/outputs/call-sSNV-VER.SI.ON/0192847/log-call-sSNV-VER.SI.ON-19970704T165655Z", "manta_version": "1.6.0", "max_cpus": "32", "max_memory": "64 GB", @@ -104,7 +114,7 @@ "ncbi_build": "GRCh38", "normal_id": "0192847", "output_dir": "/tmp/outputs", - "output_dir_base": "/tmp/outputs/call-sSNV-8.1.0/0192847", + "output_dir_base": "/tmp/outputs/call-sSNV-VER.SI.ON/0192847", "patient_id": "TWGSAMIN000001", "pipeval_version": "4.0.0-rc.2", "proc_resource_params": { @@ -162,8 +172,8 @@ } }, "concat_VCFs_BCFtools": { - "cpus": "2", - "memory": "5 GB", + "cpus": "1", + "memory": "1 GB", "retry_strategy": { "memory": { "operand": "10 GB", @@ -192,8 +202,8 @@ } }, "plot_VennDiagram_R": { - "cpus": "2", - "memory": "5 GB", + "cpus": "1", + "memory": "1 GB", "retry_strategy": { "memory": { "operand": "10 GB", @@ -238,7 +248,7 @@ }, "{orig_id=0192847, id=0192847, path=/hot/resource/SMC-HET/tumours/A-mini/bams/n2/output/S2.T-n2.bam, contamination_table=/hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/input/data/A-mini/S2.T-n2_getpileupsummaries_calculatecontamination.table, sample_type=tumor}" ], - "save_intermediate_files": true, + "save_intermediate_files": false, "scatter_count": "50", "single_NT_paired": true, "somaticsniper_version": "1.0.5.0", @@ -374,12 +384,12 @@ } }, "withName:concat_VCFs_BCFtools": { - "cpus": "2", + "cpus": "1", "memory": { - "1": "5 GB", - "2": "15 GB", - "3": "25 GB", - "closure": "retry_updater(5 GB, add, 10 GB, $task.attempt, memory)" + "1": "1 GB", + "2": "11 GB", + "3": "21 GB", + "closure": "retry_updater(1 GB, add, 10 GB, $task.attempt, memory)" } }, "withName:convert_BAM2Pileup_SAMtools": { @@ -401,12 +411,12 @@ } }, "withName:plot_VennDiagram_R": { - "cpus": "2", + "cpus": "1", "memory": { - "1": "5 GB", - "2": "15 GB", - "3": "25 GB", - "closure": "retry_updater(5 GB, add, 10 GB, $task.attempt, memory)" + "1": "1 GB", + "2": "11 GB", + "3": "21 GB", + "closure": "retry_updater(1 GB, add, 10 GB, $task.attempt, memory)" } }, "withName:run_LearnReadOrientationModel_GATK": { @@ -434,16 +444,16 @@ }, "report": { "enabled": true, - "file": "/tmp/outputs/call-sSNV-8.1.0/0192847/log-call-sSNV-8.1.0-19970704T165655Z/nextflow-log/report.html" + "file": "/tmp/outputs/call-sSNV-VER.SI.ON/0192847/log-call-sSNV-VER.SI.ON-19970704T165655Z/nextflow-log/report.html" }, "sm_tag": "0192847", "timeline": { "enabled": true, - "file": "/tmp/outputs/call-sSNV-8.1.0/0192847/log-call-sSNV-8.1.0-19970704T165655Z/nextflow-log/timeline.html" + "file": "/tmp/outputs/call-sSNV-VER.SI.ON/0192847/log-call-sSNV-VER.SI.ON-19970704T165655Z/nextflow-log/timeline.html" }, "trace": { "enabled": true, - "file": "/tmp/outputs/call-sSNV-8.1.0/0192847/log-call-sSNV-8.1.0-19970704T165655Z/nextflow-log/trace.txt" + "file": "/tmp/outputs/call-sSNV-VER.SI.ON/0192847/log-call-sSNV-VER.SI.ON-19970704T165655Z/nextflow-log/trace.txt" }, "valid_algorithms": [ "somaticsniper", diff --git a/test/yaml/a_mini-vcf.yaml b/test/yaml/a_mini-vcf.yaml new file mode 100644 index 00000000..333d2370 --- /dev/null +++ b/test/yaml/a_mini-vcf.yaml @@ -0,0 +1,10 @@ +--- +patient_id: 'TWGSAMIN000001' +dataset_id: 'TWGSAMIN' +input_tumor_id: 'S2_v1.1.5' # tumor ID in the VCF files must match this or 'TUMOR' +input_normal_id: 'HG002.N' # normal ID in the VCF files must match this or 'NORMAL' +input: + muse: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-input/MuSE-2.0.4_TWGSAMIN_S2-v1.1.5_SNV-pass.vcf.gz + mutect2: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-input/Mutect2-4.5.0.0_TWGSAMIN_S2-v1.1.5_all-pass.vcf.gz + somaticsniper: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-input/SomaticSniper-1.0.5.0_TWGSAMIN_S2-v1.1.5_hc.vcf.gz + strelka2: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-input/Strelka2-2.9.10_TWGSAMIN_S2-v1.1.5_SNV-pass.vcf.gz