samtools / hts-specs

Specifications of SAM/BAM and related high-throughput sequencing file formats
http://samtools.github.io/hts-specs/
644 stars 174 forks source link

CRAM: Need to improve feature positions description #747

Closed daviesrob closed 7 months ago

daviesrob commented 10 months ago

The CRAM FP data series is described as "position of the read feature" in the CRAMv3 spec. here and here. This seems to imply an absolute position, but in fact it's relative to the previous feature, as can be seen in the encoders for htslib, htsjdk and noodles. To make this clear without having to read existing implementations, the "Read feature records" section could do with a line or two explaining how the FP data series works.

jkbonfield commented 10 months ago

I thought I'd documented this in CRAM 4, even if it was just the pseudocode bit, but apparently not. (I was probably misremembering AP.)

Good spot.