|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.msu.cme.rdp.classifier.train.RawSequenceParser
public class RawSequenceParser
A parser to parse a reader containing the raw sequences.
Field Summary | |
---|---|
private ParsedRawSequence |
curSeq
|
static java.lang.String |
delimiter
|
private java.util.regex.Matcher |
matcher
|
private ParsedRawSequence |
onDeck
|
private java.util.regex.Pattern |
pattern
|
private java.io.BufferedReader |
reader
|
private java.lang.String |
regexFasta
|
Constructor Summary | |
---|---|
RawSequenceParser(java.io.Reader in)
Creates new RawSequenceParser to parse the input fasta file. |
Method Summary | |
---|---|
void |
close()
Closes the reader. |
private java.util.List |
decomposeHeader(java.lang.String s)
Takes two different formats: the old format is a string of sequence header( ancestors seperated by delimiter, such as ";" in our case). |
private ParsedRawSequence |
getNextElement()
Reads from the input stream and returns a parsed sequence. |
boolean |
hasNext()
Returns true if there is a parsed sequence available. |
private java.lang.String |
modifySequence(java.lang.String s)
Modifies the sequence. |
ParsedRawSequence |
next()
Returns the next parsed sequence. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String delimiter
private java.util.regex.Pattern pattern
private java.util.regex.Matcher matcher
private java.lang.String regexFasta
private java.io.BufferedReader reader
private ParsedRawSequence onDeck
private ParsedRawSequence curSeq
Constructor Detail |
---|
public RawSequenceParser(java.io.Reader in)
Method Detail |
---|
public void close() throws java.io.IOException
java.io.IOException
public boolean hasNext() throws java.io.IOException
java.io.IOException
public ParsedRawSequence next() throws java.util.NoSuchElementException, java.io.IOException
java.util.NoSuchElementException
java.io.IOException
private ParsedRawSequence getNextElement() throws java.io.IOException
java.io.IOException
private java.util.List decomposeHeader(java.lang.String s)
private java.lang.String modifySequence(java.lang.String s)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |