Skip to content

Commit

Permalink
Hook up parameters to the configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeltrame committed Oct 29, 2024
1 parent fc426df commit d456dc2
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 1 deletion.
46 changes: 46 additions & 0 deletions conf/modules/purecn.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Config file for defining DSL2 per module options and publishing paths
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Available keys to override module options:
ext.args = Additional arguments appended to command in module.
ext.args2 = Second set of arguments appended to command in module (multi-tool modules).
ext.args3 = Third set of arguments appended to command in module (multi-tool modules).
ext.prefix = File name prefix for output files.
ext.when = When to run the module.
----------------------------------------------------------------------------------------
*/

//PURECN

process {

withName: 'PURECN_INTERVALFILE' {
ext.args = [
params.genome ? "--genome ${params.genome}": "",
].join(' ')

ext.when = { params.tools && params.tools.split(',').contains('purecn') }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/purecn/${meta.id}/" },
pattern: "*{.bed,.txt}"
]
}

withName: 'PURECN_RUN' {
ext.args = [
params.genome ? "--genome ${params.genome}": "",
params.purecn_exclude_bed ? "--snp-blacklist ${purecn_exclude_bed}": "",
"--post-optmize",

].join(' ')

ext.when = { params.tools && params.tools.split(',').contains('purecn') }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/purecn/${meta.id}/" },
pattern: "*{.rds,.txt,*.csv}"
]
}
}
3 changes: 3 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ params {
sentieon_dnascope_pcr_indel_model = 'CONSERVATIVE'
sentieon_haplotyper_emit_mode = 'variant' // default value for Sentieon haplotyper
wes = false // Set to true, if data is exome/targeted sequencing data. Used to use correct models in various variant callers
purecn_normaldb = null // NormalDB generated by PureCN
purecn_gatk_pon = null // PoN data from GATK used by PureCN to denoise coverage


// Annotation
bcftools_annotations = null // No extra annotation file
Expand Down
12 changes: 12 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,18 @@
"description": "Option for selecting the PCR indel model used by Sentieon Dnascope.",
"help_text": "PCR indel model used to weed out false positive indels more or less aggressively. The possible MODELs are: NONE (used for PCR free samples), and HOSTILE, AGGRESSIVE and CONSERVATIVE, in order of decreasing aggressiveness. The default value is CONSERVATIVE.",
"pattern": "^(NONE|HOSTILE|AGGRESSIVE|CONSERVATIVE)(?<!,)$"
},
"purecn_normaldb": {
"type": "string",
"pattern": "^\\S+\\.rds$",
"format": "file-path",
"description": "NormalDB file generated by PureCN NormalDB.R."
},
"purecn_gatk_pon": {
"type": "string",
"pattern": "^\\S\\.hdf5$",
"format": "file-path",
"description": "Panel of normals generated by the GATK"
}
}
},
Expand Down
4 changes: 3 additions & 1 deletion workflows/sarek/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,9 @@ workflow SAREK {
gc_file,
rt_file,
params.joint_mutect2,
params.wes
params.wes,
params.purecn_gatk_pon,
params.purecn_normaldb
)

// POST VARIANTCALLING
Expand Down

0 comments on commit d456dc2

Please sign in to comment.