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

Add wittyer as module #5171

Merged
merged 41 commits into from
Mar 20, 2024
Merged

Add wittyer as module #5171

merged 41 commits into from
Mar 20, 2024

Conversation

famosab
Copy link
Contributor

@famosab famosab commented Mar 18, 2024

PR checklist

Closes #4739 , relates to nf-core/variantbenchmarking#10

  • 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 module conventions in the contribution docs
  • If necessary, include test data in your PR.
  • Remove all TODO statements.
  • Emit the versions.yml file.
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • 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
    • For subworkflows:
      • nf-core subworkflows test <SUBWORKFLOW> --profile docker
      • nf-core subworkflows test <SUBWORKFLOW> --profile singularity
      • nf-core subworkflows test <SUBWORKFLOW> --profile conda

According to slack discussion, the docker image still needs to be added to the nf-core registry.

@famosab famosab self-assigned this Mar 18, 2024
Copy link
Contributor

@nvnieuwk nvnieuwk left a comment

Choose a reason for hiding this comment

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

It's looking very promising already!

Comment on lines 67 to 69
mv bench/Wittyer.Stats.json ${prefix}.Stats.json
mv bench/*.vcf.gz ${prefix}.eval.vcf.gz
mv bench/*.vcf.gz.tbi ${prefix}.eval.vcf.gz.tbi
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you remove any custom extensions that are not file extensions? This should be done to make all filenames as customizable as possible :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think eval was added to show that this vcf is the result of the benchmarking comparison. Should that be captured via prefix then?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes that should be added via the prefix. It could also be a good idea to add a simple check to see if the output filename isn't the same as the input files (otherwise Nextflow will give some weird errors) => See https://nf-co.re/docs/contributing/modules#naming-conventions part 6 for an example

Copy link
Contributor

Choose a reason for hiding this comment

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

but the name is generated through wittyer, I think it makes sense to keep original extensions.

Copy link
Contributor

Choose a reason for hiding this comment

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

eval is already exist in original output, only prefix is being added here to the name. I would prefer it in this way actually.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed it now and added the if statements to make sure we don't run into Nextflow Errors.

Copy link
Contributor

Choose a reason for hiding this comment

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

But I was not adding the extension by myself :D it is the standard output by the tool.

Copy link
Contributor

Choose a reason for hiding this comment

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

This type of names are important for traceability with standard outputs of the tool. So I would really prefer to keep is as it is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But the eval is only added when you move the file from the output directory?

Copy link
Contributor

Choose a reason for hiding this comment

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

no, I am copying the result here. eval is in standard output.

modules/nf-core/wittyer/main.nf Outdated Show resolved Hide resolved
modules/nf-core/wittyer/main.nf Outdated Show resolved Hide resolved
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we need more assertions here?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, per output

modules/nf-core/wittyer/environment.yml Show resolved Hide resolved
modules/nf-core/wittyer/meta.yml Outdated Show resolved Hide resolved
modules/nf-core/wittyer/tests/main.nf.test Show resolved Hide resolved
@famosab famosab requested a review from nvnieuwk March 19, 2024 13:25
@famosab famosab added the new module Adding a new module label Mar 19, 2024
@famosab famosab marked this pull request as ready for review March 19, 2024 13:29
@famosab famosab requested a review from a team as a code owner March 19, 2024 13:29
@famosab famosab requested a review from kubranarci March 19, 2024 13:36
Copy link
Contributor

@nvnieuwk nvnieuwk left a comment

Choose a reason for hiding this comment

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

Almost there!


input:
// use stageAs to allow comparing the same vcfs against each other
tuple val(meta), path(query_vcf, stageAs: "query.vcf.gz"), path(query_vcf_index, stageAs: "query.vcf.gz.tbi"), path(truth_vcf, stageAs: "truth.vcf.gz"), path(truth_vcf_index, stageAs: "truth.vcf.gz.tbi"), path(bed)
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't use stageAs here, it's easier to debug modules if they retain the original filenames :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to test truth and query with the same files. Because I find it easier to check if my benchmarking workflow works when I can compare a file against itself. So if I remove it here it would need to give them different names?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah but at the cost of making it harder on yourself when you want to actually use the process? Can't you make a copy of the query file and rename it before running the pipeline? :p

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll change it and adapt the test accordingly

@nvnieuwk
Copy link
Contributor

Can you also exclude the conda test in .github/workflows/test.yml? You'll find a list of modules that have their conda test excluded. Please add this module there so you won't merge any failing tests :)

@famosab famosab requested a review from nvnieuwk March 20, 2024 09:09
Copy link
Contributor

@nvnieuwk nvnieuwk left a comment

Choose a reason for hiding this comment

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

LGTM!

@famosab famosab added this pull request to the merge queue Mar 20, 2024
Merged via the queue into nf-core:master with commit 61f2ea5 Mar 20, 2024
10 checks passed
@famosab famosab deleted the wittyer branch March 20, 2024 09:38
vlebars pushed a commit to vlebars/modules that referenced this pull request Mar 20, 2024
* feat: add wittyer as module

* fix: adjust output and version

* fix: copy output and script from local

* feat: fill in in meta file

* fix: remove config file input

* fix: run prettier

* feat: explain how to create docker image

* fix: README for Docker image

* fix: modify environment file

* fix: stub and file extensions

* fix: remove custom extensions

* feat: add test file - failing

* fix: correct input for tests

* fix: licence

* fix: container name

* fix: finally correct container

* fix syntax errors

* normal test works, stub fails

* fix expected outputs

* fix: mention making image public

* fix add stageAs, use dotnet

* run prettier

* [automated] Fix linting with Prettier

* add comment for run

* fix trailing whitespace

* add dependencies to fix linting

* fix harmonize inputs in meta and main

* fix: run prettier

* [automated] Fix linting with Prettier

* fix index names

* fix version to stub_version in stub test

Co-authored-by: Nicolas Vannieuwkerke <[email protected]>

* extend tests to capture as much as possible

* test with bed file

* fix: remove stageAs

* fix tests for stageAs removal

* remove '' in meta file

* exclude conda test for wittyer

---------

Co-authored-by: nf-core-bot <[email protected]>
Co-authored-by: Nicolas Vannieuwkerke <[email protected]>
jvfe added a commit to jvfe/modules that referenced this pull request Mar 20, 2024
* master:
  Added contrast limited adaptive histogram equalization module (nf-core#5268)
  Leviosam2 index (nf-core#5316)
  Add subworkflow mapAD (nf-core#5239)
  Remove AMRFinderPlus DB update on each invocation (nf-core#5232)
  Revert "add paths in output directive in cellranger cout module" (nf-core#5306)
  Revert "update kallistobustools count output list" (nf-core#5307)
  Igv reports (nf-core#5263)
  Remove unnecessary .view() in subworkflows/nf-core/vcf_phase_shapeit5 & tests/modules/nf-core/shapeit5/ligate/main.nf (nf-core#5280)
  Add wittyer as module (nf-core#5171)
  Bamstats (nf-core#4474)
  gatk4_asereadcounter add updated meta and nf-tests (nf-core#5164)
  4557 new module kaijumergeoutputs + stub Kraken2/Kraken2 (nf-core#5249)
  add cram/index support to bwamem2 (nf-core#5248)
  Add README to modules build with Docker (nf-core#4935)
  update paths for VEP (nf-core#5281)
  nf-test bases2fastq (nf-core#5272)
  Add module seqfu/stats (nf-core#5275)
jvfe added a commit to jvfe/modules that referenced this pull request Mar 20, 2024
* master:
  Added contrast limited adaptive histogram equalization module (nf-core#5268)
  Leviosam2 index (nf-core#5316)
  Add subworkflow mapAD (nf-core#5239)
  Remove AMRFinderPlus DB update on each invocation (nf-core#5232)
  Revert "add paths in output directive in cellranger cout module" (nf-core#5306)
  Revert "update kallistobustools count output list" (nf-core#5307)
  Igv reports (nf-core#5263)
  Remove unnecessary .view() in subworkflows/nf-core/vcf_phase_shapeit5 & tests/modules/nf-core/shapeit5/ligate/main.nf (nf-core#5280)
  Add wittyer as module (nf-core#5171)
  Bamstats (nf-core#4474)
  gatk4_asereadcounter add updated meta and nf-tests (nf-core#5164)
  4557 new module kaijumergeoutputs + stub Kraken2/Kraken2 (nf-core#5249)
  add cram/index support to bwamem2 (nf-core#5248)
  Add README to modules build with Docker (nf-core#4935)
  update paths for VEP (nf-core#5281)
  nf-test bases2fastq (nf-core#5272)
  Add module seqfu/stats (nf-core#5275)
  Added gt/gff3validator (nf-core#4718)
  Added liftoff (nf-core#5209)
tucano pushed a commit to tucano/modules that referenced this pull request Mar 20, 2024
* feat: add wittyer as module

* fix: adjust output and version

* fix: copy output and script from local

* feat: fill in in meta file

* fix: remove config file input

* fix: run prettier

* feat: explain how to create docker image

* fix: README for Docker image

* fix: modify environment file

* fix: stub and file extensions

* fix: remove custom extensions

* feat: add test file - failing

* fix: correct input for tests

* fix: licence

* fix: container name

* fix: finally correct container

* fix syntax errors

* normal test works, stub fails

* fix expected outputs

* fix: mention making image public

* fix add stageAs, use dotnet

* run prettier

* [automated] Fix linting with Prettier

* add comment for run

* fix trailing whitespace

* add dependencies to fix linting

* fix harmonize inputs in meta and main

* fix: run prettier

* [automated] Fix linting with Prettier

* fix index names

* fix version to stub_version in stub test

Co-authored-by: Nicolas Vannieuwkerke <[email protected]>

* extend tests to capture as much as possible

* test with bed file

* fix: remove stageAs

* fix tests for stageAs removal

* remove '' in meta file

* exclude conda test for wittyer

---------

Co-authored-by: nf-core-bot <[email protected]>
Co-authored-by: Nicolas Vannieuwkerke <[email protected]>
jennylsmith pushed a commit to RSC-RP/modules that referenced this pull request Mar 20, 2024
* feat: add wittyer as module

* fix: adjust output and version

* fix: copy output and script from local

* feat: fill in in meta file

* fix: remove config file input

* fix: run prettier

* feat: explain how to create docker image

* fix: README for Docker image

* fix: modify environment file

* fix: stub and file extensions

* fix: remove custom extensions

* feat: add test file - failing

* fix: correct input for tests

* fix: licence

* fix: container name

* fix: finally correct container

* fix syntax errors

* normal test works, stub fails

* fix expected outputs

* fix: mention making image public

* fix add stageAs, use dotnet

* run prettier

* [automated] Fix linting with Prettier

* add comment for run

* fix trailing whitespace

* add dependencies to fix linting

* fix harmonize inputs in meta and main

* fix: run prettier

* [automated] Fix linting with Prettier

* fix index names

* fix version to stub_version in stub test

Co-authored-by: Nicolas Vannieuwkerke <[email protected]>

* extend tests to capture as much as possible

* test with bed file

* fix: remove stageAs

* fix tests for stageAs removal

* remove '' in meta file

* exclude conda test for wittyer

---------

Co-authored-by: nf-core-bot <[email protected]>
Co-authored-by: Nicolas Vannieuwkerke <[email protected]>
alexnater pushed a commit to alexnater/nf-core-modules that referenced this pull request Mar 21, 2024
* feat: add wittyer as module

* fix: adjust output and version

* fix: copy output and script from local

* feat: fill in in meta file

* fix: remove config file input

* fix: run prettier

* feat: explain how to create docker image

* fix: README for Docker image

* fix: modify environment file

* fix: stub and file extensions

* fix: remove custom extensions

* feat: add test file - failing

* fix: correct input for tests

* fix: licence

* fix: container name

* fix: finally correct container

* fix syntax errors

* normal test works, stub fails

* fix expected outputs

* fix: mention making image public

* fix add stageAs, use dotnet

* run prettier

* [automated] Fix linting with Prettier

* add comment for run

* fix trailing whitespace

* add dependencies to fix linting

* fix harmonize inputs in meta and main

* fix: run prettier

* [automated] Fix linting with Prettier

* fix index names

* fix version to stub_version in stub test

Co-authored-by: Nicolas Vannieuwkerke <[email protected]>

* extend tests to capture as much as possible

* test with bed file

* fix: remove stageAs

* fix tests for stageAs removal

* remove '' in meta file

* exclude conda test for wittyer

---------

Co-authored-by: nf-core-bot <[email protected]>
Co-authored-by: Nicolas Vannieuwkerke <[email protected]>
@famosab famosab mentioned this pull request Jul 8, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new module Adding a new module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

new module: wittyer
4 participants