forked from RaqManzano/rnadnavar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Structured config files into sub-folders for easy access. Removed red…
…undant code and moved subworkflows to correspondent folders. Fixes in rnadnavar.nf workflow and input check. Removed dependency in schema_input.json for lane. Added modules and subwrokflows the proper way.
- Loading branch information
1 parent
770495e
commit 912ff43
Showing
53 changed files
with
3,060 additions
and
770 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/* | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
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. | ||
---------------------------------------------------------------------------------------- | ||
*/ | ||
|
||
// BAM TO FASTQ | ||
|
||
process { // alignment_to_fastq | ||
|
||
withName: 'COLLATE_FASTQ_MAP' { | ||
ext.args2 = '-N' | ||
ext.prefix = {"${meta.id}.mapped"} | ||
publishDir = [ | ||
//specify to avoid publishing, overwritten otherwise | ||
enabled: false | ||
] | ||
} | ||
|
||
withName: 'COLLATE_FASTQ_UNMAP' { | ||
ext.args2 = '-N' | ||
ext.prefix = {"${meta.id}.unmapped"} | ||
publishDir = [ | ||
//specify to avoid publishing, overwritten otherwise | ||
enabled: false | ||
] | ||
} | ||
|
||
withName: 'SAMTOOLS_VIEW_MAP_MAP' { | ||
ext.args = '-b -f1 -F12' | ||
ext.prefix = {"${meta.id}.map_map"} | ||
publishDir = [ | ||
//specify to avoid publishing, overwritten otherwise | ||
enabled: false | ||
] | ||
} | ||
|
||
withName: 'SAMTOOLS_VIEW_MAP_UNMAP' { | ||
ext.args = '-b -f8 -F260' | ||
ext.prefix = {"${meta.id}.map_unmap"} | ||
publishDir = [ | ||
//specify to avoid publishing, overwritten otherwise | ||
enabled: false | ||
] | ||
} | ||
|
||
withName: 'SAMTOOLS_VIEW_UNMAP_MAP' { | ||
ext.args = '-b -f4 -F264' | ||
ext.prefix = {"${meta.id}.unmap_map"} | ||
publishDir = [ | ||
//specify to avoid publishing, overwritten otherwise | ||
enabled: false | ||
] | ||
} | ||
|
||
withName: 'SAMTOOLS_VIEW_UNMAP_UNMAP' { | ||
ext.args = '-b -f12 -F256' | ||
ext.prefix = {"${meta.id}.unmap_unmap"} | ||
publishDir = [ | ||
//specify to avoid publishing, overwritten otherwise | ||
enabled: false | ||
] | ||
} | ||
|
||
withName: 'SAMTOOLS_MERGE_UNMAP' { | ||
ext.prefix = {"${meta.id}.merged_unmap"} | ||
publishDir = [ | ||
//specify to avoid publishing, overwritten otherwise | ||
enabled: false | ||
] | ||
} | ||
withName: 'CAT_FASTQ' { | ||
publishDir = [ | ||
enabled: params.save_split_fastqs, | ||
mode: params.publish_dir_mode, | ||
path: { "${params.outdir}/reference/bed" }, | ||
saveAs: { filename -> filename.equals('versions.yml') ? null : filename } | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
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. | ||
---------------------------------------------------------------------------------------- | ||
*/ | ||
|
||
// ANNOTATE | ||
|
||
process { // annotate | ||
|
||
// VEP TODO: is vep_custom_args working?? | ||
if (params.tools && params.tools.split(',').contains('vep')) { | ||
withName: 'ENSEMBLVEP_VEP' { | ||
ext.args = { [ | ||
(params.vep_dbnsfp && params.dbnsfp && !params.dbnsfp_consequence) ? "--plugin dbNSFP,${params.dbnsfp.split("/")[-1]},${params.dbnsfp_fields}" : '', | ||
(params.vep_dbnsfp && params.dbnsfp && params.dbnsfp_consequence) ? "--plugin dbNSFP,'consequence=${params.dbnsfp_consequence}',${params.dbnsfp.split("/")[-1]},${params.dbnsfp_fields}" : '', | ||
(params.vep_loftee) ? "--plugin LoF,loftee_path:/opt/conda/envs/nf-core-vep-${params.vep_version}/share/ensembl-vep-${params.vep_version}-0" : '', | ||
(params.vep_spliceai && params.spliceai_snv && params.spliceai_indel) ? "--plugin SpliceAI,snv=${params.spliceai_snv.split("/")[-1]},indel=${params.spliceai_indel.split("/")[-1]}" : '', | ||
(params.vep_spliceregion) ? '--plugin SpliceRegion' : '', | ||
(params.vep_out_format) ? "--${params.vep_out_format}" : '--vcf', | ||
(params.vep_custom_args) ?: '' | ||
].join(' ').trim() } | ||
// If just VEP: <vcf prefix>_VEP.ann.vcf | ||
ext.prefix = { vcf.baseName - ".vcf" + "_VEP.ann" } | ||
publishDir = [ | ||
[ | ||
mode: params.publish_dir_mode, | ||
path: { "${params.outdir}/reports/EnsemblVEP/${meta.variantcaller}/${meta.id}/" }, | ||
pattern: "*html" | ||
], | ||
[ | ||
mode: params.publish_dir_mode, | ||
path: { "${params.outdir}/annotation/${meta.variantcaller}/${meta.id}/" }, | ||
pattern: "*{gz}" | ||
] | ||
] | ||
} | ||
} | ||
|
||
// ALL ANNOTATION TOOLS | ||
if (params.tools && (params.tools.split(',').contains('snpeff') || params.tools.split(',').contains('vep') || params.tools.split(',').contains('merge'))) { | ||
withName: "NFCORE_SAREK:SAREK:VCF_ANNOTATE_ALL:.*:(TABIX_BGZIPTABIX|TABIX_TABIX)" { | ||
ext.prefix = { input.name - ".vcf" } | ||
publishDir = [ | ||
mode: params.publish_dir_mode, | ||
path: { "${params.outdir}/annotation/${meta.variantcaller}/${meta.id}/" }, | ||
pattern: "*{gz.tbi}" | ||
] | ||
} | ||
} | ||
|
||
if (params.tools && (params.tools.split(',').contains('snpeff') || params.tools.split(',').contains('merge'))) { | ||
withName: 'NFCORE_SAREK:SAREK:VCF_ANNOTATE_ALL:VCF_ANNOTATE_SNPEFF:TABIX_BGZIPTABIX' { | ||
publishDir = [ | ||
mode: params.publish_dir_mode, | ||
path: { "${params.outdir}/annotation/${meta.variantcaller}/${meta.id}/" }, | ||
pattern: "*{gz,gz.tbi}", | ||
saveAs: { params.tools.split(',').contains('snpeff') ? it : null } | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
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. | ||
---------------------------------------------------------------------------------------- | ||
*/ | ||
|
||
// NORMALISE | ||
|
||
process { // normalise | ||
|
||
if (params.skip_toos && params.skip_toos.split(',').contains('normalise')) { | ||
// VT | ||
// TODO: stats are not going to the report dir - no idea why | ||
withName: 'VT_DECOMPOSE'{ | ||
ext.args = "" | ||
ext.prefix = { "${vcf.baseName.minus(".vcf")}.dec" } | ||
publishDir = [ | ||
[ | ||
mode: params.publish_dir_mode, | ||
path: { "${params.outdir}/reports/vt/" }, | ||
pattern: {'*dec.stats'}, | ||
saveAs: {"${meta.variantcaller}/${meta.patient}/${meta.id}/${it}"}, | ||
enabled: true | ||
], | ||
[ | ||
mode: params.publish_dir_mode, | ||
path: { "${params.outdir}/variant_calling/" }, | ||
pattern: {"*{vcf.gz,vcf.gz.tbi}"}, | ||
saveAs: {"${meta.variantcaller}/${meta.patient}/${meta.id}/${it}"}, | ||
enabled: false // store normalised results only | ||
] | ||
] | ||
} | ||
|
||
withName: 'VT_NORMALIZE'{ | ||
ext.args = {"-n"} | ||
ext.prefix = { "${vcf.baseName.minus(".dec.vcf")}.norm" } | ||
publishDir = [[ | ||
path: { "${params.outdir}/variant_calling/" }, | ||
pattern: "*{vcf.gz,vcf.gz.tbi,norm.stats}", | ||
saveAs: { "${meta.variantcaller}/${meta.patient}/${meta.id}/${it}" }, | ||
enabled: true // just store normalised results | ||
], | ||
[mode: params.publish_dir_mode, | ||
path: { "${params.outdir}/reports/vt/${meta.variantcaller}/${meta.patient}/${meta.id}/" }, | ||
pattern: "*stats" | ||
]] | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.