Skip to content

Add competitive --bam and --cram CLI options, CRAM output with reference, fallback to BAM if reference missing, update help, enable BAM/CRAM by default#499

Open
BenjaminDEMAILLE wants to merge 1 commit into
pachterlab:masterfrom
BenjaminDEMAILLE:master

Conversation

@BenjaminDEMAILLE
Copy link
Copy Markdown

Add competitive --bam and --cram CLI options, CRAM output with reference, fallback to BAM if reference missing, update help, enable BAM/CRAM by default

Summary

  • Adds two mutually exclusive CLI flags: --bam and --cram to force output format.
  • Adds --cram-reference to specify the reference FASTA for CRAM output (required for CRAM).
  • If --cram is specified without --cram-reference, falls back to BAM output with a warning.
  • Updates help text to document all new options and clarify usage.
  • Enables BAM/CRAM (HTSLIB) support by default in CMake.
  • Output CRAM files are fully compatible with samtools and other HTSlib tools.

Usage

  • --bam : Force BAM output.
  • --cram --cram-reference=ref.fa : Force CRAM output using the provided reference (must be the same as for the index).
  • If both --bam and --cram are set, the program exits with an error.
  • If --cram is set without --cram-reference, the program falls back to BAM output and prints a warning.

Motivation

  • Improves user control over output format.
  • Ensures CRAM output is always valid and compatible.
  • Makes the CLI more explicit and user-friendly.

Let me know if you need any changes or more details!

…nce, fallback to BAM if reference missing, update help, enable BAM/CRAM by default
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.

1 participant