public class Peptide extends AminoAcidSequence implements Weighable
| Constructor and Description |
|---|
Peptide(AminoAcid firstResidue,
AminoAcid... residues)
Construct an Peptide by copying the residues.
|
Peptide(AminoAcidSequence src)
Copy constructor.
|
Peptide(AminoAcidSequence src,
int beginIndex,
int endIndex)
Constructs a Peptide by copying the residues and modifications from
src. |
Peptide(List<AminoAcid> residues)
Constructs an Peptide by copying the residues.
|
Peptide(List<AminoAcid> residues,
com.google.common.collect.Multimap<Integer,Modification> sideChainModMap,
com.google.common.collect.Multimap<ModAttachment,Modification> termModMap)
Constructs an Peptide from the list of residues with the modifications contained in
side chain and term mod map.
|
Peptide(Peptide peptide,
Set<AminoAcid> oldAAs,
AminoAcid newAa) |
| Modifier and Type | Method and Description |
|---|---|
double |
calculateMz(int charge)
Calculate the m/z of this peptide at the given charge
|
PeptideFragment |
createFragment(int beginIndex,
int endIndex,
FragmentType fragmentType)
Returns a new peptide fragment that is a subsequence of this peptide.
|
PeptideFragment |
createFragment(IonType ionType,
int residueNumber)
Create PeptideFragment that is sub sequence for the give ion type and residue number
Given peptide CERVILAS createFragment(y, 1) will return S, createFragment(b, 1) will return C
createFragment(b, 3) will return CER.
|
double |
getMolecularMass()
Returns the mass of this peptide
|
static Peptide |
parse(String s)
Parse s to build a Peptide.
|
static Peptide |
parse(String s,
ModificationResolver modResolver)
Parse
s to build a Peptide using the modResolver to convert modification strings to
Modification |
Peptide |
replace(Set<AminoAcid> oldAAs,
AminoAcid newAa) |
Peptide |
subSequence(int beginIndex,
int endIndex)
Returns a new peptide that is a sub sequence of this peptide.
|
Peptide |
subSequence(IonType ionType,
int residueNumber)
Create a sub sequence for the give ion type and residue number
Given peptide CERVILAS subSequence(y, 1) will return S, subSequence(b, 1) will return C
subSequence(b, 3) will return CER.
|
calculateMonomerMassDefect, calculateMonomerMassSum, countAminoAcidsIn, equals, getAmbiguousAminoAcids, getModificationCount, getModificationCount, getModificationIndexes, getModifications, getModificationsAt, getModifiedResidueCount, getSymbol, getSymbolIndexes, hasAmbiguousAminoAcids, hashCode, hasModificationAt, hasModificationAt, hasModificationAt, hasModificationAt, hasModifications, hasSameSequence, hasSameSequence, isEmpty, size, toString, toSymbolStringpublic Peptide(AminoAcid firstResidue, AminoAcid... residues)
firstResidue - the first residueresidues - the rest of the residuespublic Peptide(List<AminoAcid> residues)
residues - the residues, the array cannot be emptypublic Peptide(AminoAcidSequence src)
src - the peptide to copy.public Peptide(AminoAcidSequence src, int beginIndex, int endIndex)
src.
The new Peptide begins at the specified beginIndex and
extends to the residue at index endIndex - 1.src - the AminoAcidSequence from which to copy the sequence and modificationsbeginIndex - beginIndex the beginning index, inclusive.endIndex - the ending index, exclusive.public Peptide(List<AminoAcid> residues, com.google.common.collect.Multimap<Integer,Modification> sideChainModMap, com.google.common.collect.Multimap<ModAttachment,Modification> termModMap)
residues - the residues, this list must have at least one amino acidsideChainModMap - the side chain modifications, this map can be emptytermModMap - the terminal modifications, this map can be emptypublic static Peptide parse(String s)
PEPTIDE : the peptide PEPTIDE PEPTM(O)IDE : the peptide PEPTIDE with an oxidation on M PEPTM(O, Phospho)IDE : the peptide PEPTIDE with an oxidation and phosphorylation on M (Acetyl)_PEPTIDE_(O) : the peptide PEPTIDE with a n-term Acetylation and c_term oxidation modification
s - the stringPeptideParseException - if s is not a valid stringpublic static Peptide parse(String s, ModificationResolver modResolver)
s to build a Peptide using the modResolver to convert modification strings to
Modifications - the stringmodResolver - Function to convert modification string to ModificationPeptideParseException - if s is not a valid stringpublic Peptide subSequence(int beginIndex, int endIndex)
beginIndex and
extends to the amino acid at index endIndex - 1.
Thus the length of the sub sequence is endIndex-beginIndex.
beginIndex - the beginning index, inclusive.endIndex - the ending index, exclusive.IndexOutOfBoundsException - if the
beginIndex is negative, or
endIndex is larger than the length of
this Peptide object, or
beginIndex is larger than
endIndex.public PeptideFragment createFragment(int beginIndex, int endIndex, FragmentType fragmentType)
beginIndex and
extends to the amino acid at index endIndex - 1.
Thus the length of the subsequence is endIndex-beginIndex.
beginIndex - the beginning index, inclusive.endIndex - the ending index, exclusive.fragmentType - the type of the fragmentIndexOutOfBoundsException - if the
beginIndex is negative, or
endIndex is larger than the length of
this String object, or
beginIndex is larger than
endIndex.public PeptideFragment createFragment(IonType ionType, int residueNumber)
ionType - the type of the ion, only accepts ions that are FORWARD, REVERSE and MONOMER fragmentsresidueNumber - the index of the residue. The index of the first residue is 1public Peptide subSequence(IonType ionType, int residueNumber)
ionType - the type of the ion, only accepts ions that are FORWARD, REVERSE and MONOMER fragmentsresidueNumber - the index of the residue. The index of the first residue is 1public double calculateMz(int charge)
charge - the chargepublic double getMolecularMass()
getMolecularMass in interface WeighableCopyright © 2016. All Rights Reserved.