Skip to content

bedtools fails to read CRAM 3.1 files produced by HTSlib ≥1.22 #1137

@omegahh

Description

@omegahh

Description

bedtools fails to read CRAM files produced by HTSlib 1.22 or later, which now defaults to CRAM version 3.1 output.

Error Message

bedtools merge -i example.cram
Error: line number 1 of file example.cram has 1 fields, but 0 were expected.

Similar errors occur with other bedtools commands that accept BAM/CRAM input.

Root Cause

As noted in the https://github.com/samtools/htslib/releases/tag/1.22:

Note this release changes the default output CRAM version from 3.0 to 3.1. HTSlib and SAMtools have been able to read CRAM 3.1 since version 1.12, however other tools may not yet be able to cope.

CRAM 3.1 has been readable by HTSlib since version 1.12 (released 2021), but bedtools appears to not support it yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions