org.fhcrc.cpl.viewer.amt
Class AmtPeptideEntry.AmtPeptideModificationStateEntry

java.lang.Object
  extended by org.fhcrc.cpl.viewer.amt.AmtPeptideEntry.AmtPeptideModificationStateEntry
Enclosing class:
AmtPeptideEntry

public static class AmtPeptideEntry.AmtPeptideModificationStateEntry
extends java.lang.Object

Represents an entry for a specific modification state


Constructor Summary
AmtPeptideEntry.AmtPeptideModificationStateEntry()
           
 
Method Summary
 void addObservation(AmtPeptideEntry.AmtPeptideObservation observation)
          Add an observation for this peptide and recalculate the stats
protected  void addObservationNoRecalc(AmtPeptideEntry.AmtPeptideObservation observation)
          Add an observation for this peptide.
 void addObservations(AmtPeptideEntry.AmtPeptideObservation[] observations)
          Add a bunch of observations for this peptide, without recalculating stats, then recalculate once.
protected static java.lang.String calculateModifiedPeptideSequence(java.lang.String peptideSequence, java.util.List<MS2Modification>[] modifications)
          Look through all the modifications on this peptide and account for all of them
static AmtPeptideEntry.AmtPeptideModificationStateEntry createEntryFromObservation(java.lang.String peptideSequence, java.util.List<MS2Modification>[] modifications, AmtPeptideEntry.AmtPeptideObservation observation, AmtPeptideEntry parentPeptideEntry)
          Create a new entry with one observation based on a calculated hydrophobicity and that observation
static AmtPeptideEntry.AmtPeptideModificationStateEntry createModificationStateEntry(java.lang.String modifiedPeptideSequence, double modifiedMass, java.util.List<MS2Modification>[] modifications, AmtPeptideEntry parentPeptideEntry)
          Create a new entry with no observations
static AmtPeptideEntry.AmtPeptideModificationStateEntry createModificationStateEntryFromObservation(java.lang.String modifiedPeptideSequence, java.util.List<MS2Modification>[] modifications, AmtPeptideEntry.AmtPeptideObservation observation, AmtPeptideEntry parentPeptideEntry)
          Create a new entry with one observation based on a calculated hydrophobicity and that observation
 double getHydrophobicityStandardDeviation()
           
 double getMedianObservedHydrophobicity()
           
 double getMedianPeptideProphet()
           
 java.util.List<MS2Modification>[] getModifications()
           
 double getModifiedMass()
           
 java.lang.String getModifiedSequence()
           
 int getNumObservations()
          how many observations for this peptide entry?
 AmtPeptideEntry.AmtPeptideObservation getObservationForRun(AmtRunEntry runEntry)
           
 AmtPeptideEntry.AmtPeptideObservation[] getObservations()
           
 AmtPeptideEntry getParentPeptideEntry()
           
 int getSpectralCount()
           
 void recalculateMass()
          Recalculate the mass of this modification state in the following complicated way: -For all modified aminoacids, total up the masses -For all unmodified aminoacids, total up the masses by creating a fake Peptide and asking it for its mass -add the two totals together
 void recalculateModifiedSequenceAndMass(java.lang.String peptideSequence)
          Recalculate the modified sequence and mass.
 void recalculateStats()
           
 void recalculateStats(int precision)
          Recalculate the mean observed hydrophobicity, munging together all observations, giving them equal weight.
 boolean removeObservation(AmtPeptideEntry.AmtPeptideObservation observation)
          Remove an observation.
 void setHydrophobicityStandardDeviation(double newValue)
           
 void setMedianObservedHydrophobicity(double meanObservedHydrophobicity)
           
 void setMedianPeptideProphet(double meanPeptideProphet)
           
 void setModifications(java.util.List<MS2Modification>[] modifications)
           
 void setModifiedMass(double modifiedMass)
           
 void setModifiedSequence(java.lang.String mModifiedSequence)
           
 void setParentPeptideEntry(AmtPeptideEntry mParentPeptideEntry)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AmtPeptideEntry.AmtPeptideModificationStateEntry

public AmtPeptideEntry.AmtPeptideModificationStateEntry()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getObservationForRun

public AmtPeptideEntry.AmtPeptideObservation getObservationForRun(AmtRunEntry runEntry)

createModificationStateEntryFromObservation

public static AmtPeptideEntry.AmtPeptideModificationStateEntry createModificationStateEntryFromObservation(java.lang.String modifiedPeptideSequence,
                                                                                                           java.util.List<MS2Modification>[] modifications,
                                                                                                           AmtPeptideEntry.AmtPeptideObservation observation,
                                                                                                           AmtPeptideEntry parentPeptideEntry)
