Skip to main content

parse_cram_from_reader

Function parse_cram_from_reader 

Source
pub fn parse_cram_from_reader<R: Read>(
    reader: R,
) -> Result<QueryHeader, ParseError>
Expand description

Parse a CRAM header from any reader (no file path required).

This enables parsing from in-memory buffers (e.g. Cursor<Vec<u8>>) without writing to a temporary file. Only the file definition and header are read.

ยงErrors

Returns ParseError::Noodles if the CRAM header cannot be parsed, ParseError::InvalidFormat if no contigs are found, or ParseError::TooManyContigs if the limit is exceeded.