Package org.biojava.bio.seq.io
Class ProteinRefSeqFileFormer
- java.lang.Object
-
- org.biojava.bio.seq.io.GenbankFileFormer
-
- org.biojava.bio.seq.io.ProteinRefSeqFileFormer
-
- All Implemented Interfaces:
SeqFileFormer
,SeqIOListener
public class ProteinRefSeqFileFormer extends GenbankFileFormer
Deprecated.Use org.biojavax.bio.seq.io framework insteadThis 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
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ProteinRefSeqFileFormer()
Deprecated.protected
ProteinRefSeqFileFormer(PrintStream theStream)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addSymbols(Alphabet theAlphabet, Symbol[] theSymbols, int theStart, int theLength)
Deprecated.Notify the listener of symbol data.protected List
breakSymbolArray(Alphabet theAlphabet, Symbol[] theSymbols, int theStart, int theLength)
Deprecated.Converts the symbol list passed in into an array of strings.StringBuffer
formatLocation(StringBuffer sb, Location loc, StrandedFeature.Strand strand)
formatLocation
creates an EMBL/Genbank style representation of aLocation
.String
formatLocation(Feature theFeature)
Formats the location of a feature.String
formatLocation(Location loc, StrandedFeature.Strand strand)
formatLocation
creates an EMBL/Genbank style representation of aLocation
.void
startFeature(Feature.Template templ)
Deprecated.Notify the listener that a new feature object is starting.-
Methods inherited from class org.biojava.bio.seq.io.GenbankFileFormer
addFeatureProperty, addSequenceProperty, endFeature, endSequence, getPrintStream, getVectorNTISupport, setName, setPrintStream, setURI, setVectorNTISupport, startSequence
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.biojava.bio.seq.io.SeqFileFormer
formatLocation, formatLocation
-
-
-
-
Constructor Detail
-
ProteinRefSeqFileFormer
protected ProteinRefSeqFileFormer()
Deprecated.
-
ProteinRefSeqFileFormer
protected ProteinRefSeqFileFormer(PrintStream theStream)
Deprecated.
-
-
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 interfaceSeqIOListener
- Overrides:
addSymbols
in classGenbankFileFormer
- Parameters:
theAlphabet
- The alphabet of the symbol datatheSymbols
- An array containing symbolstheStart
- The start offset of valid data within the arraytheLength
- The number of valid symbols in the array- Throws:
IllegalAlphabetException
- if we can't cope with this alphabet.
-
startFeature
public void startFeature(Feature.Template templ) throws ParseException
Deprecated.Description copied from interface:SeqIOListener
Notify the listener that a new feature object is starting. Every call to startFeature should have a corresponding call to endFeature. If the listener is concerned with a hierarchy of features, it should maintain a stack of `open' features.- Specified by:
startFeature
in interfaceSeqIOListener
- Overrides:
startFeature
in classGenbankFileFormer
- Throws:
ParseException
-
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 datatheSymbols
- An array containing symbolstheStart
- The start offset of valid data within the arraytheLength
- 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 aLocation
. This is a convenience method only. The version which has aStringBuffer
parameter (and returns theStringBuffer
) 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
- aLocation
to format.strand
- aStrandedFeature.Strand
indicating theLocation
's strand.- Returns:
- a
StringBuffer
.
-
formatLocation
public StringBuffer formatLocation(StringBuffer sb, Location loc, StrandedFeature.Strand strand)
formatLocation
creates an EMBL/Genbank style representation of aLocation
. 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
- aStringBuffer
loc
- aLocation
to format.strand
- aStrandedFeature.Strand
indicating theLocation
's strand.- Returns:
- a
StringBuffer
.
-
-