Class ProteinRefSeqFileFormer

  • All Implemented Interfaces:
    SeqFileFormer, SeqIOListener

    public class ProteinRefSeqFileFormer
    extends GenbankFileFormer
    Deprecated.
    Use org.biojavax.bio.seq.io framework instead
    This class performs the detailed formatting of refseq protein entries. Functionality is essentially identical to GenbankFileFormer except that SimpleFeatures are created intead of StrandedFeatures
    Author:
    Greg Cox
    • Method Detail

      • addSymbols

        public void addSymbols​(Alphabet theAlphabet,
                               Symbol[] theSymbols,
                               int theStart,
                               int theLength)
                        throws IllegalAlphabetException
        Deprecated.
        Description copied from interface: SeqIOListener
        Notify the listener of symbol data. All symbols passed to this method are guarenteed to be contained within the specified alphabet. Generally all calls to a given Listener should have the same alphabet -- if not, the listener implementation is likely to throw an exception
        Specified by:
        addSymbols in interface SeqIOListener
        Overrides:
        addSymbols in class GenbankFileFormer
        Parameters:
        theAlphabet - The alphabet of the symbol data
        theSymbols - An array containing symbols
        theStart - The start offset of valid data within the array
        theLength - The number of valid symbols in the array
        Throws:
        IllegalAlphabetException - if we can't cope with this alphabet.
      • breakSymbolArray

        protected List breakSymbolArray​(Alphabet theAlphabet,
                                        Symbol[] theSymbols,
                                        int theStart,
                                        int theLength)
                                 throws IllegalAlphabetException
        Deprecated.
        Converts the symbol list passed in into an array of strings. The strings will be blocks of ten, with six blocks on a line.
        Parameters:
        theAlphabet - The alphabet of the symbol data
        theSymbols - An array containing symbols
        theStart - The start offset of valid data within the array
        theLength - The number of valid symbols in the array
        Returns:
        The symbol list passed in broken into blocks of ten characters, six to a string.
        Throws:
        IllegalAlphabetException - if we can't cope with this alphabet.
      • formatLocation

        public String formatLocation​(Feature theFeature)
        Formats the location of a feature. This version is required when formatting remote locations, since the location field of a remote feature is the projection of that feature on the sequence. When a distinction is made between 'order' and 'join' this method will likely be extended for that also.
        Parameters:
        theFeature - The feature with the location to format
        Returns:
        String The formatted location
      • formatLocation

        public String formatLocation​(Location loc,
                                     StrandedFeature.Strand strand)
        formatLocation creates an EMBL/Genbank style representation of a Location. This is a convenience method only. The version which has a StringBuffer parameter (and returns the StringBuffer) is preferred. If a compound location is formatted using this method, it is returned as a join-type location rather than an order-type.
        Parameters:
        loc - a Location to format.
        strand - a StrandedFeature.Strand indicating the Location's strand.
        Returns:
        a StringBuffer.
      • formatLocation

        public StringBuffer formatLocation​(StringBuffer sb,
                                           Location loc,
                                           StrandedFeature.Strand strand)
        formatLocation creates an EMBL/Genbank style representation of a Location. Supported location forms:
           123
          <123 or >123
          (123.567)
          (123.567)..789
           123..(567.789)
          (123.345)..(567.789)
           123..456
          <123..567 or 123..>567 or <123..>567
           123^567
           AL123465:(123..567)
         
        If a compound location is formatted using this method, it is returned as a join-type location rather than an order-type. To preserve the join/order distinction; and to format locations like AL123465:(123..567), use the formatLocation(Feature) method.
        Parameters:
        sb - a StringBuffer
        loc - a Location to format.
        strand - a StrandedFeature.Strand indicating the Location's strand.
        Returns:
        a StringBuffer.