Skip to content

Fix repeatmasker bug #8495

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 1 commit into
base: master
Choose a base branch
from
Open

Fix repeatmasker bug #8495

wants to merge 1 commit into from

Conversation

BioWilko
Copy link
Contributor

@BioWilko BioWilko commented May 16, 2025

Repeatmasker names output files according to input filename (but trims .gz if present), patch to account for output file names being slightly different in this instance.

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

Repeatmasked names output files according to input filename (but trims `.gz` if present), patch to account for output file names being slightly different in this instance.
@BioWilko BioWilko requested a review from GallVp May 16, 2025 13:37
@@ -25,6 +25,8 @@ process REPEATMASKER_REPEATMASKER {
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
def lib_arg = lib ? "-lib $lib" : ''
out_fasta = fasta.getBaseName(fasta.name.endsWith('.gz') ? 1 : 0)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
out_fasta = fasta.getBaseName(fasta.name.endsWith('.gz') ? 1 : 0)
def out_fasta = fasta.getBaseName(fasta.name.endsWith('.gz') ? 1 : 0)

mv $prefix/${fasta}.out ${prefix}.out
mv $prefix/${fasta}.tbl ${prefix}.tbl
mv $prefix/${fasta}.out.gff ${prefix}.gff || echo "GFF is not produced"
mv $prefix/${out_fasta}.masked ${prefix}.masked
Copy link
Member

Choose a reason for hiding this comment

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

Thank you @BioWilko

Can we add a test to verify that this problem has been fixed? Perhaps a zipped input fasta?

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.

2 participants