Skip to content

Conversation

LilyAnderssonLee
Copy link
Contributor

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • If necessary, also make a PR on the nf-core/taxprofiler branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

@nf-core-bot
Copy link
Member

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.
Please update your pipeline to the latest version.

For more documentation on how to update your pipeline, please see the nf-core documentation and Synchronisation documentation.

Copy link

github-actions bot commented Aug 14, 2025

nf-core pipelines lint overall result: Passed ✅ ⚠️

Posted for pipeline commit 29fb01a

+| ✅ 291 tests passed       |+
!| ❗  19 tests had warnings |!

❗ Test warnings:

✅ Tests passed:

Run details

  • nf-core/tools version 3.3.2
  • Run at 2025-08-25 12:25:27

Copy link
Collaborator

@Midnighter Midnighter left a 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.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this doing?

Copy link
Contributor Author

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?

Copy link
Member

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 😬

Copy link
Contributor Author

@LilyAnderssonLee LilyAnderssonLee Aug 19, 2025

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,,

Copy link
Contributor Author

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?

LilyAnderssonLee and others added 2 commits August 14, 2025 14:02
Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>
Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>
@jfy133
Copy link
Member

jfy133 commented Aug 14, 2025

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.

You could do, you could have a run mixing SE and PE data

@LilyAnderssonLee
Copy link
Contributor Author

@nf-core-bot fix linting

Copy link
Member

@jfy133 jfy133 left a 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!

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
Copy link
Member

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 😬

@jfy133 jfy133 requested a review from Midnighter August 19, 2025 08:33
@jfy133 jfy133 dismissed Midnighter’s stale review August 19, 2025 08:33

To prevent blocking

LilyAnderssonLee and others added 2 commits August 19, 2025 10:59
Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>
Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>
Copy link
Collaborator

@Midnighter Midnighter left a 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 😉

@jfy133
Copy link
Member

jfy133 commented Aug 21, 2025

I've found a possible bug:

nextflow run ../main.nf -profile test_minimal,docker --outdir ./results --run_diamond --perform_shortread_qc -ansi-log false
  Error opening file workspace: No such file or directory

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.

@jfy133
Copy link
Member

jfy133 commented Aug 21, 2025

I added some dumps (but you can also check work directories), that the following commands worked as expectd:

  1. nextflow run ../main.nf -profile test_minimal,docker --outdir ./results --run_diamond -ansi-log false: the paired-end Illumina file used ended in _1.fastq.gz (as no merging performed
  2. nextflow run ../main.nf -profile test_minimal,docker --outdir ./results --run_diamond --perform_shortread_qc -ansi-log false: the paired-end Illumina file used ended in `_fastp.fastq.gz
  3. nextflow run ../main.nf -profile test_minimal,docker --outdir ./results --run_diamond --perform_shortread_qc -ansi-log false --short_qc_include_unmerged the paired-end Illumina file used ended in _fastp.fastq.gz

Could you please cross check @LilyAnderssonLee ?

@LilyAnderssonLee
Copy link
Contributor Author

I added some dumps (but you can also check work directories), that the following commands worked as expectd:

  1. nextflow run ../main.nf -profile test_minimal,docker --outdir ./results --run_diamond -ansi-log false: the paired-end Illumina file used ended in _1.fastq.gz (as no merging performed
  2. nextflow run ../main.nf -profile test_minimal,docker --outdir ./results --run_diamond --perform_shortread_qc -ansi-log false: the paired-end Illumina file used ended in `_fastp.fastq.gz
  3. nextflow run ../main.nf -profile test_minimal,docker --outdir ./results --run_diamond --perform_shortread_qc -ansi-log false --short_qc_include_unmerged the paired-end Illumina file used ended in _fastp.fastq.gz

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]
Copy link
Contributor Author

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.

Copy link
Member

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 👍

@sofstam
Copy link
Collaborator

sofstam commented Aug 25, 2025

@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]
Copy link
Member

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 👍

@LilyAnderssonLee LilyAnderssonLee merged commit 206d813 into dev Aug 26, 2025
8 checks passed
@LilyAnderssonLee LilyAnderssonLee deleted the diamond_input branch August 26, 2025 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants