Package ngs
Interface Reference
-
- All Known Subinterfaces:
ReferenceIterator
public interface Reference
Represents a reference sequence
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Alignment
getAlignment(java.lang.String alignmentId)
getAlignmentlong
getAlignmentCount()
Count all Alignments within the Referencelong
getAlignmentCount(int categories)
Count selected Alignments within the ReferenceAlignmentIterator
getAlignments(int categories)
getAlignmentsAlignmentIterator
getAlignmentSlice(long start, long length)
getAlignmentSliceAlignmentIterator
getAlignmentSlice(long start, long length, int categories)
getAlignmentSlicejava.lang.String
getCanonicalName()
getCanonicalNamejava.lang.String
getCommonName()
getCommonNameAlignmentIterator
getFilteredAlignmentSlice(long start, long length, int categories, int filters, int mappingQuality)
getFilteredAlignmentSlice Behaves like "getAlignmentSlice" except that supported filters are applied to selectionPileupIterator
getFilteredPileups(int categories, int filters, int mappingQuality)
getFilteredPileups Filtered according to criteria in parametersPileupIterator
getFilteredPileupSlice(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
getIsCircular()
getIsCircularboolean
getIsLocal()
getIsLocallong
getLength()
getLengthPileupIterator
getPileups(int categories)
getPileupsPileupIterator
getPileupSlice(long start, long length)
getPileupSlice Creates a PileupIterator on a slice (window) of referencePileupIterator
getPileupSlice(long start, long length, int categories)
getPileupSlice Creates a PileupIterator on a slice (window) of referencejava.lang.String
getReferenceBases(long offset)
getReferenceBasesjava.lang.String
getReferenceBases(long offset, long length)
getReferenceBasesjava.lang.String
getReferenceChunk(long offset)
getReferenceChunkjava.lang.String
getReferenceChunk(long offset, long length)
getReferenceChunk
-
-
-
Method Detail
-
getCommonName
java.lang.String getCommonName() throws ErrorMsg
getCommonName- Returns:
- the common name of reference, e.g. "chr1"
- Throws:
ErrorMsg
- if no common name found
-
getCanonicalName
java.lang.String getCanonicalName() throws ErrorMsg
getCanonicalName- Returns:
- the accessioned name of reference, e.g. "NC_000001.11"
- Throws:
ErrorMsg
- if no cannonical name found
-
getIsCircular
boolean getIsCircular() throws ErrorMsg
getIsCircular- Returns:
- true if reference is circular
- Throws:
ErrorMsg
- if cannot detect if reference is circular
-
getIsLocal
boolean getIsLocal() throws ErrorMsg
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
long getLength() throws ErrorMsg
getLength- Returns:
- the length of the reference sequence
- Throws:
ErrorMsg
- if length cannot be detected
-
getReferenceBases
java.lang.String getReferenceBases(long offset) throws ErrorMsg
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
java.lang.String getReferenceBases(long offset, long length) throws ErrorMsg
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
java.lang.String getReferenceChunk(long offset) throws ErrorMsg
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
java.lang.String getReferenceChunk(long offset, long length) throws ErrorMsg
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
long getAlignmentCount() throws ErrorMsg
Count all Alignments within the Reference- Returns:
- 0 if there are no aligned Reads, > 0 otherwise
- Throws:
ErrorMsg
- upon an error accessing data
-
getAlignmentCount
long getAlignmentCount(int categories) throws ErrorMsg
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:
Alignment interface for definitions of AlignmentCategory
-
getAlignment
Alignment getAlignment(java.lang.String alignmentId) throws ErrorMsg
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
AlignmentIterator getAlignments(int categories) throws ErrorMsg
getAlignments- Parameters:
categories
- the or'ed list of categories- Returns:
- an iterator of contained alignments
- Throws:
ErrorMsg
- if no Iterator can be created
-
getAlignmentSlice
AlignmentIterator getAlignmentSlice(long start, long length) throws ErrorMsg
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
AlignmentIterator getAlignmentSlice(long start, long length, int categories) throws ErrorMsg
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
PileupIterator getPileups(int categories) throws ErrorMsg
getPileups- Parameters:
categories
- is a bitfield of AlignmentCategory- Returns:
- an iterator of contained Pileups
- Throws:
ErrorMsg
- if no Iterator can be created
-
getFilteredPileups
PileupIterator getFilteredPileups(int categories, int filters, int mappingQuality) throws ErrorMsg
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
PileupIterator getPileupSlice(long start, long length) throws ErrorMsg
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
PileupIterator getPileupSlice(long start, long length, int categories) throws ErrorMsg
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
-
-