use of org.biojava.bio.symbol.SimpleSymbolList in project ice by JBEI.
the class PlainParser method parse.
@Override
public DNASequence parse(String textSequence) throws InvalidFormatParserException {
SymbolList sl;
try {
textSequence = cleanSequence(textSequence);
sl = new SimpleSymbolList(DNATools.getDNA().getTokenization("token"), textSequence.replaceAll("\\s+", "").replaceAll("[\\.|~]", "-").replaceAll("[0-9]", ""));
} catch (BioException e) {
throw new InvalidFormatParserException("Couldn't parse Plain sequence!", e);
}
return new DNASequence(sl.seqString());
}
Aggregations