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 gcta/gsmr tool #8140

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Conversation

juliaapolonio
Copy link

PR checklist

Closes #7975

  • 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

@juliaapolonio
Copy link
Author

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. "
I wasn't able to figure this out...

Copy link
Contributor

@d4straub d4straub left a 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.

Comment on lines +46 to +52
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")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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?

Copy link
Author

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.

Copy link
Contributor

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"
],
[

Copy link
Contributor

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?

Copy link
Author

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.

Comment on lines 17 to 20
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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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

Copy link
Contributor

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 :)

Copy link
Author

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?

Copy link
Contributor

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 :)

Copy link
Author

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

Copy link
Contributor

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.

@juliaapolonio juliaapolonio requested a review from d4straub April 3, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants