Package htsjdk.samtools.cram.structure

# Class AlignmentSpan

java.lang.Object
htsjdk.samtools.cram.structure.AlignmentSpan

public class AlignmentSpan extends Object
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

Constructors
Constructor
Description
`AlignmentSpan(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 Type
Method
Description
`static AlignmentSpan`
`combine(AlignmentSpan a, AlignmentSpan b)`
Combine two AlignmentSpans
`boolean`
`equals(Object o)`
`int`
`getAlignmentSpan()`
`int`
`getAlignmentStart()`
`int`
`getMappedCount()`
`int`
`getUnmappedCount()`
`int`
`getUnmappedUnplacedCount()`
`int`
`hashCode()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

## 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 system
  `alignmentSpan` - span from minimum alignment start to maximum alignment end of the reads represented by this span span = max(end) - min(start) + 1
  `mappedCount` - number of mapped reads in the span
  `unmappedCount` - number of unmapped reads in the span

## Method Details

### combine

public static AlignmentSpan combine(AlignmentSpan a, AlignmentSpan b)
Combine two AlignmentSpans

Parameters:
  `a` - the first AlignmentSpan to combine
  `b` - 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

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`