public class TwoBitParser
extends java.io.InputStream
| Modifier and Type | Field and Description |
|---|---|
int |
DEFAULT_BUFFER_SIZE |
| Constructor and Description |
|---|
TwoBitParser(java.io.File f) |
| Modifier and Type | Method and 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.Exceptionpublic 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.Exceptionpublic void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOExceptionpublic long getCurrentSequencePosition()
public void setCurrentSequencePosition(long pos)
throws java.io.IOException
java.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic void closeParser()
throws java.lang.Exception
java.lang.Exceptionpublic java.io.File getFile()
public java.lang.String loadFragment(long seq_pos,
int len)
throws java.io.IOException
java.io.IOExceptionpublic void printFastaSequence()
throws java.io.IOException
java.io.IOExceptionpublic void printFastaSequence(long len)
throws java.io.IOException
java.io.IOExceptionpublic static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception