cljam.io.cram

Alpha - subject to change. Provides functions for reading from a CRAM file.

indexed?

(indexed? rdr)
Returns true if the reader can be randomly accessed, false if not. Note this
function immediately realizes a delayed index.

read-alignments

(read-alignments rdr)(read-alignments rdr region)
Reads all the alignments from the CRAM file and returns them as a lazy sequence
of record maps.

read-header

(read-header rdr)
Returns the header of the CRAM file.

read-refs

(read-refs rdr)
Returns the references of the CRAM file.

reader

(reader f)(reader f option)
Creates a CRAM reader depending on the argument f: If f is a file or a string
that representing the path to a CRAM file, returns a new reader that reads
that CRAM file. If f is a CRAM reader, creates and returns a cloned CRAM reader
from it.

The function also takes an optional argument `option`, which is a map that
consists of:
  - reference: A string representing the path to the reference file, or
               a sequence reader that reads sequences from the reference file.
               This may be omitted only when the CRAM file to be read does not
               require a reference file.