-
Notifications
You must be signed in to change notification settings - Fork 59
DIAMOND: only use READ1 for paired-end reads without merging #631
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
Conversation
|
Warning Newer version of the nf-core template is available. Your pipeline is using an old version of the nf-core template: 3.3.1. For more documentation on how to update your pipeline, please see the nf-core documentation and Synchronisation documentation. |
|
Midnighter
left a comment
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 understand that you only changed the message, but are we sure that we want a warning message per sample? I can see pros and cons.
subworkflows/local/profiling.nf
Outdated
| log.warn("[nf-core/taxprofiler] DIAMOND does not accept paired-end files as input. To run DIAMOND on this sample, please merge reads (e.g. with --shortread_qc_mergepairs). Skipping DIAMOND for sample ${meta.id}.") | ||
| log.warn("[nf-core/taxprofiler] DIAMOND does not accept paired-end files as input. For this sample, please merge reads (e.g. with --shortread_qc_mergepairs --shortread_qc_includeunmerged) or only Read 1 will be used without merging. Running DIAMOND for sample ${meta.id} using only Read 1. ") | ||
| } | ||
| meta.single_end |
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.
What is this doing?
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.
Just a warning message for paired-reads. Should I completely remove this warning message and document it in the usage?
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.
no I meant the meta.single_end line 😬
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've tested single_end reads and the output looks good.
sample,run_accession,instrument_platform,fastq_1,fastq_2,fasta
2611,ERR5766174,ILLUMINA,,,https://raw.githubusercontent.com/nf-core/test-datasets/taxprofiler/data/fasta/ERX5474930_ERR5766174_1.fa.gz
2612,ERR5766180,ILLUMINA,https://raw.githubusercontent.com/nf-core/test-datasets/taxprofiler/data/fastq/ERX5474936_ERR5766180_1.fastq.gz,,
ERR3201952,ERR3201952,OXFORD_NANOPORE,https://raw.githubusercontent.com/nf-core/test-datasets/taxprofiler/data/fastq/ERR3201952.fastq.gz,,
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.
Or what do you mean here?
Co-authored-by: James A. Fellows Yates <[email protected]>
Co-authored-by: James A. Fellows Yates <[email protected]>
You could do, you could have a run mixing SE and PE data |
|
@nf-core-bot fix linting |
jfy133
left a comment
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.
Couple minor things but it otherwise looks good to me - thanks @LilyAnderssonLee for the fast fix!
subworkflows/local/profiling.nf
Outdated
| log.warn("[nf-core/taxprofiler] DIAMOND does not accept paired-end files as input. To run DIAMOND on this sample, please merge reads (e.g. with --shortread_qc_mergepairs). Skipping DIAMOND for sample ${meta.id}.") | ||
| log.warn("[nf-core/taxprofiler] DIAMOND does not accept paired-end files as input. For this sample, please merge reads (e.g. with --shortread_qc_mergepairs --shortread_qc_includeunmerged) or only Read 1 will be used without merging. Running DIAMOND for sample ${meta.id} using only Read 1. ") | ||
| } | ||
| meta.single_end |
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.
no I meant the meta.single_end line 😬
Co-authored-by: James A. Fellows Yates <[email protected]>
Co-authored-by: James A. Fellows Yates <[email protected]>
Midnighter
left a comment
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.
Clean work! I hope enough people look at the docs and/or pay attention to the warning 😉
|
I've found a possible bug: I think it's badly parsing the input file when it's a single path and not a list, so it's taking 'worksppace' as the root folder. |
|
I added some dumps (but you can also check work directories), that the following commands worked as expectd:
Could you please cross check @LilyAnderssonLee ? |
I have tested and got the results as you described. |
| reads: [it[0] + it[2], it[1]] | ||
| db: [it[2], it[3]] | ||
| reads: [meta + meta_db, meta.single_end ? reads : reads[0]] | ||
| db: [meta_db, db] |
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.
@jfy133 I spotted the error. filter condition actually only allows single-end reads to proceed to DIAMOND analysis. I have tested this one and it should work now.
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.
Ooops yes good catch!
I think the change makes sense, as we no-longer have to distinguish between single nor paired end (we just take R1 from paired end), so no filtering necessary 👍
|
@nf-core-bot fix linting |
| reads: [it[0] + it[2], it[1]] | ||
| db: [it[2], it[3]] | ||
| reads: [meta + meta_db, meta.single_end ? reads : reads[0]] | ||
| db: [meta_db, db] |
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.
Ooops yes good catch!
I think the change makes sense, as we no-longer have to distinguish between single nor paired end (we just take R1 from paired end), so no filtering necessary 👍
PR checklist
nf-core pipelines lint).nextflow run . -profile test,docker --outdir <OUTDIR>).nextflow run . -profile debug,test,docker --outdir <OUTDIR>).docs/usage.mdis updated.docs/output.mdis updated.CHANGELOG.mdis updated.README.mdis updated (including new tool citations and authors/contributors).