-
Notifications
You must be signed in to change notification settings - Fork 735
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
Add wittyer as module #5171
Conversation
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.
It's looking very promising already!
modules/nf-core/wittyer/main.nf
Outdated
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 |
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.
Could you remove any custom extensions that are not file extensions? This should be done to make all filenames as customizable as possible :)
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 think eval
was added to show that this vcf is the result of the benchmarking comparison. Should that be captured via prefix
then?
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 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
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.
but the name is generated through wittyer, I think it makes sense to keep original extensions.
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.
eval is already exist in original output, only prefix is being added here to the name. I would prefer it in this way actually.
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 changed it now and added the if statements to make sure we don't run into Nextflow Errors.
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.
But I was not adding the extension by myself :D it is the standard output by the tool.
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.
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.
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.
But the eval
is only added when you move the file from the output directory?
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 am copying the result here. eval is in standard output.
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } |
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.
Do we need more assertions here?
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, per output
Co-authored-by: Nicolas Vannieuwkerke <[email protected]>
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.
Almost there!
modules/nf-core/wittyer/main.nf
Outdated
|
||
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) |
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.
Don't use stageAs
here, it's easier to debug modules if they retain the original filenames :)
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 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?
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.
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
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'll change it and adapt the test accordingly
Can you also exclude the conda test in |
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.
LGTM!
* 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]>
* 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)
* 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)
* 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]>
* 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]>
* 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]>
PR checklist
Closes #4739 , relates to nf-core/variantbenchmarking#10
versions.yml
file.label
nf-core modules test <MODULE> --profile docker
nf-core modules test <MODULE> --profile singularity
nf-core modules test <MODULE> --profile conda
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.