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, read
public String[] getSequenceNames()
public void setCurrentSequence(String seq_name) throws Exception
seq_name
- name of sequence (one of returned by getSequenceNames()).Exception
public void reset() throws IOException
reset
in class InputStream
IOException
public long getCurrentSequencePosition()
public void setCurrentSequencePosition(long pos) throws IOException
IOException
public int read() throws IOException
read
in class InputStream
IOException
public long skip(long n) throws IOException
skip
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public int available() throws IOException
available
in class InputStream
IOException
public void closeParser() throws Exception
Exception
public File getFile()
public String loadFragment(long seq_pos, int len) throws IOException
IOException
public void printFastaSequence() throws IOException
IOException
public void printFastaSequence(long len) throws IOException
IOException
Copyright © 2000–2016 BioJava. All rights reserved.