Honest matrix for the working tree. "Native" means Elixir code in this repository. "Delegated" means a pinned library does the work and this repository does not claim the algorithm as its own. "Unsupported" means the function is absent or returns an error.

Library version: 0.1.0. A tag v0.1.0 is what publishes this version. The matrix below is the working tree, not a conformance claim.

Capability matrix

CapabilityCRAM 2.1CRAM 3.0CRAM 3.1Notes
ITF-8 / LTF-8 integersnativenativenativeStage 0
File definitionnative (version only)nativenative2.1 is reported and not walked
Container / block inspectunsupportednativenativeBoundaries, CRC, methods. No data series
SAM header textunsupportednativenativeRaw or gzip FILE_HEADER only
Reference fetchunsupportednativenativeLocal FASTA and checksum cache. Not called by inspection
Record decodeunsupporteddelegateddelegatednoodles-cram 0.103.0, dirty-CPU batches
Stream recordsunsupporteddelegateddelegatedCRAM.stream/2, default batch 256
CRAI / region queryunsupporteddelegateddelegatedElixir parses the six-column text. noodles query filters records
WriteunsupportedunsupportedunsupportedRemains unsupported in v0.1
Embedded referenceunsupportednative (flag only)native (flag only)Raw slice headers. No fetch, no base reconstruction
Refgetunsupportedopt-inopt-inallow_network: true only. Default open does not build it

Block compression methods

Names from CRAMv3 ยง8. Decoding is delegated to noodles-cram 0.103.0. This repository does not implement the algorithms. The synthetic fixtures use raw, gzip, and rans4x16. The other methods are delegated and not separately tested.

Method byteNameFirst versionStatus
0raw1.xnative for block boundaries; header text is read. Record payloads are delegated
1gzip1.xnative for the SAM header block. Other gzip blocks are delegated
2bzip22.0delegated, not separately tested
3lzma3.0delegated, not separately tested
4rans4x83.0delegated, not separately tested
5rans4x163.1delegated; present in test/fixtures/decode
6adaptive arithmetic3.1delegated, not separately tested
7fqzcomp3.1delegated, not separately tested
8name tokeniser3.1delegated, not separately tested

Data-series codecs

NULL, EXTERNAL, GOLOMB (deprecated), HUFFMAN, BYTE_ARRAY_LEN, BYTE_ARRAY_STOP, BETA, SUBEXP, GOLOMB_RICE (deprecated), GAMMA. Delegated to noodles-cram. Not marked native. The synthetic differential test does not name which series it exercised.

Platforms

PlatformCIThis workspace
Linux x86_64.github/workflows/ci.yml on ubuntu-latest: Elixir 1.20/OTP 29, 1.19/OTP 28, 1.18/OTP 27. not runnot run
macOS arm64Elixir tests are not on this platform. The NIF job builds aarch64-apple-darwin. not runElixir 1.20.2 / OTP 28.3.1, Rust 1.97.1. Compile, tests, Credo, doctor, Clippy, and cargo test passed locally

The NIF job also builds x86_64-apple-darwin, x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, and x86_64-pc-windows-msvc (NIF 2.15). Those jobs are not run. Musl is not a target.

Known limitations

  • Writing is unsupported. CRAM.write/3 returns reason: :unsupported. CRAI text is parsed here; the record filter is noodles query / query_unmapped.
  • Record decoding is delegated to noodles-cram 0.103.0. This repository does not implement the codecs.
  • Reference lookup is explicit. CRAM.info/1 does not call a provider stored on the handle. CRAM.Reference.Refget returns reason: :network_disabled unless allow_network: true.
  • CRAM 2.1 and older containers are not parsed.
  • Block methods other than raw and gzip-on-the-SAM-header are named, not decoded.
  • No conformance claim against a CRAM test corpus. One synthetic file matches samtools view -H from samtools 1.25.
  • Writing is out of scope for v0.1 even though noodles-cram can write.