add gcta/gsmr tool#8140
Conversation
|
Hi, I'm having linting issues with my code, in the meta.yml file. The error message is " The meta.yml of the module gcta/gsmr is not valid: {'reference': {'type': 'file', 'description': 'Reference files (BED, BIM, FAM) for GCTA analysis', 'pattern': '*.{bed,bim,fam}', multiple': True}} is not of type 'array'. Check the entry for input. " |
d4straub
left a comment
There was a problem hiding this comment.
Looks good, but args seem quite important to me.
| assert snapshot( | ||
| process.out.gsmr, | ||
| process.out.eff_plot, | ||
| process.out.mono_badsnps, | ||
| process.out.versions | ||
| ).match() | ||
| assert path(process.out.versions.get(0)).text.contains("GSMR") |
There was a problem hiding this comment.
| assert snapshot( | |
| process.out.gsmr, | |
| process.out.eff_plot, | |
| process.out.mono_badsnps, | |
| process.out.versions | |
| ).match() | |
| assert path(process.out.versions.get(0)).text.contains("GSMR") | |
| assert snapshot(process.out).match() |
That should work or is the md5sum of the log instable?
There was a problem hiding this comment.
Yes the log is instable.
There was a problem hiding this comment.
ok then still this line is not neceassry :)
assert path(process.out.versions.get(0)).text.contains("GSMR")
| "test_exposure_test_outcome.gsmr:md5,f137c763773522ea37849d919f6de9aa" | ||
| ], | ||
| [ | ||
|
|
There was a problem hiding this comment.
Is it expected that there is no eff_plot?
There was a problem hiding this comment.
Yes, gsmr only emits the eff_plot when there are significant IVs which is not the case for this test data.
| path "${meta.id}_${meta2.id}.log" , emit: log | ||
| path "${meta.id}_${meta2.id}.gsmr" , emit: gsmr | ||
| path "${meta.id}_${meta2.id}.eff_plot.gz" , emit: eff_plot, optional: true | ||
| path "${meta.id}_${meta2.id}.mono.badsnps", emit: mono_badsnps, optional: true |
There was a problem hiding this comment.
| path "${meta.id}_${meta2.id}.log" , emit: log | |
| path "${meta.id}_${meta2.id}.gsmr" , emit: gsmr | |
| path "${meta.id}_${meta2.id}.eff_plot.gz" , emit: eff_plot, optional: true | |
| path "${meta.id}_${meta2.id}.mono.badsnps", emit: mono_badsnps, optional: true | |
| path "*.log" , emit: log | |
| path "*.gsmr" , emit: gsmr | |
| path "*.eff_plot.gz" , emit: eff_plot, optional: true | |
| path "*.mono.badsnps", emit: mono_badsnps, optional: true |
There was a problem hiding this comment.
These need to be generic so that the pipeline dev can in therory change the prefix :)
There was a problem hiding this comment.
That's true! But when I remove these {meta}, the lint fails with this message: 'meta' map not emitted in output channel(s)
Do you know a workaround for this?
There was a problem hiding this comment.
Ah its because you do not emit the meta map :) the output needs to be structured as tuples:
tuple val(meta), path("*.log"), emit: log
and so on :)
There was a problem hiding this comment.
Thanks for the help! I added this modification in my last commit
There was a problem hiding this comment.
I think we allow only one meta map per output. Maybe you can ask in the slack for help for your specific use-case.
Co-authored-by: Famke Bäuerle <45968370+famosab@users.noreply.github.com>
* master: (1721 commits) Remove non-standard ext keys to comply with nf-core guidelines (nf-core#10806) Migrate bam2fastx/bam2fastq module to topic channels (nf-core#10438) Remove ext.batch_size to comply with nf-core guidelines (nf-core#10655) Add an input channel to `blast/makeblastedb` for taxonomic information. (nf-core#10802) Move ext.postprocessing script to input to comply with nf-core guidelines (nf-core#10819) Update to topics `eido/*` (nf-core#10881) Remove ext.metrics to comply with nf-core guidelines (nf-core#10900) Ensure fastq_list is always a list in `generateReadgroupBCLCONVERT` function (nf-core#10901) Remove ext.context_type to conform to nf-core guidelines (nf-core#10442) Update to topics `crisprcleanr/normalize` (nf-core#10828) Migrate Diann versions to topic (nf-core#10883) feat(stardist): update to Seqera Containers GPU image with model input (nf-core#10332) Add SVIM module (nf-core#10350) samtools merge - single index output (nf-core#10898) Rattle cluster (nf-core#7447) Adding a log to record stdout from Genescopefk (nf-core#10897) This pr closes nf-core#10757 (nf-core#10871) 10657 migration to topics channels cnvpytorhistogram (nf-core#10870) 10660 migration to topics channels cnvpytorview (nf-core#10874) esearch migration to topics (nf-core#10887) ...
|
Might be replaced by #10995? |
famosab
left a comment
There was a problem hiding this comment.
Just some minor things and then we can get this merged :)
| { assert process.success }, | ||
| { assert snapshot(process.out.gsmr).match("gsmr_stub")}, | ||
| { assert snapshot(process.out.versions_gcta).match("versions_gcta_stub")} | ||
| ) |
There was a problem hiding this comment.
You can run
nextflow lint -format -sort-declarations -spaces 4 -harshil-alignmenton this file to clean this up nicely.
|
Bump for @juliaapolonio , shall we get this finished off? |
Co-authored-by: Famke Bäuerle <45968370+famosab@users.noreply.github.com>
| conda "${moduleDir}/environment.yml" | ||
| container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
| 'https://depot.galaxyproject.org/singularity/gcta:1.94.1--h9ee0642_0': | ||
| 'biocontainers/gcta:1.94.1--h9ee0642_0' }" |
There was a problem hiding this comment.
| 'biocontainers/gcta:1.94.1--h9ee0642_0' }" | |
| 'quay.io/biocontainers/gcta:1.94.1--h9ee0642_0' }" |
| def prefix = task.ext.prefix ?: "${meta.id}_${meta2.id}" | ||
| """ | ||
| echo "${meta.id} ${exposure}" > ${meta.id}.input.txt | ||
| echo "${meta2.id} ${outcome}" > ${meta2.id} .outcome.txt |
There was a problem hiding this comment.
| echo "${meta2.id} ${outcome}" > ${meta2.id} .outcome.txt | |
| echo "${meta2.id} ${outcome}" > ${meta2.id}.outcome.txt |
| """ | ||
| input[0] = [ | ||
| [ id:'test_exposure' ], | ||
| file("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/modules/data/genomics/homo_sapiens/gsmr/sumstats.tsv") |
There was a problem hiding this comment.
Can you swap to using the modules_testdata_base_path like this:
| file("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/modules/data/genomics/homo_sapiens/gsmr/sumstats.tsv") | |
| file(params.modules_testdata_base_path + "genomics/homo_sapiens/gsmr/sumstats.tsv") |
| { assert snapshot(process.out.gsmr).match("gsmr")}, | ||
| { assert snapshot(process.out.versions_gcta).match("versions_gcta")} | ||
| { assert snapshot( | ||
| process.out.gsmr, | ||
| process.out.versions_gcta | ||
| ).match("versions_gcta")} |
There was a problem hiding this comment.
| { assert snapshot(process.out.gsmr).match("gsmr")}, | |
| { assert snapshot(process.out.versions_gcta).match("versions_gcta")} | |
| { assert snapshot( | |
| process.out.gsmr, | |
| process.out.versions_gcta | |
| ).match("versions_gcta")} | |
| { assert snapshot(sanitizeOutput(process.out, unstableKeys:["log"]).match()} |
PR checklist
Closes #7975
versions.ymlfile.labelnf-core modules test <MODULE> --profile dockernf-core modules test <MODULE> --profile singularitynf-core modules test <MODULE> --profile condanf-core subworkflows test <SUBWORKFLOW> --profile dockernf-core subworkflows test <SUBWORKFLOW> --profile singularitynf-core subworkflows test <SUBWORKFLOW> --profile conda