public abstract class AbstractAlignmentReader extends Object implements Closeable, Iterator<Alignments.AlignmentEntry>, Iterable<Alignments.AlignmentEntry>
| Modifier and Type | Field and Description |
|---|---|
protected String |
alignerName |
protected String |
alignerVersion
the list of aligner versions in the order of names, with duplicates removed.
|
protected int |
constantLength
The length of all the query sequences.
|
protected boolean |
constantQueryLengths
True if all the query sequences have the same lengths.
|
protected int |
largestQueryIndex
The largest possible query index in this alignment.
|
protected int |
numberOfQueries
The number of query sequences represented in this alignment.
|
protected int |
numberOfTargets
The number of target sequences represented in this alignment.
|
protected edu.cornell.med.icb.identifier.IndexedIdentifier |
queryIdentifiers
Mapping from query indicies to query identifier strings.
|
protected it.unimi.dsi.fastutil.objects.ObjectArrayList<String> |
sampleBasenames |
protected int |
smallestQueryIndex
The smallest possible query index in this alignment.
|
protected edu.cornell.med.icb.identifier.IndexedIdentifier |
targetIdentifiers
Mapping from target indicies to target identifier strings.
|
protected int[] |
targetLengths
Length of each target sequence.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAlignmentReader(boolean upgrade,
String basename)
This constructor will upgrade the alignment to the latest version of the Goby data structure.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAlignerName() |
String |
getAlignerVersion() |
static String |
getBasename(String filename)
Return the basename corresponding to the input alignment filename.
|
static String[] |
getBasenames(String... filenames)
Return the basenames corresponding to the input filenames.
|
int |
getLargestSplitQueryIndex()
The largest possible query index in this alignment.
|
abstract ReferenceLocation |
getMaxLocation()
Return the maximum location in this alignment.
|
abstract ReferenceLocation |
getMinLocation()
Return the minimum location in this alignment.
|
int |
getNumberOfQueries()
Get the number of query sequences represented in this alignment.
|
int |
getNumberOfTargets()
Get the number of target sequences represented in this alignment.
|
edu.cornell.med.icb.identifier.IndexedIdentifier |
getQueryIdentifiers()
Return the query identifiers, if the header has been read.
|
String |
getSampleBasename(int sampleIndex)
Return the sample basename associated with the given sampleIndex.
|
int |
getSmallestSplitQueryIndex()
The smallest possible query index in this alignment.
|
edu.cornell.med.icb.identifier.IndexedIdentifier |
getTargetIdentifiers()
Return the target identifiers, if the header has been read.
|
int[] |
getTargetLength()
Returns target lengths.
|
int |
getTargetLength(int targetIndex)
Returns the length of a target.
|
boolean |
isConstantQueryLengths() |
protected boolean |
isHeaderLoaded()
Has the alignment header has been processed?
|
abstract void |
readHeader()
Read the header of this alignment.
|
protected void |
setHeaderLoaded(boolean headerLoaded)
Indicate that the alignment header has been processed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, hasNext, next, removeforEach, iterator, spliteratorprotected edu.cornell.med.icb.identifier.IndexedIdentifier queryIdentifiers
numberOfQueriesprotected int numberOfQueries
protected edu.cornell.med.icb.identifier.IndexedIdentifier targetIdentifiers
numberOfTargetsprotected int numberOfTargets
protected int[] targetLengths
protected boolean constantQueryLengths
protected int constantLength
constantQueryLengths is true.protected int smallestQueryIndex
protected int largestQueryIndex
protected String alignerName
protected String alignerVersion
protected it.unimi.dsi.fastutil.objects.ObjectArrayList<String> sampleBasenames
protected AbstractAlignmentReader(boolean upgrade,
String basename)
upgrade - basename - Alignment basename.public static String getBasename(String filename)
filename - The name of the file to get the basename forpublic static String[] getBasenames(String... filenames)
filenames - The names of the files to get the basnames forpublic int getSmallestSplitQueryIndex()
public int getLargestSplitQueryIndex()
public int getNumberOfQueries()
protected final boolean isHeaderLoaded()
protected void setHeaderLoaded(boolean headerLoaded)
headerLoaded - whether or not the reader has loaded the headerpublic abstract void readHeader()
throws IOException
IOException - If an error occurs.public final edu.cornell.med.icb.identifier.IndexedIdentifier getQueryIdentifiers()
readHeader()public final edu.cornell.med.icb.identifier.IndexedIdentifier getTargetIdentifiers()
readHeader()public int getNumberOfTargets()
public final int getTargetLength(int targetIndex)
targetIndex - Index of the target sequence.public final int[] getTargetLength()
public boolean isConstantQueryLengths()
public String getAlignerName()
public String getAlignerVersion()
public String getSampleBasename(int sampleIndex)
sampleIndex - index of the sample, from AlignmentEntry.public abstract ReferenceLocation getMinLocation() throws IOException
IOExceptionpublic abstract ReferenceLocation getMaxLocation() throws IOException
IOExceptionCopyright © 2017 Campagne Laboratory. All rights reserved.