ga4gh/schemas — pull request #60 by lh3 (2014-05-21 02:50:42+00:00)
Title: Replace GARead with GAAlignmentRecord

(This is a refinement of #47, which has been closed because I mistakenly created a branch on the GA4GH repository and sent the pull request from that branch.)

In a SAM file, each record line describes a linear alignment annotated with the fragment and read attributes as well as limited and duplicated information about the mate and other linear alignments if the alignment is chimeric. GAAlignmentRecord in this PR closely mirrors and extends a SAM record. It *optionally* allows more information, such as the mate cigar and mate sequence, to be retrieved when the read store backend supports such operations efficiently.

#38 and #51 are two alternatives to this PR. #38 explicitly describes the concept hierarchy: Fragment <- Read <- Alignment <- LinearAlignment. However, in #38, a Fragment may contain >1 alignments that may be distant from each other. Retrieving a full Fragment object may either require to duplicate data in large scale or incur frequent random access which is slow. I couldn't think of an efficient implementation. #51 takes Read as the primary object. It unfortunately has the same problem with #38: a Read may contain >1 alignments distant from each others. #38 and #51 are also incompatible with readmethods.avdl which requires sorted GARead - reads cannot be sorted; only alignments can.