Package ngs
Interface Reference
- All Known Subinterfaces:
ReferenceIterator
public interface Reference
Represents a reference sequence
-
Method Summary
Modifier and TypeMethodDescriptiongetAlignment
(String alignmentId) getAlignmentlong
Count all Alignments within the Referencelong
getAlignmentCount
(int categories) Count selected Alignments within the ReferencegetAlignments
(int categories) getAlignmentsgetAlignmentSlice
(long start, long length) getAlignmentSlicegetAlignmentSlice
(long start, long length, int categories) getAlignmentSlicegetCanonicalNamegetCommonNamegetFilteredAlignmentSlice
(long start, long length, int categories, int filters, int mappingQuality) getFilteredAlignmentSlice Behaves like "getAlignmentSlice" except that supported filters are applied to selectiongetFilteredPileups
(int categories, int filters, int mappingQuality) getFilteredPileups Filtered according to criteria in parametersgetFilteredPileupSlice
(long start, long length, int categories, int filters, int mappingQuality) getFilteredPileupSlice Creates a PileupIterator on a slice (window) of reference filtered according to criteria in parametersboolean
getIsCircularboolean
getIsLocallong
getLengthgetPileups
(int categories) getPileupsgetPileupSlice
(long start, long length) getPileupSlice Creates a PileupIterator on a slice (window) of referencegetPileupSlice
(long start, long length, int categories) getPileupSlice Creates a PileupIterator on a slice (window) of referencegetReferenceBases
(long offset) getReferenceBasesgetReferenceBases
(long offset, long length) getReferenceBasesgetReferenceChunk
(long offset) getReferenceChunkgetReferenceChunk
(long offset, long length) getReferenceChunk
-
Method Details
-
getCommonName
getCommonName- Returns:
- the common name of reference, e.g. "chr1"
- Throws:
ErrorMsg
- if no common name found
-
getCanonicalName
getCanonicalName- Returns:
- the accessioned name of reference, e.g. "NC_000001.11"
- Throws:
ErrorMsg
- if no cannonical name found
-
getIsCircular
getIsCircular- Returns:
- true if reference is circular
- Throws:
ErrorMsg
- if cannot detect if reference is circular
-
getIsLocal
getIsLocal- Returns:
- true if Reference is stored locally within the ReadCollection. Unique Reference sequences are stored locally, while Publicly available Reference sequences are stored externally. An exception to this rule is when a public Reference is small, in which case the sequence will be available both locally and externally
- Throws:
ErrorMsg
- if cannot detect if reference is local
-
getLength
getLength- Returns:
- the length of the reference sequence
- Throws:
ErrorMsg
- if length cannot be detected
-
getReferenceBases
getReferenceBases- Parameters:
offset
- is zero-based and non-negative- Returns:
- sub-sequence bases for Reference
- Throws:
ErrorMsg
- if no reference-bases found at offset
-
getReferenceBases
getReferenceBases- Parameters:
offset
- is zero-based and non-negativelength
- must be ≥ 0- Returns:
- sub-sequence bases for Reference
- Throws:
ErrorMsg
- if no reference-bases found at offset or lenght invalid
-
getReferenceChunk
getReferenceChunk- Parameters:
offset
- is zero-based and non-negative- Returns:
- largest contiguous chunk available of sub-sequence bases for Reference
NB - actual returned sequence may be shorter than requested. to obtain all bases available in chunk, use a negative "size" value
- Throws:
ErrorMsg
- if no ReferenceChunk found
-
getReferenceChunk
getReferenceChunk- Parameters:
offset
- is zero-based and non-negativelength
- must be > 0- Returns:
- largest contiguous chunk available of sub-sequence bases for Reference
NB - actual returned sequence may be shorter than requested. to obtain all bases available in chunk, use a negative "size" value
- Throws:
ErrorMsg
- if no ReferenceChunk found
-
getAlignmentCount
Count all Alignments within the Reference- Returns:
- 0 if there are no aligned Reads, > 0 otherwise
- Throws:
ErrorMsg
- upon an error accessing data
-
getAlignmentCount
Count selected Alignments within the Reference- Parameters:
categories
- is a bitfield of AlignmentCategory- Returns:
- count of all alignments
- Throws:
ErrorMsg
- if no AlignmentCount can be found- See Also:
-
getAlignment
getAlignment- Parameters:
alignmentId
- the ID of the Alignment to be returned- Returns:
- an individual Alignment
- Throws:
ErrorMsg
- if Alignment does not exist or is not part of this Reference
-
getAlignments
getAlignments- Parameters:
categories
- the or'ed list of categories- Returns:
- an iterator of contained alignments
- Throws:
ErrorMsg
- if no Iterator can be created
-
getAlignmentSlice
getAlignmentSlice- Parameters:
start
- is a signed 0-based offset from the start of the Referencelength
- is the length of the slice.- Returns:
- an iterator across a range of Alignments
- Throws:
ErrorMsg
- if no Iterator can be created
-
getAlignmentSlice
getAlignmentSlice- Parameters:
start
- is a signed 0-based offset from the start of the Referencelength
- is the length of the slice.categories
- provides a means of filtering by AlignmentCategory- Returns:
- an iterator across a range of Alignments
- Throws:
ErrorMsg
- if no Iterator can be created
-
getFilteredAlignmentSlice
AlignmentIterator getFilteredAlignmentSlice(long start, long length, int categories, int filters, int mappingQuality) throws ErrorMsg getFilteredAlignmentSlice Behaves like "getAlignmentSlice" except that supported filters are applied to selection- Parameters:
start
- is a signed 0-based offset from the start of the Referencelength
- is the length of the slice.categories
- provides a means of filtering by AlignmentCategoryfilters
- is a set of filter bits defined in AlignmentmappingQuality
- is a cutoff to be used according to bits in "filter"- Returns:
- an iterator across a range of Alignments
- Throws:
ErrorMsg
- if no Iterator can be created
-
getPileups
getPileups- Parameters:
categories
- is a bitfield of AlignmentCategory- Returns:
- an iterator of contained Pileups
- Throws:
ErrorMsg
- if no Iterator can be created
-
getFilteredPileups
getFilteredPileups Filtered according to criteria in parameters- Parameters:
categories
- is a bitfield of AlignmentCategoryfilters
- is a set of filter bits defined in AlignmentmappingQuality
- is a cutoff to be used according to bits in "filter"- Returns:
- an iterator of contained Pileups
- Throws:
ErrorMsg
- if no Iterator can be created
-
getPileupSlice
getPileupSlice Creates a PileupIterator on a slice (window) of reference- Parameters:
start
- is the signed starting position on referencelength
- is the unsigned number of bases in the window- Returns:
- an iterator of contained Pileups
- Throws:
ErrorMsg
- if no Iterator can be created
-
getPileupSlice
getPileupSlice Creates a PileupIterator on a slice (window) of reference- Parameters:
start
- is the signed starting position on referencelength
- is the unsigned number of bases in the windowcategories
- provides a means of filtering by AlignmentCategory- Returns:
- an iterator of contained Pileups
- Throws:
ErrorMsg
- if no Iterator can be created
-
getFilteredPileupSlice
PileupIterator getFilteredPileupSlice(long start, long length, int categories, int filters, int mappingQuality) throws ErrorMsg getFilteredPileupSlice Creates a PileupIterator on a slice (window) of reference filtered according to criteria in parameters- Parameters:
start
- is the signed starting position on referencelength
- is the unsigned number of bases in the windowcategories
- provides a means of filtering by AlignmentCategoryfilters
- is a set of filter bits defined in AlignmentmappingQuality
- is a cutoff to be used according to bits in "filter"- Returns:
- an iterator of contained Pileups
- Throws:
ErrorMsg
- if no Iterator can be created
-