public class SymbolExtractor extends Object implements Enumeration<String>
String similar to a StringTokenizer.
StringTokenizer:
null. (In this case
the characters of the String are returned.)
| Constructor and Description |
|---|
SymbolExtractor(String delim)
Creates a new
SymbolExtractor using delim as
delimiter. |
SymbolExtractor(String string,
String delim)
|
| Modifier and Type | Method and Description |
|---|---|
int |
countElements()
Counts the number of elements (symbols) that can be received initially.
|
static int |
filter(String inFile,
char ignore,
AlphabetContainer con,
int minLength,
String outFile)
This method allows the user to filter the content of a
File using a given AlphabetContainer and a
minimal sequence length. |
boolean |
hasMoreElements() |
String |
nextElement() |
void |
setStringToBeParsed(String string)
Sets a new
String to be parsed. |
public SymbolExtractor(String delim)
SymbolExtractor using delim as
delimiter. Before invoking other methods one has to use
setStringToBeParsed(String).delim - the delimitersetStringToBeParsed(String),
SymbolExtractor(String, String)public void setStringToBeParsed(String string)
String to be parsed.string - the String to be parsedpublic int countElements()
public boolean hasMoreElements()
hasMoreElements in interface Enumeration<String>public String nextElement()
nextElement in interface Enumeration<String>public static int filter(String inFile, char ignore, AlphabetContainer con, int minLength, String outFile) throws IOException
File using a given AlphabetContainer and a
minimal sequence length. This method is useful to filter, for instance,
data sets with ambiguous nucleotides and/or short sequences. Lines that
can not be parsed with respect to the AlphabetContainer will be
masked by the character ignore.inFile - the path/name of the input Fileignore - the char for comment linescon - the AlphabetContainerminLength - the minimal length of a sequence in the output
FileoutFile - the path/name of output FileFileIOException - if something with the handling of the Files
went wrong