biod / sambamba

Tools for working with SAM/BAM data
http://thebird.nl/blog/D_Dragon.html
GNU General Public License v2.0
557 stars 104 forks source link

Cram format support #443

Closed jjfarrell closed 4 years ago

jjfarrell commented 4 years ago

Is cram format for input supported? The command line doc shows only <input.bam|input sam> but the is a parameter listed as -C that indicates cram is supported for input. Sambamba generates lots of errors when reading the cram so I suspect not. It would be good if the -C is dropped from the usage description and a single nice error that cram input is not supported.

sambamba 0.7.1 by Artem Tarasov and Pjotr Prins (C) 2012-2019 LDC 1.17.0 / DMD v2.087.1 / LLVM8.0.1 / bootstrap LDC - the LLVM D compiler (1.17.0)

Usage: sambamba-view [options] <input.bam | input.sam> [region1 [...]]

Options: -F, --filter=FILTER set custom filter for alignments --num-filter=NUMFILTER filter flag bits; 'i1/i2' corresponds to -f i1 -F i2 samtools arguments; either of the numbers can be omitted -f, --format=sam|bam|cram|json|unpack specify which format to use for output (default is SAM); unpack streams unpacked BAM -h, --with-header print header before reads (always done for BAM output) -H, --header output only header to stdout (if format=bam, the header is printed as SAM) -I, --reference-info output to stdout only reference names and lengths in JSON -L, --regions=FILENAME output only reads overlapping one of regions from the BED file -c, --count output to stdout only count of matching records, hHI are ignored -v, --valid output only valid alignments -S, --sam-input specify that input is in SAM format -C, --cram-input specify that input is in CRAM format

pjotrp commented 4 years ago

355

jjfarrell commented 4 years ago

Why was this closed? Documentation and lack of feedback for lack of the commonly used cram format is still missing.

  1. Wouldn't it be nice for a user not to get an lots of slice error message when running this on a cram. A message like "cram format is not supported and never will be" would be preferable. Just test the extension and exit.

  2. The command line help still suggests the cram cram format is supported.