Class PeptidePropertiesImpl

    • Method Detail

      • 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:
        ProteinSequence
      • getMolecularWeight

        public double getMolecularWeight​(ProteinSequence sequence,
                                         File aminoAcidCompositionFile)
                                  throws 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:
        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 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:
        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 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:
        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 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:
        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:
        ProteinSequence
      • 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:
        ProteinSequence
      • 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:
        ProteinSequence
      • 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:
        ProteinSequence
      • 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:
        ProteinSequence
      • 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:
        ProteinSequence
      • 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
        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:
        ProteinSequence
      • 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:
        ProteinSequence, AminoAcidCompound
      • getAAComposition

        public Map<AminoAcidCompound,​DoublegetAAComposition​(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:
        ProteinSequence, AminoAcidCompound
      • getAromaticity

        public double getAromaticity​(ProteinSequence sequence)
        Description copied from interface: IPeptideProperties
        Calculates the aromaticity value of a protein according to Lobry, 1994. It is simply the relative frequency of Phe+Trp+Tyr.
        Specified by:
        getAromaticity in interface IPeptideProperties
        Parameters:
        sequence - a protein sequence consisting of non-ambiguous characters only
        Returns:
        the aromaticity of a protein sequence
        See Also:
        ProteinSequence