Create a new entry with one observation based on a calculated hydrophobicity and that observation

Parameters:
modifications -
observation -
Returns:

createEntryFromObservation

public static AmtPeptideEntry.AmtPeptideModificationStateEntry createEntryFromObservation(java.lang.String peptideSequence,
                                                                                          java.util.List<MS2Modification>[] modifications,
                                                                                          AmtPeptideEntry.AmtPeptideObservation observation,
                                                                                          AmtPeptideEntry parentPeptideEntry)
Create a new entry with one observation based on a calculated hydrophobicity and that observation

Parameters:
modifications -
observation -
Returns:

createModificationStateEntry

public static AmtPeptideEntry.AmtPeptideModificationStateEntry createModificationStateEntry(java.lang.String modifiedPeptideSequence,
                                                                                            double modifiedMass,
                                                                                            java.util.List<MS2Modification>[] modifications,
                                                                                            AmtPeptideEntry parentPeptideEntry)
Create a new entry with no observations

Parameters:
modifications -
Returns:

getSpectralCount

public int getSpectralCount()

calculateModifiedPeptideSequence

protected static java.lang.String calculateModifiedPeptideSequence(java.lang.String peptideSequence,
                                                                   java.util.List<MS2Modification>[] modifications)
Look through all the modifications on this peptide and account for all of them

Parameters:
peptideSequence -
modifications -
Returns:

recalculateModifiedSequenceAndMass

public void recalculateModifiedSequenceAndMass(java.lang.String peptideSequence)
Recalculate the modified sequence and mass. Used when wanting to change the rounding factor

Parameters:
peptideSequence -

recalculateMass

public void recalculateMass()
Recalculate the mass of this modification state in the following complicated way: -For all modified aminoacids, total up the masses -For all unmodified aminoacids, total up the masses by creating a fake Peptide and asking it for its mass -add the two totals together


addObservations

public void addObservations(AmtPeptideEntry.AmtPeptideObservation[] observations)
Add a bunch of observations for this peptide, without recalculating stats, then recalculate once. Because recalculation is expensive

Parameters:
observations -

addObservation

public void addObservation(AmtPeptideEntry.AmtPeptideObservation observation)
Add an observation for this peptide and recalculate the stats

Parameters:
observation -

addObservationNoRecalc

protected void addObservationNoRecalc(AmtPeptideEntry.AmtPeptideObservation observation)
Add an observation for this peptide. Don't recalculate stats

Parameters:
observation -

removeObservation

public boolean removeObservation(AmtPeptideEntry.AmtPeptideObservation observation)
Remove an observation. To do this you have to have the actual AmtPeptideObservation object from this entry. Might want to add a way to do this based on observed value, too, but if so, need to figure out how close it needs to be.

Parameters:
observation -

recalculateStats

public void recalculateStats()

recalculateStats

public void recalculateStats(int precision)
Recalculate the mean observed hydrophobicity, munging together all observations, giving them equal weight. Possibly, in the future, do other things. Possibly, in the future, if we store probability on observations, weight them


getNumObservations

public int getNumObservations()
how many observations for this peptide entry?

Returns:

setModifications

public void setModifications(java.util.List<MS2Modification>[] modifications)

getModifiedSequence

public java.lang.String getModifiedSequence()

setModifiedSequence

public void setModifiedSequence(java.lang.String mModifiedSequence)

getParentPeptideEntry

public AmtPeptideEntry getParentPeptideEntry()

setParentPeptideEntry

public void setParentPeptideEntry(AmtPeptideEntry mParentPeptideEntry)

getModifications

public java.util.List<MS2Modification>[] getModifications()

getHydrophobicityStandardDeviation

public double getHydrophobicityStandardDeviation()

setHydrophobicityStandardDeviation

public void setHydrophobicityStandardDeviation(double newValue)

getObservations

public AmtPeptideEntry.AmtPeptideObservation[] getObservations()

getMedianObservedHydrophobicity

public double getMedianObservedHydrophobicity()

setMedianObservedHydrophobicity

public void setMedianObservedHydrophobicity(double meanObservedHydrophobicity)

getMedianPeptideProphet

public double getMedianPeptideProphet()

setMedianPeptideProphet

public void setMedianPeptideProphet(double meanPeptideProphet)

getModifiedMass

public double getModifiedMass()

setModifiedMass

public void setModifiedMass(double modifiedMass)


Fred Hutchinson Cancer Research Center