public class CountsReader extends Object implements CountsReaderI
CountsWriter.| Modifier and Type | Field and Description |
|---|---|
protected static int |
END_OF_DATA_MARKER |
| Constructor and Description |
|---|
CountsReader(it.unimi.dsi.io.InputBitStream inputBitStream) |
CountsReader(InputStream inputStream) |
CountsReader(InputStream inputStream,
DataInput indexInputStream) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected static int |
decodeDeltaCount(int deltaCount) |
int |
getCount()
Return the count at the given position.
|
int |
getDeltaCount() |
int |
getLength()
The length of the region/peak where the count is observed.
|
int |
getPosition()
Return the position along the sequence where the count is observed.
|
boolean |
hasNextPosition()
Check if count information is available for another position.
|
boolean |
hasNextTransition()
Determines if the reader has data about another transition.
|
boolean |
isPositionInIndex(int i) |
int |
nextCountAtPosition()
Returns count for the next position.
|
void |
nextTransition()
Advance to the next transition.
|
void |
reposition(int position)
Reposition the reader on a genomic position.
|
void |
skipTo(int position)
Advance up to or past the specified position.
|
protected static final int END_OF_DATA_MARKER
public CountsReader(InputStream inputStream) throws IOException
IOExceptionpublic CountsReader(it.unimi.dsi.io.InputBitStream inputBitStream)
throws IOException
IOExceptionpublic CountsReader(InputStream inputStream, DataInput indexInputStream) throws IOException
IOExceptionpublic int getPosition()
getPosition in interface CountsReaderIpublic boolean hasNextTransition()
throws IOException
hasNextTransition in interface CountsReaderIIOExceptionpublic void nextTransition()
throws IOException
nextTransition in interface CountsReaderIIOExceptionpublic int getDeltaCount()
public boolean hasNextPosition()
throws IOException
IOExceptionpublic int nextCountAtPosition()
throws IOException
IOExceptionprotected static int decodeDeltaCount(int deltaCount)
public final int getLength()
CountsReaderIgetLength in interface CountsReaderIpublic final int getCount()
CountsReaderIgetCount in interface CountsReaderIpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void skipTo(int position)
throws IOException
skipTo in interface CountsReaderIposition - IOExceptionpublic void reposition(int position)
throws IOException
reposition in interface CountsReaderIposition - Position to seek to.IOException - If an error occurs accessing the index or counts data.public boolean isPositionInIndex(int i)
Copyright © 2017 Campagne Laboratory. All rights reserved.