Class PeptideProteinMapping
java.lang.Object
com.compomics.util.experiment.identification.protein_inference.PeptideProteinMapping
Class used to model the mapping of a peptide to a protein sequence. Note that
all peptide indexes are zero-based.
- Author:
- Marc Vaudel
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEmpty default constructor.PeptideProteinMapping(String proteinAccession, String peptideSequence, int index) Constructor.PeptideProteinMapping(String proteinAccession, String peptideSequence, int index, ModificationMatch[] modificationMatches) Constructor.PeptideProteinMapping(String proteinAccession, String peptideSequence, int index, ModificationMatch[] modificationMatches, PeptideVariantMatches peptideVariantMatches) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintgetIndex()Returns the index on the protein.getPeptideProteinIndexesMap(ArrayList<PeptideProteinMapping> peptideProteinMappings) Returns a map made from the given mappings containing the indexes of the peptides in the protein sequences indexed by peptide sequence and protein accession.getPeptideProteinMap(ArrayList<PeptideProteinMapping> peptideProteinMappings) Returns a map made from the given mappings containing protein accessions for every peptide sequence.static Collection<Peptide> getPeptides(ArrayList<PeptideProteinMapping> peptideProteinMappings, SequenceMatchingParameters sequenceMatchingPreferences) Aggregates the given mapping into a list of peptides.Returns the peptide sequence.Returns eventual variants found.Returns the accession of the protein.Returns eventual modifications found.static HashMap<String, HashMap<Integer, PeptideVariantMatches>> getVariantMatches(ArrayList<PeptideProteinMapping> peptideProteinMappings) Returns the variant matches summarized in a map indexed by protein accession and peptide index on the protein sequence.
-
Field Details
-
fmIndexPosition
public int fmIndexPositionThe position in the FM index.
-
-
Constructor Details
-
PeptideProteinMapping
public PeptideProteinMapping()Empty default constructor. -
PeptideProteinMapping
public PeptideProteinMapping(String proteinAccession, String peptideSequence, int index, ModificationMatch[] modificationMatches, PeptideVariantMatches peptideVariantMatches) Constructor.- Parameters:
proteinAccession- the accession of the proteinpeptideSequence- the peptide sequenceindex- the index on the proteinmodificationMatches- eventual modification matchespeptideVariantMatches- eventual sequence variants
-
PeptideProteinMapping
Constructor.- Parameters:
proteinAccession- the accession of the proteinpeptideSequence- the peptide sequenceindex- the index on the protein
-
PeptideProteinMapping
public PeptideProteinMapping(String proteinAccession, String peptideSequence, int index, ModificationMatch[] modificationMatches) Constructor.- Parameters:
proteinAccession- the accession of the proteinpeptideSequence- the peptide sequenceindex- the index on the proteinmodificationMatches- modification matches
-
-
Method Details
-
getProteinAccession
Returns the accession of the protein.- Returns:
- the accession of the protein
-
getPeptideSequence
Returns the peptide sequence.- Returns:
- the peptide sequence
-
getIndex
public int getIndex()Returns the index on the protein.- Returns:
- the index on the protein
-
getVariableModifications
Returns eventual modifications found.- Returns:
- eventual modifications found
-
getPeptideVariantMatches
Returns eventual variants found.- Returns:
- eventual variants found
-
getPeptideProteinIndexesMap
public static HashMap<String,HashMap<String, getPeptideProteinIndexesMapint[]>> (ArrayList<PeptideProteinMapping> peptideProteinMappings) Returns a map made from the given mappings containing the indexes of the peptides in the protein sequences indexed by peptide sequence and protein accession.- Parameters:
peptideProteinMappings- a list of peptide to protein mappings- Returns:
- a map of the mapping
-
getPeptideProteinMap
public static HashMap<String,HashSet<String>> getPeptideProteinMap(ArrayList<PeptideProteinMapping> peptideProteinMappings) Returns a map made from the given mappings containing protein accessions for every peptide sequence.- Parameters:
peptideProteinMappings- a list of peptide to protein mappings- Returns:
- a map of the mapping
-
getVariantMatches
public static HashMap<String,HashMap<Integer, getVariantMatchesPeptideVariantMatches>> (ArrayList<PeptideProteinMapping> peptideProteinMappings) Returns the variant matches summarized in a map indexed by protein accession and peptide index on the protein sequence. Null if no variant found.- Parameters:
peptideProteinMappings- the protein mappings to group- Returns:
- the variant matches summarized in a map
-
getPeptides
public static Collection<Peptide> getPeptides(ArrayList<PeptideProteinMapping> peptideProteinMappings, SequenceMatchingParameters sequenceMatchingPreferences) Aggregates the given mapping into a list of peptides.- Parameters:
peptideProteinMappings- a list of peptides to protein mappingssequenceMatchingPreferences- the sequence matching preferences- Returns:
- a list of peptides
-