public class TwoBitParser extends InputStream
| Modifier and Type | Field and Description |
|---|---|
int |
DEFAULT_BUFFER_SIZE |
| Constructor and Description |
|---|
TwoBitParser(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() |
File |
getFile() |
String[] |
getSequenceNames() |
String |
loadFragment(long seq_pos,
int len) |
static void |
main(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(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.
|
mark, markSupported, read, readpublic int DEFAULT_BUFFER_SIZE
public TwoBitParser(File f) throws Exception
Exceptionpublic String[] getSequenceNames()
public void setCurrentSequence(String seq_name) throws Exception
seq_name - name of sequence (one of returned by getSequenceNames()).Exceptionpublic void reset() throws IOException
reset in class InputStreamIOExceptionpublic long getCurrentSequencePosition()
public void setCurrentSequencePosition(long pos) throws IOException
IOExceptionpublic int read() throws IOException
read in class InputStreamIOExceptionpublic long skip(long n) throws IOException
skip in class InputStreamIOExceptionpublic void close() throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic int available() throws IOException
available in class InputStreamIOExceptionpublic void closeParser() throws Exception
Exceptionpublic String loadFragment(long seq_pos, int len) throws IOException
IOExceptionpublic void printFastaSequence() throws IOException
IOExceptionpublic void printFastaSequence(long len) throws IOException
IOExceptionCopyright © 2000–2017 BioJava. All rights reserved.