public class CountsArchiveReader extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
protected CompoundFileReader |
compoundReader |
| Constructor and Description |
|---|
CountsArchiveReader(String basename)
Initialize the MultiCountReader.
|
CountsArchiveReader(String basename,
String alternativeCountArchiveExtension)
Initialize the MultiCountReader.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this archive.
|
CountsReader |
getCountReader(int countInfoIndex)
Obtain the count reader over the count information identified by index.
|
CountsReader |
getCountReader(String identifier)
Obtain the count reader over the count information identified by id.
|
String |
getIdentifier(int index) |
it.unimi.dsi.fastutil.objects.ObjectSet<String> |
getIdentifiers()
Obtain identifiers associated with each countReader defined in the archive.
|
it.unimi.dsi.fastutil.ints.IntSet |
getIndices()
Obtain indices associated with each countReader defined in the archive.
|
int |
getNumberOfIndices()
Obtain the number of count information available in this archive.
|
long |
getTotalBasesSeen()
The total number of bases seen in the counts data stored in this archive.
|
long |
getTotalSitesSeen()
The total number of sites observed at which count!=0.
|
boolean |
isStatsParsed()
Indicate whether the archive had statistics.
|
protected String |
makeFileIdentifier(String countId) |
protected final CompoundFileReader compoundReader
public CountsArchiveReader(String basename) throws IOException
basename - Basename associated with the count information archive. Opens the defaults
".counts" archive.IOException - if the file cannot be accessedpublic CountsArchiveReader(String basename, String alternativeCountArchiveExtension) throws IOException
basename - Basename associated with the count information archive.alternativeCountArchiveExtension - Which extension to use to open the count archive.IOException - if the file cannot be accessedpublic long getTotalBasesSeen()
public long getTotalSitesSeen()
public boolean isStatsParsed()
public CountsReader getCountReader(String identifier) throws IOException
identifier - The identifier of the count information to retrieve.IOException - If an error occurs reading count information.public CountsReader getCountReader(int countInfoIndex) throws IOException
countInfoIndex - The index of the count information to retrieve.IOException - If an error occurs reading count information.public String getIdentifier(int index)
public int getNumberOfIndices()
public it.unimi.dsi.fastutil.objects.ObjectSet<String> getIdentifiers()
public it.unimi.dsi.fastutil.ints.IntSet getIndices()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2018 Campagne Laboratory. All rights reserved.