From e8ec373c261fdb34919375bac005f8d9f08fe707 Mon Sep 17 00:00:00 2001 From: nkwang Date: Fri, 18 Oct 2024 17:04:18 -0700 Subject: [PATCH] move resource params to methods.config --- config/methods.config | 18 +++++++++++++++++- config/template.config | 17 ----------------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/config/methods.config b/config/methods.config index cedd8b5..7a8ea71 100644 --- a/config/methods.config +++ b/config/methods.config @@ -50,7 +50,12 @@ methods { 'dest_fasta_id', 'dest_fasta_ref', 'dest_fasta_fai', - 'dest_fasta_dict' + 'dest_fasta_dict', + 'chain_file', + 'repeat_bed', + 'header_contigs', + 'funcotator_data_source', + 'gnomad_rds' ] for (key in advanced_parameters) { @@ -71,12 +76,20 @@ methods { params.dest_fasta_id = 'GRCh38' params.dest_fasta_ref = params.fasta_ref_38 + + params.chain_file = params.resource_bundle_path + "/hg19ToHg38.over.chain" + params.repeat_bed = params.resource_bundle_path + "/GRCh38_RepeatMasker-intervals.bed" + params.header_contigs = params.resource_bundle_path + "/GRCh38_VCF-header-contigs.txt" } else { params.src_fasta_id = 'GRCh38' params.src_fasta_ref = params.fasta_ref_38 params.dest_fasta_id = 'GRCh37' params.dest_fasta_ref = params.fasta_ref_37 + + params.chain_file = params.resource_bundle_path + "/hg38ToHg19.over.chain" + params.repeat_bed = params.resource_bundle_path + "/GRCh37_RepeatMasker-intervals.bed" + params.header_contigs = params.resource_bundle_path + "/GRCh37_VCF-header-contigs.txt" } params.src_fasta_fai = params.src_fasta_ref + ".fai" @@ -84,6 +97,9 @@ methods { params.src_fasta_dict = Nextflow.file(params.src_fasta_ref).resolveSibling(Nextflow.file(params.src_fasta_ref).getBaseName() + '.dict').toString() params.dest_fasta_dict = Nextflow.file(params.dest_fasta_ref).resolveSibling(Nextflow.file(params.dest_fasta_ref).getBaseName() + '.dict').toString() + + params.funcotator_data_source = params.resource_bundle_path + "/funcotator_dataSources.v1.7.20200521s_StableLift" + params.gnomad_rds = params.resource_bundle_path + "/gnomad.v4.0.sv.Rds" } } diff --git a/config/template.config b/config/template.config index ab6c69e..ee5778d 100644 --- a/config/template.config +++ b/config/template.config @@ -39,23 +39,6 @@ params { // Optional parameter specifying number of cpus to use for parsing large VCFs // Defaults to 4 if unset // extract_features_cpus = 4 - - // LiftOver chain file - chain_file = liftover_direction == "GRCh37ToGRCh38" ? - "${resource_bundle_path}/hg19ToHg38.over.chain" : - "${resource_bundle_path}/hg38ToHg19.over.chain" - - // SNV required references - funcotator_data_source = "${resource_bundle_path}/funcotator_dataSources.v1.7.20200521s_StableLift" - repeat_bed = liftover_direction == "GRCh37ToGRCh38" ? - "${resource_bundle_path}/GRCh38_RepeatMasker-intervals.bed" : - "${resource_bundle_path}/GRCh37_RepeatMasker-intervals.bed" - - // SV required references - gnomad_rds = "${resource_bundle_path}/gnomad.v4.0.sv.Rds" - header_contigs = liftover_direction == "GRCh37ToGRCh38" ? - "${resource_bundle_path}/GRCh38_VCF-header-contigs.txt" : - "${resource_bundle_path}/GRCh37_VCF-header-contigs.txt" } // Setup the pipeline config. DO NOT REMOVE THIS LINE!