Skip to content

Commit

Permalink
move resource params to methods.config
Browse files Browse the repository at this point in the history
  • Loading branch information
nkwang24 committed Oct 19, 2024
1 parent 2f405e4 commit e8ec373
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
18 changes: 17 additions & 1 deletion config/methods.config
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -71,19 +76,30 @@ 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"
params.dest_fasta_fai = params.dest_fasta_ref + ".fai"

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"
}
}

Expand Down
17 changes: 0 additions & 17 deletions config/template.config
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down

0 comments on commit e8ec373

Please sign in to comment.