org.biojava3.core.sequence.location
Class InsdcParser
java.lang.Object
org.biojava3.core.sequence.location.InsdcParser
public class InsdcParser
- extends Object
Parser for working with INSDC style locations. This class supports the
full range of location types generated by Genbank, INSDC and ENA.
- Author:
- ayates
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InsdcParser
public InsdcParser()
InsdcParser
public InsdcParser(DataSource dataSource)
getDataSource
public DataSource getDataSource()
parse
public Location parse(String locationString)
throws ParserException
- Main method for parsing a location from a String instance
- Parameters:
locationString
- Represents a logical location
- Returns:
- The parsed location
- Throws:
ParserException
- thrown in the event of any error during parsing
parse
public Location parse(Reader reader)
throws IOException,
ParserException
- Reader based version of the parse methods.
- Parameters:
reader
- The source of the data; assumes that end of the reader
stream is the end of the location string to parse
- Returns:
- The parsed location
- Throws:
IOException
- Thrown with any reader error
ParserException
- Thrown with any error with parsing locations
parse
protected List<Location> parse(Reader reader,
Strand strand)
throws IOException,
ParserException
- Throws:
IOException
ParserException
parseLocation
protected Location parseLocation(String location,
Strand strand)
parseSingle
protected Location parseSingle(Matcher matcher,
Strand strand)
parseRange
protected Location parseRange(Matcher matcher,
Strand strand)
generatePoint
protected Point generatePoint(String locationString,
String uncertainString)
getAccession
protected AccessionID getAccession(String accession)