Package htsjdk.samtools.cram.structure
Class AlignmentSpan
java.lang.Object
htsjdk.samtools.cram.structure.AlignmentSpan
A span of over a single reference. Immutable.
Holds alignment start and span values as well as counts of how many are mapped vs. unmapped vs unmapped-unplaced.
-
Constructor Summary
ConstructorDescriptionAlignmentSpan
(int alignmentStart, int alignmentSpan, int mappedCount, int unmappedCount, int unmappedUnplacedCount) Create a new span with a multiple reads in it.AlignmentSpan
(AlignmentContext alignmentContext, int mappedCount, int unmappedCount, int unmappedUnplacedCount) This does not retain the alignmentContext referenceContext state (its just a shorthand for passing the rest of the alignmentContext values in). -
Method Summary
Modifier and TypeMethodDescriptionstatic AlignmentSpan
Combine two AlignmentSpansboolean
int
int
int
int
int
int
hashCode()
-
Constructor Details
-
AlignmentSpan
public AlignmentSpan(AlignmentContext alignmentContext, int mappedCount, int unmappedCount, int unmappedUnplacedCount) This does not retain the alignmentContext referenceContext state (its just a shorthand for passing the rest of the alignmentContext values in).- Parameters:
alignmentContext
-mappedCount
-unmappedCount
-unmappedUnplacedCount
-
-
AlignmentSpan
public AlignmentSpan(int alignmentStart, int alignmentSpan, int mappedCount, int unmappedCount, int unmappedUnplacedCount) Create a new span with a multiple reads in it.- Parameters:
alignmentStart
- minimum alignment start of the reads represented by this span, using a 1-based coordinate systemalignmentSpan
- span from minimum alignment start to maximum alignment end of the reads represented by this span span = max(end) - min(start) + 1mappedCount
- number of mapped reads in the spanunmappedCount
- number of unmapped reads in the span
-
-
Method Details
-
combine
Combine two AlignmentSpans- Parameters:
a
- the first AlignmentSpan to combineb
- the second AlignmentSpan to combine- Returns:
- the new combined AlignmentSpan
-
getAlignmentStart
public int getAlignmentStart() -
getAlignmentSpan
public int getAlignmentSpan() -
getMappedCount
public int getMappedCount() -
getUnmappedCount
public int getUnmappedCount() -
getUnmappedUnplacedCount
public int getUnmappedUnplacedCount() -
equals
-
hashCode
public int hashCode()
-