modules icon indicating copy to clipboard operation
modules copied to clipboard

`last/mafconvert`: add read group IDs and sort SAM/BAM/CRAM files.

Open charles-plessy opened this issue 10 months ago • 0 comments

Just after I started to use this module to produce BAM files, my users asked if I can provide thes BAM files already sorted. Sorting is necessary for indexing, which is necessary for random access and display on browsers.

I can't think of a workflow where the performance or the ease of use would be worsened when SAM/BAM/CRAM files are sorted by default. Therefore I think that it is best to sort these files on the fly in this module.

In addition, this MR also adds a read group with ID and sample name the same as meta.id for all converted alignments. This makes it easy to concatenate files where different queries are aligned on the same target.

  • [x] This comment contains a description of changes (with reason).
  • [x] If you've fixed a bug or added code that should be tested, add tests!
  • [x] If you've added a new tool - have you followed the module conventions in the contribution docs
  • [x] If necessary, include test data in your PR.
  • [x] Remove all TODO statements.
  • [x] Emit the versions.yml file.
  • [x] Follow the naming conventions.
  • [x] Follow the parameters requirements.
  • [x] Follow the input/output options guidelines.
  • [x] Add a resource label
  • [x] 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:
      • [x] nf-core modules test <MODULE> --profile docker
      • [x] nf-core modules test <MODULE> --profile singularity
      • [x] nf-core modules test <MODULE> --profile conda
    • For subworkflows:
      • [x] nf-core subworkflows test <SUBWORKFLOW> --profile docker
      • [x] nf-core subworkflows test <SUBWORKFLOW> --profile singularity
      • [x] nf-core subworkflows test <SUBWORKFLOW> --profile conda

charles-plessy avatar Mar 19 '25 06:03 charles-plessy