Skip to content
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

migrating flash to nf-test #5470

Merged
merged 5 commits into from
Apr 29, 2024
Merged

migrating flash to nf-test #5470

merged 5 commits into from
Apr 29, 2024

Conversation

DavideBag
Copy link
Contributor

@DavideBag DavideBag commented Apr 11, 2024

PR checklist

  • Migrating flash module to nf-test.
  • If you've fixed a bug or added code that should be tested, add tests!
  • Emit the versions.yml file.
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda

@DavideBag DavideBag requested a review from lescai April 11, 2024 14:34
@DavideBag DavideBag self-assigned this Apr 11, 2024
@DavideBag DavideBag requested review from Erkison and a team as code owners April 11, 2024 14:34
@DavideBag DavideBag requested review from koenbossers and removed request for a team April 11, 2024 14:34
Copy link
Contributor

@SPPearce SPPearce left a comment

Choose a reason for hiding this comment

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

I don't understand what the args2 is for here, when it is just next to args in the code

modules/nf-core/flash/main.nf Outdated Show resolved Hide resolved
Copy link
Contributor

@SPPearce SPPearce left a comment

Choose a reason for hiding this comment

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

Does this module take fastq files in and produce different ones? If so, can you include a check that the output files have different names

@SPPearce
Copy link
Contributor

Does this module take fastq files in and produce different ones? If so, can you include a check that the output files have different names

Or you could give them a suffix to make it clear they have been through this tool.

@lescai
Copy link
Contributor

lescai commented Apr 29, 2024

Hi @SPPearce and @DavideBag
I understand that preference is always not to hard-code any prefix / suffix, and leave this to the config.
however, as Simon highlights one should include an explicit check whenever there's the risk of an overlap in input/output names.
Best practice I'd suggest is the one adopted in the samtools module, since in sorting / slicing this is very common:
https://github.com/nf-core/modules/blob/master/modules/nf-core/samtools/sort/main.nf

@SPPearce
Copy link
Contributor

There are definitely many fastq tools that don't follow that convention though

@DavideBag
Copy link
Contributor Author

I have double checked the default output of the software which is as follows:

The default output of FLASH consists of the following files:

   - out.extendedFrags.fastq      The merged reads.
   - out.notCombined_1.fastq      Read 1 of mate pairs that were not merged.
   - out.notCombined_2.fastq      Read 2 of mate pairs that were not merged.
   - out.hist                     Numeric histogram of merged read lengths.
   - out.histogram                Visual histogram of merged read lengths.

There is no way to change the prefix added as "extendedFrags" or "notCombined".
We can introduce an input/output check as suggested, although there is little probability the input will contain those words, ending up in an overlap.

Most importantly, however, the current version of the module captures all outputs in a single channel, while they should be separated because one is the expected result (i.e. the merged reads = extendedFrags) and the other contains the not combined ones.
The potential issue here is that this change might be a breaking change for other pipelines, who can however patch the module if they wish to keep all reads in a single channel.
I have discussed this with @lescai but asking @maxulysse for advice on this, before adding the changes to this PR.

@SPPearce
Copy link
Contributor

SPPearce commented Apr 29, 2024 via email

Copy link
Contributor

@lescai lescai left a comment

Choose a reason for hiding this comment

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

LGTM now, quite thorough and now more explicit with flash documentation.

@DavideBag DavideBag added this pull request to the merge queue Apr 29, 2024
@DavideBag
Copy link
Contributor Author

Thank you to @SPPearce and @lescai for investing time in reviewing.

Merged via the queue into nf-core:master with commit 4db86a0 Apr 29, 2024
11 checks passed
@DavideBag DavideBag deleted the flash branch April 29, 2024 17:16
adamrtalbot pushed a commit to adamrtalbot/modules that referenced this pull request Apr 30, 2024
* migrating flash to nf-test

* removing args2 from main.nf

* Update nextflow.config

* Changes discussed in the outputs

---------

Co-authored-by: Simon Pearce <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request May 1, 2024
* Try alternative strategy for extracting tags

* Add check to prevent confirm pass if no tags present

* Fix some names for GHA steps

* Add fake change in fastp module

* Add fake change in bam_sort_stats_samtools module

* Add fake changes to pytest module and subworkflow

* Add debug step

* fixup

* Got some variable names wrong...

