-
Notifications
You must be signed in to change notification settings - Fork 110
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
Add chopper and nanoq options for longread preprocessing #692
base: dev
Are you sure you want to change the base?
Conversation
…subworkflow for alternative use of chopper for lambda-removal instead of nanolyse, and nanoq for longread filtering instead of filtlong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looking good so far!
Missing updates to citations.md
and output.md
though!
ch_long_reads = NANOLYSE.out.fastq | ||
ch_versions = ch_versions.mix(NANOLYSE.out.versions.first()) | ||
if (params.longread_phageremoval_tool == 'chopper') { | ||
CHOPPER ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So theoretically CHOPPER can also be used for quality and length filtering , so maybe we should make this an option too?
It might need slightly more complicated conditions to know when both phageremvoal and filtering is set to chopper, but it would certainly be more efficient too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thought about fixing that. Coming up!
Also don't worry about linting and checkm tests, the format I'm fixing now in the template merge in #689 , and for checkM the database server is done |
withName: CHOPPER { | ||
ext.args2 = [ | ||
!params.keep_lambda ? "--contam ${params.lambda_reference}": "", | ||
params.longreads_min_quality ? "--quality ${params.longreads_min_quality}": "", | ||
params.longreads_min_length ? "--minlength ${params.longreads_min_length}": "", | ||
].join(' ').trim() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the option to use chopper for filtering. Since the conditions in the subworkflow got a bit messy, i decided to put the logic in the modules.config. In this way if params.keep_phage is true, and params.longread_filtering_tool is chopper will run both phage removal and filtering. what do you think of this @jfy133?
I realized that allowing the user to choose filtering tools other than filtlong for long reads might introduce an issue. Since filtlong now uses preprocessed short reads to filter the long reads, this means that long reads will piggyback on the short reads and also undergo host removal, assuming the host is removed from the short reads. If the user opts to use chopper for filtering long reads, we might need to implement a separate process for host removal from the long reads. However, it may be better to address this in a future PR. What do you think, @jfy133? |
Hmm, might need some discussion when I'm not so tired, that said the issue might be related to #691, is that correct? Maybe if we update the filtlong module this is less of a problem? What do you think? |
#691 is kind of related to this, but I think it is reasonable to use when running in hybrid mode. Maybe we can talk more during dev-hours? |
Yes let's talk then! I've almost finished the template merge too so can be more involved after that too 👍 |
PR checklist
nf-core lint
).nextflow run . -profile test,docker --outdir <OUTDIR>
).nextflow run . -profile debug,test,docker --outdir <OUTDIR>
).docs/usage.md
is updated.docs/output.md
is updated.CHANGELOG.md
is updated.README.md
is updated (including new tool citations and authors/contributors).