public class InsdcParser<S extends AbstractSequence<C>,C extends Compound>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.Integer |
featureGlobalEnd
these variables are used to compute the global start and end of complex
features
|
protected java.lang.Integer |
featureGlobalStart
these variables are used to compute the global start and end of complex
features
|
protected static java.util.regex.Pattern |
genbankSplitPattern
Decodes a split pattern.
|
protected static java.lang.String |
locationSplitPattern
designed to recursively split a location string in tokens.
|
protected static java.util.regex.Pattern |
singleLocationPattern
parse a location. if group(1) is null than the feature is on the positive
strand, group(2) start position, group(3) end position.
|
Constructor and Description |
---|
InsdcParser() |
InsdcParser(DataSource dataSource) |
Modifier and Type | Method and Description |
---|---|
DataSource |
getDataSource() |
static void |
main(java.lang.String[] args) |
java.util.List<AbstractLocation> |
parse(java.io.Reader reader)
Reader based version of the parse methods.
|
Location |
parse(java.lang.String locationString)
Main method for parsing a location from a String instance
|
void |
setComplexFeaturesAppendMode(org.biojava.nbio.core.sequence.location.InsdcParser.complexFeaturesAppendEnum complexFeaturesAppendMode) |
protected static final java.util.regex.Pattern singleLocationPattern
protected static final java.util.regex.Pattern genbankSplitPattern
protected static final java.lang.String locationSplitPattern
protected java.lang.Integer featureGlobalStart
protected java.lang.Integer featureGlobalEnd
public InsdcParser()
public InsdcParser(DataSource dataSource)
public void setComplexFeaturesAppendMode(org.biojava.nbio.core.sequence.location.InsdcParser.complexFeaturesAppendEnum complexFeaturesAppendMode)
public DataSource getDataSource()
public Location parse(java.lang.String locationString) throws ParserException
locationString
- Represents a logical locationParserException
- thrown in the event of any error during parsingpublic java.util.List<AbstractLocation> parse(java.io.Reader reader) throws java.io.IOException, ParserException
reader
- The source of the data; assumes that end of the reader
stream is the end of the location string to parsejava.io.IOException
- Thrown with any reader errorParserException
- Thrown with any error with parsing locationspublic static void main(java.lang.String[] args)