public class TwoBitParser
extends java.io.InputStream
Modifier and Type | Field | Description |
---|---|---|
int |
DEFAULT_BUFFER_SIZE |
Constructor | Description |
---|---|
TwoBitParser(java.io.File f) |
Modifier and Type | Method | Description |
---|---|---|
int |
available() |
|
void |
close() |
Method closes current sequence and it's necessary to invoke it before setting
new current sequence.
|
void |
closeParser() |
Method closes random access file descriptor.
|
long |
getCurrentSequencePosition() |
|
java.io.File |
getFile() |
|
java.lang.String[] |
getSequenceNames() |
|
java.lang.String |
loadFragment(long seq_pos,
int len) |
|
static void |
main(java.lang.String[] args) |
|
void |
printFastaSequence() |
|
void |
printFastaSequence(long len) |
|
int |
read() |
Method reads 1 nucleotide from sequence stream.
|
void |
reset() |
Method resets current position to the begining of sequence stream.
|
void |
setCurrentSequence(java.lang.String seq_name) |
Method open nucleotide stream for sequence with given name.
|
void |
setCurrentSequencePosition(long pos) |
|
long |
skip(long n) |
Method skips n nucleotides in sequence stream.
|
public TwoBitParser(java.io.File f) throws java.lang.Exception
java.lang.Exception
public java.lang.String[] getSequenceNames()
public void setCurrentSequence(java.lang.String seq_name) throws java.lang.Exception
seq_name
- name of sequence (one of returned by getSequenceNames()).java.lang.Exception
public void reset() throws java.io.IOException
reset
in class java.io.InputStream
java.io.IOException
public long getCurrentSequencePosition()
public void setCurrentSequencePosition(long pos) throws java.io.IOException
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
close
in class java.io.InputStream
java.io.IOException
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
public void closeParser() throws java.lang.Exception
java.lang.Exception
public java.io.File getFile()
public java.lang.String loadFragment(long seq_pos, int len) throws java.io.IOException
java.io.IOException
public void printFastaSequence() throws java.io.IOException
java.io.IOException
public void printFastaSequence(long len) throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception