public class PeptideMatch extends Object implements SymbolSequence<AminoAcid>, Comparable<PeptideMatch>
| Constructor and Description |
|---|
PeptideMatch(AminoAcid... sequence)
Create a peptide match given an amino acid sequence
|
PeptideMatch(List<AminoAcid> sequence)
Create a peptide match given an amino acid sequence
|
PeptideMatch(PeptideSpectrum peptideSpectrum,
String scoreName,
double score)
Construct a PeptideMatch from a peptide spectrum and score.
|
PeptideMatch(String peptideSequence)
Create a peptide match given an amino acid sequence
|
PeptideMatch(SymbolSequence<AminoAcid> sequence)
Create a peptide match given an amino acid esequence
|
| Modifier and Type | Method and Description |
|---|---|
ModificationMatch |
addModificationMatch(int index,
double modificationMass)
Convenience method for adding a ModificationMatch.
|
ModificationMatch |
addModificationMatch(int index,
Modification modification)
Convenience method for adding a ModificationMatch.
|
void |
addModificationMatch(int index,
ModificationMatch modificationMatch)
Add a the
modificationMatch to the side chain of residue at index |
ModificationMatch |
addModificationMatch(ModAttachment modAttachment,
double modificationMass)
Convenience method for adding a ModificationMatch.
|
ModificationMatch |
addModificationMatch(ModAttachment modAttachment,
Modification modification)
Convenience method for adding a ModificationMatch.
|
void |
addModificationMatch(ModAttachment modAttachment,
ModificationMatch modificationMatch)
Add a the
modificationMatch to either end of the this peptide match. |
void |
addProteinMatch(PeptideProteinMatch proteinMatch)
Add a protein match to this PeptideMatch
|
void |
addProteinMatches(Collection<PeptideProteinMatch> matchCollection)
Add all the accessions in
proteinAC to this PeptideMatch |
void |
addScore(String name,
double value)
Add the score to the score map
|
int |
compareTo(PeptideMatch o) |
boolean |
containsOnlyProteinMatch(Pattern pattern)
Returns true if this PeptideMatch contains only ProteinMatch's that have an accession
in which the
regex pattern can be found. |
boolean |
containsOnlyProteinMatch(String regex)
Returns true if this PeptideMatch contains only ProteinMatch's that have an accession
in which the
regex pattern can be found. |
boolean |
containsProtein(String proteinAcs)
Returns true if this PeptideMatch contains the
proteinAcs protein accession, false otherwise. |
boolean |
containsProteinMatch(Pattern pattern)
Returns true if this PeptideMatch contains a ProteinMatch that has an accession
in which the
regex pattern can be found. |
boolean |
containsProteinMatch(String regex)
Returns true if this PeptideMatch contains a ProteinMatch that has an accession
in which the
regex pattern can be found. |
boolean |
equals(Object o) |
com.google.common.base.Optional<Double> |
getMassDiff()
Returns the difference between the theoretical and experimental mass.
|
int |
getModificationCount()
Returns the number of modifications that theis peptide match has.
|
List<ModificationMatch> |
getModifications(int index,
Set<ModAttachment> attachments)
Returns a list containing all ModificationMatch for the residue at
index that are attached
by a ModAttachment contained in the attachments set. |
List<ModificationMatch> |
getModifications(Set<ModAttachment> attachments)
Return a list containing all ModificationMatch for ModAttachment's in the
attachments
set. |
double |
getNeutralPeptideMass() |
com.google.common.base.Optional<Integer> |
getNumMatchedIons()
Return the number of ions that are were matched
|
com.google.common.base.Optional<Integer> |
getNumMissedCleavages()
Return the number of missed cleavages that the Peptide contains
|
List<PeptideProteinMatch> |
getProteinMatches()
Return a reference to the protein accession list
|
com.google.common.base.Optional<Integer> |
getRank()
Return the rank of this PeptideMatch
|
double |
getScore(String scoreName)
Return the score that is associtaed with
scoreName |
gnu.trove.map.TObjectDoubleMap<String> |
getScoreMap()
Returns a reference to the score map
|
AminoAcid |
getSymbol(int index)
Returns the symbol at the specified position in this symbol sequence.
|
com.google.common.base.Optional<Integer> |
getTotalNumIons()
Return the total number of ions that were generated for the Peptide
|
int |
hashCode() |
boolean |
hasScore(String scoreName)
Returns true if there is a score for
scoreName |
com.google.common.base.Optional<Boolean> |
isRejected()
Returns true if this PeptideMatch was rejected, false otherwise
|
boolean |
sameModPeptide(PeptideMatch match)
Returns true if this PeptideMatch and
match have the same peptide
sequence and modifications. |
void |
setMassDiff(com.google.common.base.Optional<Double> massDiff)
Set the difference between the the theoretical and experimental mass
|
void |
setNeutralPeptideMass(double neutralPeptideMass) |
void |
setNumMatchedIons(com.google.common.base.Optional<Integer> numMatchedIons)
Set the number of ions that were matched
|
void |
setNumMissedCleavages(com.google.common.base.Optional<Integer> numMissedCleavages)
Set the number of missed cleavages that the Peptide contains
|
void |
setRank(com.google.common.base.Optional<Integer> rank)
Set the rank of this PeptideMatch
|
void |
setRejected(com.google.common.base.Optional<Boolean> rejected)
Set whether this PeptideMatch was rejected or not
|
void |
setTotalNumIons(com.google.common.base.Optional<Integer> totalNumIons)
Set the total number of ion that were generated for the Peptide
|
int |
size()
Returns the number of symbols in this symbol sequence.
|
Peptide |
toBarePeptide()
Convert this PeptideMatch to a peptide containing only the bare peptide sequence.
|
Peptide |
toPeptide()
Convert this PeptideMatch to a peptide
|
Peptide |
toPeptide(ModificationMatchResolver modMatchResolver)
Convert this PeptideMatch to a peptide using the supplied
modificationMatchResolver
to convert ModificationMatch instances to Modifications. |
String |
toString() |
String |
toSymbolString()
String containing the Symbols
|
public PeptideMatch(AminoAcid... sequence)
sequence - the amino acid sequencepublic PeptideMatch(List<AminoAcid> sequence)
sequence - the amino acid sequencepublic PeptideMatch(String peptideSequence)
peptideSequence - the amino acid sequencepublic PeptideMatch(SymbolSequence<AminoAcid> sequence)
sequence - the amino acid sequencepublic PeptideMatch(PeptideSpectrum peptideSpectrum, String scoreName, double score)
peptideSpectrum - the peptideSequence for which the PeptideMatch is to be createdscoreName - the name of the scorescore - the scorepublic void addScore(String name, double value)
name - the name of the scorevalue - the value of the scorepublic gnu.trove.map.TObjectDoubleMap<String> getScoreMap()
public boolean hasScore(String scoreName)
scoreNamescoreName - the name of the score to test forescoreNamepublic double getScore(String scoreName)
scoreNamescoreName - the name of the scorescoreNameIllegalArgumentException - if there is no score associated with scoreNamepublic com.google.common.base.Optional<Integer> getRank()
public void setRank(com.google.common.base.Optional<Integer> rank)
rank - the rank of the PeptideMatchpublic com.google.common.base.Optional<Integer> getNumMatchedIons()
public void setNumMatchedIons(com.google.common.base.Optional<Integer> numMatchedIons)
numMatchedIons - the number of ions tha twere matchedpublic com.google.common.base.Optional<Integer> getTotalNumIons()
public void setTotalNumIons(com.google.common.base.Optional<Integer> totalNumIons)
totalNumIons - the total number of ionspublic com.google.common.base.Optional<Double> getMassDiff()
public void setMassDiff(com.google.common.base.Optional<Double> massDiff)
massDiff - the mass differencepublic com.google.common.base.Optional<Integer> getNumMissedCleavages()
public void setNumMissedCleavages(com.google.common.base.Optional<Integer> numMissedCleavages)
numMissedCleavages - the number of missed cleavagespublic com.google.common.base.Optional<Boolean> isRejected()
public void setRejected(com.google.common.base.Optional<Boolean> rejected)
rejected - boolean to indicate wether the peptide was rejected or notpublic double getNeutralPeptideMass()
public void setNeutralPeptideMass(double neutralPeptideMass)
public void addProteinMatch(PeptideProteinMatch proteinMatch)
proteinMatch - the protein accession to addpublic void addProteinMatches(Collection<PeptideProteinMatch> matchCollection)
proteinAC to this PeptideMatchmatchCollection - collection containing the accessions to addpublic List<PeptideProteinMatch> getProteinMatches()
public boolean sameModPeptide(PeptideMatch match)
match have the same peptide
sequence and modifications.match - the PeptideMatch to testmatch have the same peptide
sequence and modificationspublic int compareTo(PeptideMatch o)
compareTo in interface Comparable<PeptideMatch>public AminoAcid getSymbol(int index)
SymbolSequencegetSymbol in interface SymbolSequence<AminoAcid>index - index of the symbol to returnpublic String toSymbolString()
SymbolSequencetoSymbolString in interface SymbolSequence<AminoAcid>public int size()
SymbolSequencesize in interface SymbolSequence<AminoAcid>public void addModificationMatch(int index,
ModificationMatch modificationMatch)
modificationMatch to the side chain of residue at indexindex - the index of the reside where the ModificationMatch is to be addedmodificationMatch - the ModificationMatch that is to be addedpublic ModificationMatch addModificationMatch(int index, double modificationMass)
index - the index of the modificationmodificationMass - the mass difference due to the modificationpublic ModificationMatch addModificationMatch(int index, Modification modification)
index - the index of the modificationmodification - the modificationpublic void addModificationMatch(ModAttachment modAttachment, ModificationMatch modificationMatch)
modificationMatch to either end of the this peptide match. The end is
specified busing the modAttachmentmodAttachment - specifies which end of the peptide the modificationMatch is to be addedmodificationMatch - the ModificationMatch that is to be addedpublic ModificationMatch addModificationMatch(ModAttachment modAttachment, double modificationMass)
modAttachment - the mod attachment is required to be either ModAttachment.N_TERM or ModAttachment.C_TERMmodificationMass - the mass difference due to the modificationpublic ModificationMatch addModificationMatch(ModAttachment modAttachment, Modification modification)
modAttachment - the mod attachment is required to be either ModAttachment.N_TERM or ModAttachment.C_TERMmodification - the mass modificationpublic int getModificationCount()
public List<ModificationMatch> getModifications(Set<ModAttachment> attachments)
attachments
set.attachments - set containing the ModAttachments that are to be retrievedattachments
setpublic List<ModificationMatch> getModifications(int index, Set<ModAttachment> attachments)
index that are attached
by a ModAttachment contained in the attachments set.index - the residue indexattachments - set containing the ModAttachments that are to be retrievedindex that are attached
by a ModAttachment contained in the attachments setpublic Peptide toPeptide()
UnresolvableModificationMatchException - if a modification match cannot be resolved to a modificationpublic Peptide toPeptide(ModificationMatchResolver modMatchResolver)
modificationMatchResolver
to convert ModificationMatch instances to Modifications.UnresolvableModificationMatchException - if a modification match cannot be resolved to a modificationpublic Peptide toBarePeptide()
public boolean containsProtein(String proteinAcs)
proteinAcs protein accession, false otherwise.proteinAcs - the protein accession to testproteinAcs protein accession, false otherwisepublic boolean containsProteinMatch(String regex)
regex pattern can be found.regex - the regex patternregex pattern can be found, false otherwisepublic boolean containsOnlyProteinMatch(String regex)
regex pattern can be found.regex - the regex patternregex pattern can be found, false otherwisepublic boolean containsProteinMatch(Pattern pattern)
regex pattern can be found.pattern - the regex patternregex pattern can be found, false otherwisepublic boolean containsOnlyProteinMatch(Pattern pattern)
regex pattern can be found.pattern - the regex patternregex pattern can be found, false otherwiseCopyright © 2016. All Rights Reserved.