* Add subworkflows back to nf-tests

* revert confirm-pass if statement

* use JQ to separate modules and subworkflows

* Fix quoting when parsing tags

* coerce modules and subworkflows to lower case

* Add specific linting checks to dependencies

* Single vs double quotes again

* Some more variable fixing

* this might work

* fixup

* yet another fixup

* Correct modules -> subworkflows

* Fake change to pytest module

* Correct dependency

* One more time

* More sorting stuff out

* Update modules/nf-core/gunzip/tests/main.nf.test

* Add fake change to module without nf-test so pytest ONLY is triggered

* fixup incorrect variable

* Switch to using self-hosted Docker profile

* Add dependency checker from Carson Miller

* fixup

* fix(.github/python/find_changed_files.py): detect nf files less greedily and ignore tests directory

The scanning function was picking up nf files outside of the target repos. This change only scans modules, subworkflows and workflows.

* Revert to directories instead of files for module tagging

* Create optional returntype for Python script

* Remove superfluous python cache

* feat: replace custom python with reusable github action for detecting nf-test changes

* Fix variable name in output paths

* Switch to new parents dir syntax

* prod to bump version of action

* Update .github/workflows/test.yml

* Update .github/workflows/test.yml

* Exclude more subworkflows from Conda

* Update .github/workflows/test.yml

* Update .github/workflows/test.yml

