-
Notifications
You must be signed in to change notification settings - Fork 836
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 gcta/gsmr tool #8140
base: master
Are you sure you want to change the base?
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. " |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes the log is instable.
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it expected that there is no eff_plot?
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, gsmr only emits the eff_plot when there are significant IVs which is not the case for this test data.
modules/nf-core/gcta/gsmr/main.nf
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These need to be generic so that the pipeline dev can in therory change the prefix :)
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the help! I added this modification in my last commit
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 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 <[email protected]>
PR checklist
Closes #7975
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