Skip to content

Conversation

@gburnett-nvidia
Copy link
Contributor

@gburnett-nvidia gburnett-nvidia commented Oct 30, 2025

PR checklist

Closes #9230

  • 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

The solution follows this logic:

  1. Check if the .fasta file exists in the same directory as the index files with the correct pattern.
    a. We can use the same code as in the baseline bwa-meth nf-core module here (https://github.com/nf-core/modules/blob/master/modules/nf-core/bwa/mem/main.nf#L39) to determine what file pattern is expected.
  2. If it does not exist:
    a. Create a fake (empty) file for BAM writing.
    b. Use symlink for CRAM writing.
  3. After alignment is done, cleanup the fake empty file or the symlink. That way we do not scatter around files.
    a. The cleanup occurs every time? For example in case the alignment fails with an error we would still cleanup after ourselves.

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.

parabricks/fq2bam needs the fasta in the same folder as the BWAIndex

1 participant