Skip to content

Add metacache query module #8537

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

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

Conversation

sofstam
Copy link
Contributor

@sofstam sofstam commented May 22, 2025

PR checklist

This PR closes: #7852

  • 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

@Gullumluvl Gullumluvl self-requested a review May 22, 2025 12:47
def prefix = task.ext.prefix ?: "${meta.id}"
def input_file = meta.single_end ? reads : "${reads[0]} ${reads[1]} -pairfiles"
"""
dbmeta=`find -L ${db}/ -name "*.meta" | head -n 1`

Choose a reason for hiding this comment

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

How about groovy code here, instead:

def dbmeta = db.find{ f -> f.name =~ $/\.meta$$/$ }

Choose a reason for hiding this comment

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

Ah sorry, did not understand that input db is a directory. Doesn't it make easier to provide the list of files? Because the output of METACACHE_BUILD is (currently) not inside a directory. (Then we would have to replace UNTAR with UNTARFILES in the tests).

Copy link

@Gullumluvl Gullumluvl left a comment

Choose a reason for hiding this comment

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

My main question is about the db input being a directory. Should I change the METACACHE_BUILD module (#8209) to emit a directory instead?

path db

output:
tuple val(meta), path("*.txt"), emit: mapping_results

Choose a reason for hiding this comment

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

To be exhaustive (maybe for later), we could add the optional output generated with the option -abundances.

    path "abundances.table", emit: abundances, optional: true

Could be triggered by adding a boolean input val abundances.

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.

new module: metacache/query
2 participants