Class PeptidePropertiesImpl

java.lang.Object
org.biojava.nbio.aaproperties.PeptidePropertiesImpl
All Implemented Interfaces:
IPeptideProperties

public class PeptidePropertiesImpl extends Object implements IPeptideProperties
This class contains the actual implementation of IPeptideProperties and is wrapped around by PeptideProperties for ease of use.
Since:
3.0.2
Version:
2011.08.22
Author:
kohchuanhock
See Also:
  • Constructor Details

    • PeptidePropertiesImpl

      public PeptidePropertiesImpl()
  • Method Details

    • getMolecularWeight

      public double getMolecularWeight(ProteinSequence sequence)
      Description copied from interface: IPeptideProperties
      Returns the molecular weight of sequence. The sequence argument must be a protein sequence consisting of only non-ambiguous characters. This method will sum the molecular weight of each amino acid in the sequence. Molecular weights are based on here.
      Specified by:
      getMolecularWeight in interface IPeptideProperties
      Parameters:
      sequence - a protein sequence consisting of non-ambiguous characters only
      Returns:
      the total molecular weight of sequence + weight of water molecule
      See Also:
    • getMolecularWeight

      public double getMolecularWeight(ProteinSequence sequence, File aminoAcidCompositionFile) throws javax.xml.bind.JAXBException, FileNotFoundException
      Description copied from interface: IPeptideProperties
      Returns the molecular weight of sequence. The sequence argument must be a protein sequence consisting of only non-ambiguous characters. This method will sum the molecular weight of each amino acid in the sequence. Molecular weights are based on the input files. These input files must be XML using the defined schema. Note that it assumes that ElementMass.xml file can be found in default location.
      Specified by:
      getMolecularWeight in interface IPeptideProperties
      Parameters:
      sequence - a protein sequence consisting of non-ambiguous characters only xml file that details the mass of each elements and isotopes
      aminoAcidCompositionFile - xml file that details the composition of amino acids
      Returns:
      the total molecular weight of sequence + weight of water molecule
      Throws:
      javax.xml.bind.JAXBException - thrown if unable to properly parse either elementMassFile or aminoAcidCompositionFile
      FileNotFoundException - thrown if either elementMassFile or aminoAcidCompositionFile are not found
    • getMolecularWeight

      public double getMolecularWeight(ProteinSequence sequence, File elementMassFile, File aminoAcidCompositionFile) throws javax.xml.bind.JAXBException, FileNotFoundException
      Description copied from interface: IPeptideProperties
      Returns the molecular weight of sequence. The sequence argument must be a protein sequence consisting of only non-ambiguous characters. This method will sum the molecular weight of each amino acid in the sequence. Molecular weights are based on the input files. These input files must be XML using the defined schema.
      Specified by:
      getMolecularWeight in interface IPeptideProperties
      Parameters:
      sequence - a protein sequence consisting of non-ambiguous characters only
      elementMassFile - xml file that details the mass of each elements and isotopes
      aminoAcidCompositionFile - xml file that details the composition of amino acids
      Returns:
      the total molecular weight of sequence + weight of water molecule
      Throws:
      javax.xml.bind.JAXBException - thrown if unable to properly parse either elementMassFile or aminoAcidCompositionFile
      FileNotFoundException - thrown if either elementMassFile or aminoAcidCompositionFile are not found
    • getMolecularWeightBasedOnXML

      public double getMolecularWeightBasedOnXML(ProteinSequence sequence, AminoAcidCompositionTable aminoAcidCompositionTable)
      Description copied from interface: IPeptideProperties
      Returns the molecular weight of sequence. The sequence argument must be a protein sequence consisting of only non-ambiguous characters. This method will sum the molecular weight of each amino acid in the sequence. Molecular weights are based on the AminoAcidCompositionTable. Those input files must be XML using the defined schema.
      Specified by:
      getMolecularWeightBasedOnXML in interface IPeptideProperties
      Parameters:
      sequence - a protein sequence consisting of non-ambiguous characters only
      aminoAcidCompositionTable - a amino acid composition table obtained by calling IPeptideProperties.obtainAminoAcidCompositionTable
      Returns:
      the total molecular weight of sequence + weight of water molecule
    • obtainAminoAcidCompositionTable

      public AminoAcidCompositionTable obtainAminoAcidCompositionTable(File aminoAcidCompositionFile) throws javax.xml.bind.JAXBException, FileNotFoundException
      Description copied from interface: IPeptideProperties
      This method would initialize amino acid composition table based on the input xml files and stores the table for usage in future calls to IPeptideProperties.getMolecularWeightBasedOnXML(ProteinSequence, AminoAcidCompositionTable). Note that ElementMass.xml is assumed to be able to be seen in default location.
      Specified by:
      obtainAminoAcidCompositionTable in interface IPeptideProperties
      Parameters:
      aminoAcidCompositionFile - xml file that details the composition of amino acids
      Returns:
      the initialized amino acid composition table
      Throws:
      javax.xml.bind.JAXBException - thrown if unable to properly parse either elementMassFile or aminoAcidCompositionFile
      FileNotFoundException - thrown if either elementMassFile or aminoAcidCompositionFile are not found
    • obtainAminoAcidCompositionTable

      public AminoAcidCompositionTable obtainAminoAcidCompositionTable(File elementMassFile, File aminoAcidCompositionFile) throws javax.xml.bind.JAXBException, FileNotFoundException
      Description copied from interface: IPeptideProperties
      This method would initialize amino acid composition table based on the input xml files and stores the table for usage in future calls to IPeptideProperties.getMolecularWeightBasedOnXML(ProteinSequence, AminoAcidCompositionTable).
      Specified by:
      obtainAminoAcidCompositionTable in interface IPeptideProperties
      Parameters:
      elementMassFile - xml file that details the mass of each elements and isotopes
      aminoAcidCompositionFile - xml file that details the composition of amino acids
      Returns:
      the initialized amino acid composition table
      Throws:
      javax.xml.bind.JAXBException - thrown if unable to properly parse either elementMassFile or aminoAcidCompositionFile
      FileNotFoundException - thrown if either elementMassFile or aminoAcidCompositionFile are not found
    • getExtinctionCoefficient

      public double getExtinctionCoefficient(ProteinSequence sequence, boolean assumeCysReduced)
      Description copied from interface: IPeptideProperties
      Returns the extinction coefficient of sequence. The sequence argument must be a protein sequence consisting of only non-ambiguous characters. The extinction coefficient indicates how much light a protein absorbs at a certain wavelength. It is useful to have an estimation of this coefficient for following a protein which a spectrophotometer when purifying it. The computation of extinction coefficient follows the documentation in here.
      Specified by:
      getExtinctionCoefficient in interface IPeptideProperties
      Parameters:
      sequence - a protein sequence consisting of non-ambiguous characters only
      assumeCysReduced - true if Cys are assumed to be reduced and false if Cys are assumed to form cystines
      Returns:
      the extinction coefficient of sequence
      See Also:
    • getAbsorbance

      public double getAbsorbance(ProteinSequence sequence, boolean assumeCysReduced)
      Description copied from interface: IPeptideProperties
      Returns the absorbance (optical density) of sequence. The sequence argument must be a protein sequence consisting of only non-ambiguous characters. The computation of absorbance (optical density) follows the documentation in here.
      Specified by:
      getAbsorbance in interface IPeptideProperties
      Parameters:
      sequence - a protein sequence consisting of non-ambiguous characters only
      assumeCysReduced - true if Cys are assumed to be reduced and false if Cys are assumed to form cystines
      Returns:
      the absorbance (optical density) of sequence
      See Also:
    • getInstabilityIndex

      public double getInstabilityIndex(ProteinSequence sequence)
      Description copied from interface: IPeptideProperties
      Returns the instability index of sequence. The sequence argument must be a protein sequence consisting of only non-ambiguous characters. The instability index provides an estimate of the stability of your protein in a test tube. The computation of instability index follows the documentation in here.
      Specified by:
      getInstabilityIndex in interface IPeptideProperties
      Parameters:
      sequence - a protein sequence consisting of non-ambiguous characters only
      Returns:
      the instability index of sequence
      See Also:
    • getApliphaticIndex

      public double getApliphaticIndex(ProteinSequence sequence)
      Description copied from interface: IPeptideProperties
      Returns the apliphatic index of sequence. The sequence argument must be a protein sequence consisting of only non-ambiguous characters. The aliphatic index of a protein is defined as the relative volume occupied by aliphatic side chains (alanine, valine, isoleucine, and leucine). It may be regarded as a positive factor for the increase of thermostability of globular proteins. The computation of aliphatic index follows the documentation in here. A protein whose instability index is smaller than 40 is predicted as stable, a value above 40 predicts that the protein may be unstable.
      Specified by:
      getApliphaticIndex in interface IPeptideProperties
      Parameters:
      sequence - a protein sequence consisting of non-ambiguous characters only
      Returns:
      the aliphatic index of sequence
      See Also:
    • getAvgHydropathy

      public double getAvgHydropathy(ProteinSequence sequence)
      Description copied from interface: IPeptideProperties
      Returns the average hydropathy value of sequence. The sequence argument must be a protein sequence consisting of only non-ambiguous characters. The average value for a sequence is calculated as the sum of hydropathy values of all the amino acids, divided by the number of residues in the sequence. Hydropathy values are based on (Kyte, J. and Doolittle, R.F. (1982) A simple method for displaying the hydropathic character of a protein. J. Mol. Biol. 157, 105-132).
      Specified by:
      getAvgHydropathy in interface IPeptideProperties
      Parameters:
      sequence - a protein sequence consisting of non-ambiguous characters only
      Returns:
      the average hydropathy value of sequence
      See Also:
    • getIsoelectricPoint

      public double getIsoelectricPoint(ProteinSequence sequence, boolean useExpasyValues)
      Description copied from interface: IPeptideProperties
      Returns the isoelectric point of sequence. The sequence argument must be a protein sequence consisting of only non-ambiguous characters. The isoelectric point is the pH at which the protein carries no net electrical charge. The isoelectric point will be computed based on approach stated in here pKa values used will be either those used by Expasy which referenced "Electrophoresis 1994, 15, 529-539" OR A.Lehninger, Principles of Biochemistry, 4th Edition (2005), Chapter 3, page78, Table 3-1.
      Specified by:
      getIsoelectricPoint in interface IPeptideProperties
      Parameters:
      sequence - a protein sequence consisting of non-ambiguous characters only
      useExpasyValues - whether to use Expasy values (Default) or Innovagen values
      Returns:
      the isoelectric point of sequence
      See Also:
    • getIsoelectricPoint

      public double getIsoelectricPoint(ProteinSequence sequence)
      Specified by:
      getIsoelectricPoint in interface IPeptideProperties
    • getNetCharge

      public double getNetCharge(ProteinSequence sequence)
      Specified by:
      getNetCharge in interface IPeptideProperties
    • getNetCharge

      public double getNetCharge(ProteinSequence sequence, boolean useExpasyValues)
      Specified by:
      getNetCharge in interface IPeptideProperties
    • getNetCharge

      public double getNetCharge(ProteinSequence sequence, boolean useExpasyValues, double pHPoint)
      Description copied from interface: IPeptideProperties
      Returns the net charge of sequence at pH 7. The sequence argument must be a protein sequence consisting of only non-ambiguous characters. The net charge will be computed using the approach stated in <a href="http://www.innovagen.se/custom-peptide-synthesis/peptide-property-calculator/peptide-property-calculator-notes.asp#NetCharge>here pKa values used will be either those used by Expasy which referenced "Electrophoresis 1994, 15, 529-539" OR A.Lehninger, Principles of Biochemistry, 4th Edition (2005), Chapter 3, page78, Table 3-1.
      Specified by:
      getNetCharge in interface IPeptideProperties
      Parameters:
      sequence - a protein sequence consisting of non-ambiguous characters only
      useExpasyValues - whether to use Expasy values (Default) or Innovagen values
      pHPoint - the pH value to use for computation of the net charge. Default at 7.
      Returns:
      the net charge of sequence at given pHPoint
      See Also:
    • getEnrichment

      public double getEnrichment(ProteinSequence sequence, AminoAcidCompound aminoAcidCode)
      Description copied from interface: IPeptideProperties
      Returns the composition of specified amino acid in the sequence. The sequence argument must be a protein sequence consisting of only non-ambiguous characters. The aminoAcidCode must be a non-ambiguous character. The composition of an amino acid is the total number of its occurrence, divided by the total length of the sequence.
      Specified by:
      getEnrichment in interface IPeptideProperties
      Parameters:
      sequence - a protein sequence consisting of non-ambiguous characters only
      aminoAcidCode - the code of the amino acid to compute
      Returns:
      the composition of specified amino acid in the sequence
      See Also:
    • getAAComposition

      public Map<AminoAcidCompound,Double> getAAComposition(ProteinSequence sequence)
      Description copied from interface: IPeptideProperties
      Returns the composition of the 20 standard amino acid in the sequence. The sequence argument must be a protein sequence consisting of only non-ambiguous characters. The composition of an amino acid is the total number of its occurrence, divided by the total length of the sequence.
      Specified by:
      getAAComposition in interface IPeptideProperties
      Parameters:
      sequence - a protein sequence consisting of non-ambiguous characters only
      Returns:
      the composition of the 20 standard amino acid in the sequence
      See Also: