Interface ReadCollection
Represents an NGS-capable object with a collection of Reads, References and Alignments.
Each of the basic content types may be accessed by id as either a standalone object, or more commonly through an Iterator over a selected collection of objects.
Reads are grouped by ReadGroup. When not specifically assigned, Reads will be placed into the default ReadGroup.
-
Method Summary
Modifier and TypeMethodDescriptiongetAlignment
(String alignmentId) Access a single Alignment by id.long
Count all Alignments within the ReadCollectionlong
getAlignmentCount
(int categories) Count selected Alignments within the ReadCollectiongetAlignmentRange
(long first, long count) getAlignmentRangegetAlignmentRange
(long first, long count, int categories) getAlignmentRangegetAlignments
(int categories) Select Alignments by AlignmentCategory.getName()
Access the simple name of the ReadCollection.getReadlong
getReadCountlong
getReadCount
(int categories) getReadCountgetReadGroup
(String spec) Access a single ReadGroup by name.Access all non-empty ReadGroups.getReadRange
(long first, long count) getReadRangegetReadRange
(long first, long count, int categories) getReadRangegetReads
(int categories) getReadsgetReference
(String spec) Access a single Reference by name spec.Access all References having aligned Reads.boolean
hasReadGroup
(String spec) boolean
hasReference
(String spec)
-
Method Details
-
getName
Access the simple name of the ReadCollection. This name is generally extracted from the "spec" used to create the object, but may also be mapped to a canonical name if one may be determined and differs from that given in the spec.
if the name is extracted from "spec" and contains well-known file extensions that do not form part of a canonical name (e.g. ".sra"), they will be removed.
- Returns:
- the simple name of the ReadCollection
- Throws:
ErrorMsg
- if the name cannot be retrieved- See Also:
-
getReadGroups
Access all non-empty ReadGroups. Iterator will contain at least one ReadGroup unless the ReadCollection itself is empty.- Returns:
- an unordered Iterator of ReadGroups
- Throws:
ErrorMsg
- only upon an error accessing data
-
hasReadGroup
- Parameters:
spec
- the name of a contained read group- Returns:
- true if a call to "getReadGroup()" should succeed
-
getReadGroup
Access a single ReadGroup by name. -
getReferences
Access all References having aligned Reads. Iterator will contain at least one ReadGroup unless no Reads are aligned.- Returns:
- an unordered Iterator of References
- Throws:
ErrorMsg
- upon an error accessing data
-
hasReference
- Parameters:
spec
- the name of a contained Reference- Returns:
- true if a call to "getReference()" should succeed
-
getReference
Access a single Reference by name spec. -
getAlignment
Access a single Alignment by id. The object id is unique within any given ReadCollection, and may designate an Alignment of any category. Note Excessive usage may create pressure on JVM and System memory. -
getAlignments
Select Alignments by AlignmentCategory.- Parameters:
categories
- is a bitfield of AlignmentCategory- Returns:
- an iterator of all Alignments from specified categories
- Throws:
ErrorMsg
- upon an error accessing data
-
getAlignmentCount
Count all Alignments within the ReadCollection- Returns:
- 0 if there are no aligned Reads, > 0 otherwise
- Throws:
ErrorMsg
- upon an error accessing data
-
getAlignmentCount
Count selected Alignments within the ReadCollection- Parameters:
categories
- is a bitfield of AlignmentCategory- Returns:
- count of all alignments
- Throws:
ErrorMsg
- upon an error accessing data- See Also:
-
getAlignmentRange
getAlignmentRange- Parameters:
first
- is an unsigned ordinal into setcount
- the number of alignments- Returns:
- an iterator across a range of Alignments
- Throws:
ErrorMsg
- upon an error accessing data
-
getAlignmentRange
getAlignmentRange- Parameters:
first
- is an unsigned ordinal into setcount
- number of alignmentscategories
- provides a means of filtering by AlignmentCategory- Returns:
- an iterator across a range of Alignments
- Throws:
ErrorMsg
- upon an error accessing data
-
getRead
getRead- Parameters:
readId
- the ID of the Read to return- Returns:
- an individual Read
- Throws:
ErrorMsg
- if Read does not exist
-
getReads
getReads- Parameters:
categories
- provides a means of filtering by ReadCategory- Returns:
- an iterator of all contained machine Reads
- Throws:
ErrorMsg
- upon an error accessing data
-
getReadCount
getReadCount- Returns:
- the number of reads in the collection
- Throws:
ErrorMsg
- upon an error accessing data
-
getReadCount
getReadCount- Parameters:
categories
- provides an optional means of filtering by ReadCategory- Returns:
- the number of reads in the collection
- Throws:
ErrorMsg
- upon an error accessing data
-
getReadRange
getReadRange- Parameters:
first
- is an unsigned ordinal into setcount
- the number of reads- Returns:
- an iterator across a range of Reads
- Throws:
ErrorMsg
- upon an error accessing data
-
getReadRange
getReadRange- Parameters:
first
- is an unsigned ordinal into setcount
- the number of readscategories
- provides an optional means of filtering by ReadCategory- Returns:
- an iterator across a range of Reads
- Throws:
ErrorMsg
- upon an error accessing data
-