Class GenbankLocationParser


  • public class GenbankLocationParser
    extends java.lang.Object
    Parses Genbank location strings into RichLocation objects.
    Since:
    1.5
    Author:
    Richard Holland
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static RichLocation parseLocation​(Namespace featureNS, java.lang.String featureAccession, java.lang.String locationString)
      Parses a location.
      static java.lang.String writeLocation​(RichLocation l)
      Writes a location in Genbank format.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • parseLocation

        public static RichLocation parseLocation​(Namespace featureNS,
                                                 java.lang.String featureAccession,
                                                 java.lang.String locationString)
                                          throws ParseException
        Parses a location.
        Parameters:
        featureNS - the namespace of the feature this location lives on.
        featureAccession - the accession of the sequence of the feature this location lives on.
        locationString - the GenBank location string.
        Returns:
        RichLocation the equivalent RichLocation object.
        Throws:
        ParseException - if the parsing failed.
      • writeLocation

        public static java.lang.String writeLocation​(RichLocation l)
        Writes a location in Genbank format.
        Parameters:
        l - the location to write
        Returns:
        the formatted string representing the location.