com.compomics.util.experiment.biology
Class Peptide

java.lang.Object
  extended by com.compomics.util.experiment.personalization.ExperimentObject
      extended by com.compomics.util.experiment.biology.Peptide
All Implemented Interfaces:
Serializable, Cloneable

public class Peptide
extends ExperimentObject

This class models a peptide.

Created by IntelliJ IDEA. User: Marc Date: Jun 18, 2010 Time: 8:56:40 AM

See Also:
Serialized Form

Constructor Summary
Peptide()
          Constructor for the peptide
Peptide(String aSequence, Double mass, ArrayList<Protein> parentProteins, ArrayList<ModificationMatch> modifications)
          Constructor for the peptide
 
Method Summary
 void addFragmentIon(PeptideFragmentIon fragment)
          method to add a fragmentIon
 void addModificationMatch(ModificationMatch modificationMatch)
          Adds a modification match
 void clearModificationMAtches()
          Clears the list of imported modification matches
 Iterator<PeptideFragmentIon> fragmentIterator()
          Method which returns an iterator on the fragment ions
 String getKey()
          Returns the index of a peptide.
 Double getMass()
          getter for the mass
 ArrayList<ModificationMatch> getModificationMatches()
          getter for the modifications carried by this peptide
 int getNMissedCleavages(Enzyme enzyme)
          Returns the amount of missed cleavages using the specified enzyme
 ArrayList<Protein> getParentProteins()
          Getter for the parent proteins
 String getSequence()
          getter for the sequence
 boolean isSameAs(Peptide anotherPeptide)
          a method which compares to peptides.
 boolean sameModificationsAs(Peptide anotherPeptide)
          Indicates whether another peptide has the same modifications at the same localization as this peptide.
 void setParentProteins(ArrayList<Protein> parentProteins)
          Sets the parent proteins
 
Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, getUrParam
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Peptide

public Peptide()
Constructor for the peptide


Peptide

public Peptide(String aSequence,
               Double mass,
               ArrayList<Protein> parentProteins,
               ArrayList<ModificationMatch> modifications)
Constructor for the peptide

Parameters:
aSequence - The peptide sequence
mass - The peptide mass
parentProteins - The parent proteins
modifications - The PTM of this peptide
Method Detail

getMass

public Double getMass()
getter for the mass

Returns:
the peptide mass

getModificationMatches

public ArrayList<ModificationMatch> getModificationMatches()
getter for the modifications carried by this peptide

Returns:
the modifications matches as found by the search engine

clearModificationMAtches

public void clearModificationMAtches()
Clears the list of imported modification matches


addModificationMatch

public void addModificationMatch(ModificationMatch modificationMatch)
Adds a modification match

Parameters:
modificationMatch - the modification match to add

getSequence

public String getSequence()
getter for the sequence

Returns:
the peptide sequence

getNMissedCleavages

public int getNMissedCleavages(Enzyme enzyme)
Returns the amount of missed cleavages using the specified enzyme

Parameters:
enzyme - the enzyme used
Returns:
the amount of missed cleavages

addFragmentIon

public void addFragmentIon(PeptideFragmentIon fragment)
method to add a fragmentIon

Parameters:
fragment - a fragment ion of this peptide

fragmentIterator

public Iterator<PeptideFragmentIon> fragmentIterator()
Method which returns an iterator on the fragment ions

Returns:
an iterator on implemented fragment ions

getParentProteins

public ArrayList<Protein> getParentProteins()
Getter for the parent proteins

Returns:
the parent proteins

setParentProteins

public void setParentProteins(ArrayList<Protein> parentProteins)
Sets the parent proteins

Parameters:
parentProteins - the parent proteins as list

getKey

public String getKey()
Returns the index of a peptide. index = SEQUENCE_mod1_mod2 with modifications ordered alphabetically.

Returns:
the index of a peptide

isSameAs

public boolean isSameAs(Peptide anotherPeptide)
a method which compares to peptides. Two same peptides present the same sequence and same modifications at the same place.

Parameters:
anOtherPeptide - another peptide
Returns:
a boolean indicating if the other peptide is the same.

sameModificationsAs

public boolean sameModificationsAs(Peptide anotherPeptide)
Indicates whether another peptide has the same modifications at the same localization as this peptide. This method comes as a complement of isSameAs which does not account for PTM location.

Parameters:
anotherPeptide - another peptide
Returns:
true if the other peptide has the same positions at the same location as the considered peptide


Copyright © 2011. All Rights Reserved.