* QUILT nf-test and bamlist (#5515)

* Migrate quilt to nf-test and swithc bamlist to auto generation inside the module

* Fix tests

* Fix test

* Fix tests

* Add snap

* Update license

* Add quilt tag

* Specify build hash for conda environment

* Specify build hash for conda environment

* Undo commit

* Update nf-test snapshot

* Fix config name

* Update snapshot

* Update meta.yml

* Add r-base to environment

* Update snapshot generation

* Update meta.yml

* Update snap

* Update snap

* Force sorting

* Update snapshot

* New module: gnu/split (#5428)

* dev

* dev

* dev

* add tests

* fix lint

* fix(gnu/split): pin coreutils in conda to match singularity and docker

* fix: minor formatting fixes, use modules_testdata_base_path in nf-test

---------

Co-authored-by: Kyle <[email protected]>

* Add Demuxem (#5504)

* Fix lint test

* added input

* inputs and outputs demuxem

* updates demuxem, missing snap test

* fixes

* out new parameters testing

* tests passed

* lint test check

* editorconfig fixes

* more fixes editorconfig

* fix editorconfig

* line 24 whitespace

* blank spaces

* fix line 23

* test to fix trailing whitespace

* fix line23

* fix main

* Fix AMRFinderPlus (#5521)

Fix folder renaming

* fix stubs salmon (#5517)

* fix stubs

* fix stub¨

* Update modules/nf-core/salmon/quant/main.nf

---------

Co-authored-by: Lucpen <[email protected]>
Co-authored-by: Annick Renevey <[email protected]>

* Update mcquant: Added nf-test and meta.yml information (#5507)

* Transition to nf-test and meta.yml info fix.

* Added MIT license.

* Removed conda environment.yml for mcquant.

* Added conda exclusion for nf-test.

* Changed to quay.io container.

* Removed quay.io from container

* Added repeatmodeler/builddatabase (#5416)

* Added repeatmodeler/builddatabase

* Fixed version extraction

* Now doing md5 check on stable db files

* bump wisecondorx to v1.2.7 (#5523)

* Add Freemuxlet to modules (#5520)

* add freemuxlet

* add snapshot

* pass container test

* remove trailing whitespace

* add optional output files creation

* remove ldist

* fix test

* add snapshot

---------

Co-authored-by: Xichen Wu <[email protected]>
Co-authored-by: wxicu <[email protected]>

* chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.4.2 (#5527)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Updating sentieon to 202308.02 (#5525)

* Updating sentieon to 202308.02

* Fixing typo

* Fix stale action (#5530)

* ci: Try not setting the repo-token

* ci: Run clean-up on dispatch

* Changed tag from single quotes to double quotes (#5531)

Co-authored-by: Simon Pearce <[email protected]>

* [TYPO] Align commas (#5380)

Align commas

Co-authored-by: Simon Pearce <[email protected]>

* GFFREAD: updated to 0.12.7, added meta and fasta input/output (#5448)

* GFFREAD: updated to 0.12.7, added meta and fasta input/output

* Added a comment explaining args_sorted

* re delete gatk4/bedtointervallist from pytest_modules.yml after it was added again (see #5251) (#5328)

delete gatk4/bedtointervallist from pytest_modules.yml

Co-authored-by: LE BARS Victor <[email protected]>

* Update mosdepth to 0.3.8 (#5538)

* Update mosdepth to 0.3.8

* Updating main.nf.test.snap

* migrating flash to nf-test (#5470)

* migrating flash to nf-test

* removing args2 from main.nf

* Update nextflow.config

* Changes discussed in the outputs

---------

Co-authored-by: Simon Pearce <[email protected]>

* add riboseq transcriptome bam to test config (#5537)

* add ribo-seq transcriptome bam

* remove extra line

* Update nanoplot/main.nf (#5460)

Update main.nf

Updated the "def input_file" section so that it not only takes fastq file with ".fastq.gz" suffix but also ".fq.gz".

* Added repeatmodeler/repeatmodeler (#5536)

* repeatmodeler/repeatmodeler

* Demoted to process_medium

* Update modules/nf-core/repeatmodeler/repeatmodeler/main.nf

Co-authored-by: Simon Pearce <[email protected]>

---------

Co-authored-by: Simon Pearce <[email protected]>

* Blastdbcmd new module (#5482)

* starting blastdbcmd

* carry on

* Making it work with simple entry version

* Upgrade to make entry_batch work

* Upgrade to make it work with tests

* adding missing tag

* Removed versions to make it pass the tests in Github

* Make it work with versions and so

* Update modules/nf-core/blast/blastdbcmd/meta.yml

Co-authored-by: James A. Fellows Yates <[email protected]>

* Update modules/nf-core/blast/blastdbcmd/meta.yml

Co-authored-by: James A. Fellows Yates <[email protected]>

* Move module into two and upgrade according to comments

* upgrade with outfmt forced

* Turn back into one module

* Update modules/nf-core/blast/blastdbcmd/main.nf

Co-authored-by: James A. Fellows Yates <[email protected]>

* update tags and stub test

* fix stub

* making it work more widely

* editorcheck error

* addressing comments

* Update modules/nf-core/blast/blastdbcmd/meta.yml

Co-authored-by: James A. Fellows Yates <[email protected]>

---------

Co-authored-by: James A. Fellows Yates <[email protected]>

* Remove fake changes

Co-authored-by: Carson J Miller <[email protected]>

* Use merge group base ref instead of PR base_ref when merging

* fixup

* Use SHA instead of head ref

* fixup

* work

* origin/

* cmon

* one more time with feeling

* fixup again

* Worth a try

* Increase fetch depth to 2

* Use SHA instead of head ref

---------

Co-authored-by: Louis LE NEZET <[email protected]>
Co-authored-by: Kyle Hazen <[email protected]>
Co-authored-by: Kyle <[email protected]>
Co-authored-by: Mylène Mariana Gonzales André <[email protected]>
Co-authored-by: Jasmin Frangenberg <[email protected]>
Co-authored-by: Lucía Peña-Pérez <[email protected]>
Co-authored-by: Lucpen <[email protected]>
Co-authored-by: Annick Renevey <[email protected]>
Co-authored-by: Florian Wuennemann <[email protected]>
Co-authored-by: Usman Rashid <[email protected]>
Co-authored-by: Nicolas Vannieuwkerke <[email protected]>
Co-authored-by: Xichen Wu <[email protected]>
Co-authored-by: Xichen Wu <[email protected]>
Co-authored-by: wxicu <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Anders Sune Pedersen <[email protected]>
Co-authored-by: Edmund Miller <[email protected]>
Co-authored-by: Leon Hafner <[email protected]>
Co-authored-by: Simon Pearce <[email protected]>
Co-authored-by: Leon Rauschning <[email protected]>
Co-authored-by: vlebars <[email protected]>
Co-authored-by: LE BARS Victor <[email protected]>
Co-authored-by: DavideBag <[email protected]>
Co-authored-by: iraiosub <[email protected]>
Co-authored-by: Ashot Margaryan <[email protected]>
Co-authored-by: Toni Hermoso Pulido <[email protected]>
Co-authored-by: James A. Fellows Yates <[email protected]>
Co-authored-by: Carson J Miller <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants