Add New Parameters for User-input Filters#35
Conversation
|
Warning Newer version of the nf-core template is available. Your pipeline is using an old version of the nf-core template: 3.5.2. For more documentation on how to update your pipeline, please see the nf-core documentation and Synchronisation documentation. |
|
muffato
left a comment
There was a problem hiding this comment.
Oh, so you've introduced distinct parameters for all steps. I wasn't expecting that. I was expecting a single vcf_filter that would be reused across all steps.
BUT I have to admit I didn't think of it, didn't check if that was possible in vcftools, etc. Let's check.
Remember when we talked to Faculty they mentioned the pipeline shouldn't be called on all variants. Some filtering should happen. And the filtering is sort-of specific to the dataset, so can't be universally set in the pipeline, hence having some visible filter parameters. I don't think they said that the same filter was to be applied to all analyses. That may be me mis-assuming things. Do you recall ?
My idea was to allow someone adding a filter in the lines of "exclude chromosome 4", "only select calls with quality 20 or higher", etc, once, and it'd be applied by all variantcomposition analyses.
First of all: is it even possible ? Are such filters applicable to all the vcftools commands ? If each command takes different arguments, then yeah, need 1 pipeline parameter per analysis.
And then, taking an alternative point of view, if someone wants all steps of the pipeline to filter the VCF the same way, they might as well pre-filter it themselves once for all (which is also more efficient !)
And in that case, having 1 parameter per step is also the right move.
| | --input | | | ||
| | --include_positions | | | ||
| | --exclude_positions | | | ||
| | --snp_density_window | | | ||
| | --roh_threshold | | |
There was a problem hiding this comment.
These parameters still exist
| | --input | | | |
| | --include_positions | | | |
| | --exclude_positions | | | |
| | --snp_density_window | | | |
| | --roh_threshold | | |
(+ prettier to reformat the table)
| - To BCFtools RoH via the `--roh_filter` option | ||
|
|
||
| Note that you will need to add a leading whitespace in front of `--`, | ||
| otherwise the pipeline's own parameter validation will consider it a sanger-tol/variantcalling option. |
There was a problem hiding this comment.
| otherwise the pipeline's own parameter validation will consider it a sanger-tol/variantcalling option. | |
| otherwise the pipeline's own parameter validation will consider it a sanger-tol/variantcomposition option. |
|
|
||
| withName: '.*:FEATURES:VCFTOOLS_HET' { | ||
| ext.args = '--het' | ||
| ext.args = { "--het ${params.het_filter ?: ''}" } |
There was a problem hiding this comment.
What happens if you don't put ?: '' ? Do you get null inserted ? If so, what about setting the default values to '' (and marking them as required in nextflow_schema.json to disallow null) ?
PR checklist
Closes issue#23
nf-core pipelines lint).nextflow run . -profile test,docker --outdir <OUTDIR>).docs/usage.mdis updated.CHANGELOG.mdis updated.