You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mason M Lai edited this page Jun 22, 2017
·
1 revision
Representing BAM records
This framework draws a distinction between a BAM record and its alignment.
Objects that implement the Aligned interface have been, successfully or unsuccessfully, aligned to a reference. They are not annotations, because they are not guaranteed to have a valid (concordant) alignment. In other words, they may not have a reference, a start position, etc.
Objects that implement the Alignment interface have been concordantly aligned to a reference. They are annotations, and indeed extend the Annotated interface, because they have a reference, start position, etc.
In fact, the Aligned interface merely designates that the object potentially wraps an Alignment. Aligned objects have the method getAlignment(), which returns the Alignment in an Optional if it exists, and Optional.empty() if it does not.
BAM parsers have some convenience methods so that you don't often have to explicitly extract an Alignment from its corresponding Aligned object.