Class IonFactory
java.lang.Object
com.compomics.util.experiment.biology.ions.IonFactory
This factory generates the expected ions from a peptide.
- Author:
- Marc Vaudel, Harald Barsnes
-
Method Summary
Modifier and TypeMethodDescriptionReturns the default neutral losses.getFragmentIons(Peptide peptide, SpecificAnnotationParameters specificAnnotationSettings, ModificationParameters modificationParameters, SequenceProvider sequenceProvider, SequenceMatchingParameters modificationsSequenceMatchingParameters) This method returns the theoretic ions expected from a peptide.getFragmentIons(Peptide peptide, ModificationParameters modificationParameters, SequenceProvider sequenceProvider, SequenceMatchingParameters modificationsSequenceMatchingParameters) This method returns all the theoretic ions expected from a peptide.getFragmentIons(Tag tag, ModificationParameters modificationParameters, SequenceMatchingParameters modificationsSequenceMatchingParameters) This method returns the theoretic ions expected from a tag.static IonFactoryStatic method which returns the instance of the factory.static doublegetLossesMass(NeutralLoss[] neutralLosses) Convenience summing the masses of various neutral losses.getNeutralLosses(ModificationParameters modificationParameters) Returns a list containing the default neutral losses and the losses found in the given modifications.getNeutralLossesCombinations(HashSet<String> possibleNeutralLosses) Returns the possible neutral losses combinations as array of arrays of neutral losses.getReporterIons(ModificationParameters modificationParameters) Returns the reporter ions to annotate with the given PTM settings.
-
Method Details
-
getInstance
Static method which returns the instance of the factory.- Returns:
- the instance of the factory
-
getDefaultNeutralLosses
Returns the default neutral losses.- Returns:
- the default neutral losses
-
getNeutralLosses
Returns a list containing the default neutral losses and the losses found in the given modifications. Note: modifications must be loaded in the modification factory.- Parameters:
modificationParameters- the modification parameters- Returns:
- the neutral losses expected in the dataset
-
getReporterIons
Returns the reporter ions to annotate with the given PTM settings.- Parameters:
modificationParameters- the PTMs to annotate- Returns:
- a hashset of the subtype indexes of the reporter ions to annotate
-
getFragmentIons
public HashMap<Integer,HashMap<Integer, getFragmentIonsArrayList<Ion>>> (Peptide peptide, ModificationParameters modificationParameters, SequenceProvider sequenceProvider, SequenceMatchingParameters modificationsSequenceMatchingParameters) This method returns all the theoretic ions expected from a peptide. /!\ this method will work only if the modifications found in the peptide are in the ModificationFactory.- Parameters:
peptide- The considered peptidemodificationParameters- the modification parameters the modification parameterssequenceProvider- a protein sequence providermodificationsSequenceMatchingParameters- the sequence matching parameters to use for modifications- Returns:
- the expected fragment ions
-
getFragmentIons
public HashMap<Integer,HashMap<Integer, getFragmentIonsArrayList<Ion>>> (Peptide peptide, SpecificAnnotationParameters specificAnnotationSettings, ModificationParameters modificationParameters, SequenceProvider sequenceProvider, SequenceMatchingParameters modificationsSequenceMatchingParameters) This method returns the theoretic ions expected from a peptide. /!\ this method will work only if the modifications found in the peptide are in the ModificationFactory.- Parameters:
peptide- the considered peptidespecificAnnotationSettings- if provided, only the ions detectable using these settings will be selectedmodificationParameters- the modification parameters the modification parameterssequenceProvider- a protein sequence providermodificationsSequenceMatchingParameters- the sequence matching parameters to use for modifications- Returns:
- the expected fragment ions
-
getFragmentIons
public HashMap<Integer,HashMap<Integer, getFragmentIonsArrayList<Ion>>> (Tag tag, ModificationParameters modificationParameters, SequenceMatchingParameters modificationsSequenceMatchingParameters) This method returns the theoretic ions expected from a tag. /!\ this method will work only if the PTMs found in the tag are in the PTMFactory.- Parameters:
tag- the considered tagmodificationParameters- the modification parameters the modification parametersmodificationsSequenceMatchingParameters- the sequence matching parameters to use for modifications- Returns:
- the expected fragment ions
-
getNeutralLossesCombinations
Returns the possible neutral losses combinations as array of arrays of neutral losses.- Parameters:
possibleNeutralLosses- the possible neutral losses to include- Returns:
- the possible neutral losses combinations
-
getLossesMass
Convenience summing the masses of various neutral losses.- Parameters:
neutralLosses- list of neutral losses- Returns:
- the sum of the masses
-