public class MoleculeUtilities extends Object
Utility class for Molecule operations
Constructor and Description |
---|
MoleculeUtilities() |
Modifier and Type | Method and Description |
---|---|
static double |
calculateAvgMass(Mass... masses)
calculate the sum of the average masses.
|
static Double |
calculateDeltaMz(double precursorMz,
double theoreticalMass)
Calculate the mono delta m/z for the given sequence, based on theoretical and experimental mass
|
static Double |
calculateDeltaMz(String sequence,
double precursorMz,
int precursorCharge,
List<Double> ptmMasses)
Calculate the mono delta m/z for the given sequence, precursor m/z and precursor charge
If invalid, -1 will be returned.
|
static double |
calculateMonoMass(Mass... masses)
calculate the sum of the mono-isotopic masses.
|
static double |
calculatePeptideAvgMass(AminoAcidSequence aminoAcidSequence,
List<PTModification> modifications,
double... massCorrections)
Calculate peptide's average mass.
|
static double |
calculatePeptideMonoMass(AminoAcidSequence aminoAcidSequence,
List<PTModification> modifications,
double... massCorrections)
Calculate peptide's monoisotopic mass.
|
static double |
calculateTheoreticalMass(String seq,
double... masses)
Calculates the theoretical mass taking into account the mono-mass of every AminoAcid
of the sequence and the array of masses passed
|
static AminoAcid |
getAminoacid(char aa)
Converts a chart to an AminoAcid if it matches with one of them
|
static boolean |
isAminoAcidSequence(String seq)
Check if the sequence is valid in terms of the letters contained
|
static void |
main(String[] args) |
static List<AminoAcid> |
searchForAminoAcid(double massRangeStart,
double massRangeEnd,
boolean isMonoMass)
Search within a mass window (inclusive).
|
static List<AminoAcidSequence> |
searchForPeptide(double massRangeStart,
double massRangeEnd,
boolean isMonoMass,
int numOfResidue)
Search and return a combination of amino acid according the number of residue specified.
|
public static AminoAcid getAminoacid(char aa)
aa
- the chart to convertpublic static boolean isAminoAcidSequence(String seq)
seq
- the sequence to checkpublic static List<AminoAcid> searchForAminoAcid(double massRangeStart, double massRangeEnd, boolean isMonoMass)
massRangeStart
- mass window start.massRangeEnd
- mass window end.isMonoMass
- choose between mono mass and average mass.public static List<AminoAcidSequence> searchForPeptide(double massRangeStart, double massRangeEnd, boolean isMonoMass, int numOfResidue)
massRangeStart
- mass window start.massRangeEnd
- mass window end.isMonoMass
- choose between mono mass and average mass.numOfResidue
- number of residues.public static double calculateTheoreticalMass(String seq, double... masses) throws IllegalAminoAcidSequenceException
seq
- the sequence to calculate the mono-mass of every AminoAcidmasses
- the extra masses to add to the theorical mass (i.e. PTM or WATTER)IllegalAminoAcidSequenceException
- if the sequence is not validpublic static Double calculateDeltaMz(String sequence, double precursorMz, int precursorCharge, List<Double> ptmMasses)
sequence
- amino acid sequenceprecursorMz
- precursor m/zprecursorCharge
- precursor chargeptmMasses
- a list of ptm monoisotopic massespublic static Double calculateDeltaMz(double precursorMz, double theoreticalMass)
precursorMz
- precursor m/ztheoreticalMass
- a theoretical masspublic static double calculatePeptideMonoMass(AminoAcidSequence aminoAcidSequence, List<PTModification> modifications, double... massCorrections)
aminoAcidSequence
- peptide sequence.modifications
- a list of modifications.massCorrections
- a list of mass corrections.public static double calculatePeptideAvgMass(AminoAcidSequence aminoAcidSequence, List<PTModification> modifications, double... massCorrections)
aminoAcidSequence
- peptide sequence.modifications
- a list of modifications.massCorrections
- a list of mass corrections.public static double calculateMonoMass(Mass... masses)
masses
- a array of input masses.public static double calculateAvgMass(Mass... masses)
masses
- a array of input masses.public static void main(String[] args)
Copyright © 2015 European Bioinformatics Institute. All Rights Reserved.