-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter SNVs, INDELs, CNVs and SVs (#496)
* Filter variants * CHANGELOG * Update CHANGELOG.md * Update assets/schema_hgnc_ids.json * Update subworkflows/local/filter_variants/main.nf Co-authored-by: Daniel Schmitz <[email protected]> * merge and review suggestions * review suggestions * Update subworkflows/local/filter_variants/main.nf Co-authored-by: Anders Jemt <[email protected]> * Review suggestions --------- Co-authored-by: Daniel Schmitz <[email protected]> Co-authored-by: Anders Jemt <[email protected]>
- Loading branch information
1 parent
4817e1f
commit e9ff17c
Showing
32 changed files
with
958 additions
and
38 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
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,26 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://raw.githubusercontent.com/genomic-medicine-sweden/nallo/master/assets/schema_hgnc_ids.json", | ||
"title": "genomic-medicine-sweden/nallo pipeline - params.filter_variants_hgnc_ids schema", | ||
"description": "Schema for the file provided with params.filter_variants_hgnc_ids", | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"hgnc_id": { | ||
"oneOf": [ | ||
{ | ||
"type": "string", | ||
"pattern": "^\\S+$" | ||
}, | ||
{ | ||
"type": "integer" | ||
} | ||
], | ||
"exists": true, | ||
"errorMessage": "HGNC IDs must exist with a header line `hgnc_id`, then one HGNC ID per line, either as e.g. `4826` or `HGNC:4826`." | ||
} | ||
}, | ||
"required": ["hgnc_id"] | ||
} | ||
} |
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,77 @@ | ||
/* | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
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. | ||
---------------------------------------------------------------------------------------- | ||
*/ | ||
|
||
process { | ||
|
||
/* | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
Filter variants | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
*/ | ||
|
||
withName: '.*:FILTER_VARIANTS_SNV:.*' { | ||
publishDir = [ | ||
enabled: false, | ||
] | ||
} | ||
|
||
withName: '.*:FILTER_VARIANTS_SNVS:ENSEMBLVEP_FILTERVEP' { | ||
ext.args = { "--filter \"HGNC_ID in ${feature_file}\"" } | ||
publishDir = [ | ||
enabled: false, | ||
] | ||
} | ||
|
||
withName: '.*:FILTER_VARIANTS_SVS:ENSEMBLVEP_FILTERVEP' { | ||
ext.args = { "--filter \"HGNC_ID in ${feature_file}\"" } | ||
publishDir = [ | ||
enabled: false, | ||
] | ||
} | ||
|
||
withName: '.*:FILTER_VARIANTS_SNVS:BCFTOOLS_VIEW' { | ||
ext.prefix = { params.skip_snv_annotation ? "${meta.id}_snvs_filtered" : (params.skip_rank_variants ? "${meta.id}_snvs_annotated_filtered" : "${meta.id}_snvs_annotated_ranked_filtered") } | ||
ext.args = { [ | ||
'--output-type z', | ||
'--write-index=tbi', | ||
"${params.filter_snvs_expression}" | ||
].join(" ") } | ||
publishDir = [ | ||
path: { "${params.outdir}/snvs/multi_sample/${meta.id}" }, | ||
mode: params.publish_dir_mode, | ||
saveAs: { filename -> filename.equals('versions.yml') ? null : filename } | ||
] | ||
} | ||
|
||
withName: '.*:FILTER_VARIANTS_SVS:BCFTOOLS_VIEW' { | ||
ext.prefix = { | ||
def parts = [] | ||
parts << "${meta.id}" | ||
parts << (params.skip_cnv_calling ? 'svs_merged' : 'svs_cnvs_merged') | ||
if (!params.skip_sv_annotation) parts << 'annotated' | ||
if (!params.skip_rank_variants) parts << 'ranked' | ||
parts << 'filtered' | ||
return parts.join('_') | ||
} | ||
ext.args = { [ | ||
'--output-type z', | ||
'--write-index=tbi', | ||
"${params.filter_svs_expression}" | ||
].join(" ") } | ||
publishDir = [ | ||
path: { "${params.outdir}/svs/family/${meta.id}" }, | ||
mode: params.publish_dir_mode, | ||
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.