Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cnn reference #825

Merged
merged 3 commits into from
Nov 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion conf/modules/cnvkit.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ process {

withName: 'CNVKIT_REFERENCE' {
ext.prefix = "cnvkit"
ext.when = { params.tools && params.tools.split(',').contains('cnvkit') }
ext.when = { params.tools && params.tools.split(',').contains('cnvkit') && !params.cnvkit_reference }
publishDir = [
enabled: params.save_reference,
mode: params.publish_dir_mode,
Expand Down
1 change: 1 addition & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ params {
cf_minqual = 0 // ControlFreec default values
cf_window = null // by default we are not using this in Control-FREEC
cf_chrom_len = null // by default we are using the fasta_fai. This can be used to circumvent this issue until there is a better option available upstream: https://github.com/nf-core/sarek/issues/670
cnvkit_reference = null // by default the reference is build from the fasta file
ignore_soft_clipped_bases = false // no --dont-use-soft-clipped-bases for GATK Mutect2
wes = false // Set to true, if data is exome/targeted sequencing data. Used to use correct models in various variant callers
joint_germline = false // g.vcf & joint germline calling are not run by default if HaplotypeCaller is selected
Expand Down
8 changes: 7 additions & 1 deletion nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
},
"cf_chrom_len": {
"type": "string",
"default": null,
"default": "None",
"fa_icon": "fas fa-ruler-horizontal",
"description": "Specify a custom chromosome length file.",
"help_text": "Control-FREEC requires a file containing all chromosome lenghts. By default the fasta.fai is used. If the fasta.fai file contains chromosomes not present in the intervals, it fails (see: https://github.com/BoevaLab/FREEC/issues/106).\n\nIn this case, a custom chromosome length can be specified. It must be of the same format as the fai, but only contain the relevant chromosomes.\n\n\n\n",
Expand Down Expand Up @@ -338,6 +338,12 @@
"help_text": "Details, see [ControlFREEC manual](http://boevalab.inf.ethz.ch/FREEC/tutorial.html).",
"hidden": true
},
"cnvkit_reference": {
"type": "string",
"default": null,
"fa_icon": "fas fa-file",
"help_text": "https://cnvkit.readthedocs.io/en/stable/pipeline.html?highlight=reference.cnn#batch"
},
"pon": {
"type": "string",
"fa_icon": "fas fa-file",
Expand Down
4 changes: 3 additions & 1 deletion workflows/sarek.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def checkPathParamList = [
params.bwa,
params.bwamem2,
params.cf_chrom_len,
params.cnvkit_reference,
params.chr_dir,
params.dbnsfp,
params.dbnsfp_tbi,
Expand Down Expand Up @@ -372,7 +373,8 @@ workflow SAREK {

// Antitarget based reference for CNVKit
PREPARE_REFERENCE_CNVKIT(fasta, intervals_bed_combined)
cnvkit_reference = params.tools && params.tools.split(',').contains('cnvkit') ? PREPARE_REFERENCE_CNVKIT.out.cnvkit_reference : Channel.empty()
cnvkit_reference = params.tools && params.tools.split(',').contains('cnvkit') ? (params.cnvkit_reference ? Channel.fromPath(params.cnvkit_reference).collect() : PREPARE_REFERENCE_CNVKIT.out.cnvkit_reference) : Channel.empty()

ch_versions = ch_versions.mix(PREPARE_REFERENCE_CNVKIT.out.versions)

// PREPROCESSING
Expand Down