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

Update Prokka to take compressed input && tidy module script #7250

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

Conversation

prototaxites
Copy link
Contributor

@prototaxites prototaxites commented Dec 19, 2024

PR checklist

Closes #XXX

  • 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

@prototaxites
Copy link
Contributor Author

prototaxites commented Dec 19, 2024

Undoing container build bump - there's some kind of java version error with minced that I'm getting when running with Singularity on our HPC (but not on Gitpod).

See tseemann/prokka#557 for details - bumped container image has a version of java that's too new:

Original image:

╰λ singularity shell $NXF_SINGULARITY_CACHEDIR/depot.galaxyproject.org-singularity-prokka-1.14.6--pl5321hdfd78af_4.img 
Singularity> java --version
openjdk 11.0.9.1-internal 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1-internal+0-adhoc..src)
OpenJDK 64-Bit Server VM (build 11.0.9.1-internal+0-adhoc..src, mixed mode)
Singularity> exit

Bumped image:

╰λ singularity shell $NXF_SINGULARITY_CACHEDIR/depot.galaxyproject.org-singularity-prokka-1.14.6--pl5321hdfd78af_5.img 
Singularity> java --version
openjdk 20.0.2-internal 2023-07-18
OpenJDK Runtime Environment (build 20.0.2-internal-adhoc..src)
OpenJDK 64-Bit Server VM (build 20.0.2-internal-adhoc..src, mixed mode, sharing)

@prototaxites
Copy link
Contributor Author

The minced binary is built with Java version 8 - I've switched the container to a Sequera container with the correct OpenJDK version pinned, and updated the Conda environment to match.

Testing seems to have fixed the problem on our cluster; hopefully will fix this intermittently reported issue in mag too: nf-core/mag#552

Copy link
Contributor

@dialvarezs dialvarezs left a comment

Choose a reason for hiding this comment

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

Hi Jim,

Supporting gzipped input is a nice adittion to have. And thank you for looking into the issues when running Prokka, because sometimes becomes mysteriously unreliable for some reason.

Aside from the minor changes I proposed, if you have time, can you please add the stub and the stub test?

Thank you.

label 'process_low'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/prokka:1.14.6--pl5321hdfd78af_4' :
'biocontainers/prokka:1.14.6--pl5321hdfd78af_4' }"
'oras://community.wave.seqera.io/library/prokka_openjdk:6ee087933c41335a' :
Copy link
Contributor

Choose a reason for hiding this comment

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

For singularity images, I've seen in the discussions that is prefered to use the https link instead of the oras one.

def prodigal_tf = prodigal_tf ? "--prodigaltf ${prodigal_tf[0]}" : ""
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
def fasta_compressed = fasta.getExtension() == "gz" ? true : false
Copy link
Contributor

Choose a reason for hiding this comment

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

? true : false seems redundant. Was there a specific reason for implementing it this way?

def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
def fasta_compressed = fasta.getExtension() == "gz" ? true : false
def input = fasta_compressed ? fasta.toString() - ~/\.gz$/ : fasta
Copy link
Contributor

@dialvarezs dialvarezs Jan 3, 2025

Choose a reason for hiding this comment

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

I guess the input declaration could be simplified too, because if the filename doesn't end with .gz the pattern should not remove anything anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants