public class CountsWriter extends Object implements CountsWriterI
| Constructor and Description |
|---|
CountsWriter(OutputStream output) |
CountsWriter(OutputStream output,
int initialCount)
Initialize a CountsWriter with a specific initialCount.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendCount(int count,
int lengthConstant)
Append a transition.
|
void |
close() |
protected static int |
encodeDeltaCount(int deltaCount) |
int |
getInitialCount()
Return the initial count this writer was initialized with.
|
long |
getNumberOfBasesSeen()
The total number of bases seen in the counts data we wrote.
|
long |
getNumberOfBitsWritten()
Return the number of bits written to the output.
|
long |
getNumberOfSitesSeen()
The total number of sites observed at which count!=0.
|
int |
getNumberOfTransitions()
Return the number of transitions written to the output.
|
public CountsWriter(OutputStream output, int initialCount) throws IOException
output - Where to write the compressed counts.initialCount - Value of count at position zero.IOExceptionpublic CountsWriter(OutputStream output) throws IOException
IOExceptionpublic long getNumberOfBitsWritten()
CountsWriterIgetNumberOfBitsWritten in interface CountsWriterIpublic int getNumberOfTransitions()
CountsWriterIgetNumberOfTransitions in interface CountsWriterIpublic void appendCount(int count,
int lengthConstant)
throws IOException
CountsWriterIappendCount in interface CountsWriterIcount - The transition brings count to this value.lengthConstant - The counts are constant, with count, for this number of bases.IOException - If an error occurs writing this transition.protected static int encodeDeltaCount(int deltaCount)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface CountsWriterIIOExceptionpublic long getNumberOfBasesSeen()
getNumberOfBasesSeen in interface CountsWriterIpublic long getNumberOfSitesSeen()
getNumberOfSitesSeen in interface CountsWriterIpublic int getInitialCount()
getInitialCount in interface CountsWriterICopyright © 2017 Campagne Laboratory. All rights reserved.