|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.biology.Protein
public class Protein
This class models a protein.
Constructor Summary | |
---|---|
Protein()
Constructor for a protein |
|
Protein(java.lang.String accession,
boolean isDecoy)
Simplistic constructor for a protein (typically used when loading identification files). |
|
Protein(java.lang.String accession,
Header.DatabaseType databaseType,
java.lang.String sequence,
boolean isDecoy)
Constructor for a protein. |
|
Protein(java.lang.String accession,
java.lang.String sequence,
boolean isDecoy)
Constructor for a protein. |
Method Summary | |
---|---|
double |
computeMolecularWeight()
Returns the protein's molecular weight. |
java.lang.String |
getAccession()
Getter for the protein accession. |
Header.DatabaseType |
getDatabaseType()
Getter for the protein database type. |
int |
getLength()
Returns the number of amino acids in the sequence. |
int |
getNPossiblePeptides(Enzyme enzyme)
Returns the number of possible peptides (not accounting PTMs nor missed cleavages) with the selected enzyme. |
int |
getObservableLength(Enzyme enzyme,
int pepMaxLength)
Returns the number of observable amino acids of the sequence. |
java.util.ArrayList<java.lang.Integer> |
getPeptideStart(java.lang.String peptide)
Returns the list of indexes where a peptide can be found in the protein sequence. |
java.lang.String |
getProteinKey()
Returns the key for protein indexing. |
java.lang.String |
getSequence()
Getter for the protein sequence. |
java.util.HashMap<java.lang.Integer,java.lang.String[]> |
getSurroundingAA(java.lang.String peptide,
int nAA)
Returns the amino acids surrounding a peptide in the sequence of the given protein in a map: peptide start index -> (amino acids before, amino acids after) The number of amino acids is taken from the display preferences. |
boolean |
isCTerm(java.lang.String peptideSequence)
Returns a boolean indicating whether the protein ends with the given peptide |
boolean |
isDecoy()
Indicates if the protein is factice (from a decoy database for instance). |
boolean |
isNTerm(java.lang.String peptideSequence)
Returns a boolean indicating whether the protein starts with the given peptide |
boolean |
isSameAs(Protein anotherProtein)
A method to compare proteins. |
Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject |
---|
addUrParam, getParameterKey, getUrParam |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Protein()
public Protein(java.lang.String accession, boolean isDecoy)
accession
- The protein accessionisDecoy
- boolean indicating whether the protein is a decoypublic Protein(java.lang.String accession, java.lang.String sequence, boolean isDecoy)
accession
- The protein accessionsequence
- The protein sequenceisDecoy
- boolean indicating whether the protein is a decoypublic Protein(java.lang.String accession, Header.DatabaseType databaseType, java.lang.String sequence, boolean isDecoy)
accession
- The protein accessiondatabaseType
- The protein database the protein comes fromsequence
- The protein sequenceisDecoy
- boolean indicating whether the protein is a decoyMethod Detail |
---|
public boolean isDecoy()
public java.lang.String getAccession()
public Header.DatabaseType getDatabaseType()
public java.lang.String getSequence()
public boolean isSameAs(Protein anotherProtein)
anotherProtein
- an other protein
public java.lang.String getProteinKey()
public int getLength()
public int getObservableLength(Enzyme enzyme, int pepMaxLength)
enzyme
- the enzyme to usepepMaxLength
- the max peptide length
public int getNPossiblePeptides(Enzyme enzyme)
enzyme
- The selected enzyme
public double computeMolecularWeight()
public java.util.ArrayList<java.lang.Integer> getPeptideStart(java.lang.String peptide)
peptide
- the sequence of the peptide of interest
public boolean isNTerm(java.lang.String peptideSequence)
peptideSequence
- the peptide sequence
public boolean isCTerm(java.lang.String peptideSequence)
peptideSequence
- the peptide sequence
public java.util.HashMap<java.lang.Integer,java.lang.String[]> getSurroundingAA(java.lang.String peptide, int nAA) throws java.io.IOException
peptide
- the sequence of the peptide of interestnAA
- the number of amino acids to include
java.io.IOException
- Exception thrown whenever an error occurred while
parsing the protein sequence
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |