update module: CHOPPER
Is there an existing module for this?
- [x] I have searched for the existing module
Is there an open PR for this?
- [x] I have searched for existing PRs
Is there an open issue for this?
- [x] I have searched for existing issues
Are you going to work on this?
- [x] If I'm planning to work on this module, I added myself to the
Assigneesto facilitate tracking who is working on the module
chopper can be used together with a fasta file to filter reads against. The current module does not allow for the user to pass along a fasta file as an input. However, chopper can also be used without a fasta file for quality, and length filtering, so the option to pass along a fasta file must be flexible.
Hi, what would be the best way of doing this? We want to be able to use chopper with, and without a reference fasta to filter against. I'm inclined to let the fasta file to be an optional parameter, but it seems there is no straightforward way to give optional parameters in nextflow? would it be better to add an additional chopper module, e.g. chopper_reference, that takes an fasta file as input as well? What do you think @jfy133
@muabnezor optional inputs are possible! Pseudocode
script:
def fasta_command = fasta ? '-contam ${fasta}' : ''
"""
chopper -i ${fastq} $fastq_command
"""
For the module invocatroin you can use an empty list [] e.g. CHOPPER ( ch_fastaqs, [] ) if you don't have a fasta
Great,
I did it like that, but I had problems with the invocation when the fasta channel is empty. passing [] seems to do it.
So chopper can be invoked with something like this
CHOPPER (
ch_long_reads,
lambda.ifEmpty([])
)
PR in nf-core/modules coming soon.
Exactly!