Package ngs

# Interface Alignment

All Superinterfaces:
  `Fragment`

All Known Subinterfaces:
  `AlignmentIterator`

public interface Alignment extends Fragment
Represents an alignment between a Fragment and Reference sub-sequence provides a path to Read and mate Alignment

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`all`
`static final int`
`clipLeft`
`static final int`
`clipRight`
`static final int`
`maxMapQuality`
`static final int`
`minMapQuality`
`static final int`
`noWraparound`
`static final int`
`passDuplicates`
`static final int`
`passFailed`
`static final int`
`primaryAlignment`
`static final int`
`secondaryAlignment`
`static final int`
`startWithinSlice`

## Method Summary

Modifier and Type
Method
Description
`String`
`getAlignedFragmentBases()`
getAlignedFragmentBases
`int`
`getAlignmentCategory()`
Alignments are categorized as primary or secondary (alternate).
`String`
`getAlignmentId()`
Retrieve an identifying String that can be used for later access.
`long`
`getAlignmentLength()`
Retrieve the projected length of an Alignment projected upon Reference.
`long`
`getAlignmentPosition()`
Retrieve the Alignment's starting position on the Reference
`String`
`getClippedFragmentBases()`
getClippedFragmentBases
`String`
`getClippedFragmentQualities()`
getClippedFragmentQualities
`boolean`
`getIsReversedOrientation()`
Test if orientation is reversed with respect to the Reference sequence.
`String`
`getLongCigar(boolean clipped)`
getLongCigar
`int`
`getMappingQuality()`
getMappingQuality
`Alignment`
`getMateAlignment()`
getMateAlignment
`String`
`getMateAlignmentId()`
getMateAlignmentId
`boolean`
`getMateIsReversedOrientation()`
getMateIsReversedOrientation
`String`
`getMateReferenceSpec()`
getMateReferenceSpec
`String`
`getReadGroup()`
getReadGroup
`String`
`getReadId()`
getReadId
`String`
`getReferenceBases()`
getReferenceBases
`String`
`getReferenceSpec()`
getReferenceSpec
`char`
`getRNAOrientation()`
getRNAOrientation
`String`
`getShortCigar(boolean clipped)`
getShortCigar
`int`
`getSoftClip(int edge)`
getSoftClip
`long`
`getTemplateLength()`
getTemplateLength
`boolean`
`hasMate()`
hasMate

### Methods inherited from interface ngs.Fragment

`getFragmentBases, getFragmentBases, getFragmentBases, getFragmentId, getFragmentQualities, getFragmentQualities, getFragmentQualities, isAligned, isPaired`

## Field Details

### passFailed

static final int passFailed

See Also:
  - Constant Field Values

### passDuplicates

static final int passDuplicates

See Also:
  - Constant Field Values

### minMapQuality

static final int minMapQuality

See Also:
  - Constant Field Values

### maxMapQuality

static final int maxMapQuality

See Also:
  - Constant Field Values

### noWraparound

static final int noWraparound

See Also:
  - Constant Field Values

### startWithinSlice

static final int startWithinSlice

See Also:
  - Constant Field Values

### primaryAlignment

static final int primaryAlignment

See Also:
  - Constant Field Values

### secondaryAlignment

static final int secondaryAlignment

See Also:
  - Constant Field Values

### all

static final int all

See Also:
  - Constant Field Values

### clipLeft

static final int clipLeft

See Also:
  - Constant Field Values

### clipRight

static final int clipRight

See Also:
  - Constant Field Values

## Method Details

### getAlignmentId

String getAlignmentId() throws ErrorMsg
Retrieve an identifying String that can be used for later access. The id will be unique within ReadCollection.

Returns:
  alignment id
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getReferenceSpec

String getReferenceSpec() throws ErrorMsg
getReferenceSpec

Returns:
  the name of the reference
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getMappingQuality

int getMappingQuality() throws ErrorMsg
getMappingQuality

Returns:
  mapping quality
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getReferenceBases

String getReferenceBases() throws ErrorMsg
getReferenceBases

Returns:
  reference bases
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getReadGroup

String getReadGroup() throws ErrorMsg
getReadGroup

Returns:
  the name of the read-group
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getReadId

String getReadId() throws ErrorMsg
getReadId

Returns:
  the unique name of the read
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getClippedFragmentBases

String getClippedFragmentBases() throws ErrorMsg
getClippedFragmentBases

Returns:
  clipped fragment bases
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getClippedFragmentQualities

String getClippedFragmentQualities() throws ErrorMsg
getClippedFragmentQualities

Returns:
  clipped fragment phred quality values using ASCII offset of 33
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getAlignedFragmentBases

String getAlignedFragmentBases() throws ErrorMsg
getAlignedFragmentBases

Returns:
  fragment bases in their aligned orientation
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getAlignmentCategory

int getAlignmentCategory() throws ErrorMsg
Alignments are categorized as primary or secondary (alternate).

Returns:
  either Alignment.primaryAlignment or Alignment.secondaryAlignment
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getAlignmentPosition

long getAlignmentPosition() throws ErrorMsg
Retrieve the Alignment's starting position on the Reference

Returns:
  unsigned 0-based offset from start of Reference
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getAlignmentLength

long getAlignmentLength() throws ErrorMsg
Retrieve the projected length of an Alignment projected upon Reference.

Returns:
  unsigned length of projection
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getIsReversedOrientation

boolean getIsReversedOrientation() throws ErrorMsg
Test if orientation is reversed with respect to the Reference sequence.

Returns:
  true if reversed
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getSoftClip

int getSoftClip(int edge) throws ErrorMsg
getSoftClip

Parameters:
  `edge` - which edge
Returns:
  the position of the clipping
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getTemplateLength

long getTemplateLength() throws ErrorMsg
getTemplateLength

Returns:
  the lenght of the template
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getShortCigar

String getShortCigar(boolean clipped) throws ErrorMsg
getShortCigar

Parameters:
  `clipped` - selects if clipping has to be applied
Returns:
  a text string describing alignment details
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getLongCigar

String getLongCigar(boolean clipped) throws ErrorMsg
getLongCigar

Parameters:
  `clipped` - selects if clipping has to be applied
Returns:
  a text string describing alignment details
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getRNAOrientation

char getRNAOrientation() throws ErrorMsg
getRNAOrientation

Returns:
  '+' if positive strand is transcribed; '-' if negative strand is transcribed; '?' if unknown
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### hasMate

boolean hasMate()
hasMate

Returns:
  if the alignment has a mate

### getMateAlignmentId

String getMateAlignmentId() throws ErrorMsg
getMateAlignmentId

Returns:
  unique ID of th alignment
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getMateAlignment

Alignment getMateAlignment() throws ErrorMsg
getMateAlignment

Returns:
  the mate as alignment
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getMateReferenceSpec

String getMateReferenceSpec() throws ErrorMsg
getMateReferenceSpec

Returns:
  the name of the reference the mate is aligned at
Throws:
  `ErrorMsg` - if the property cannot be retrieved

### getMateIsReversedOrientation

boolean getMateIsReversedOrientation() throws ErrorMsg
getMateIsReversedOrientation

Returns:
  the orientation of the mate
Throws:
  `ErrorMsg` - if the property cannot be retrieved