use of net.sf.mzmine.modules.peaklistmethods.identification.mascot.data.FragmentIon in project mzmine2 by mzmine.
the class PeptideUtils method calculateBions.
/**
* This method calculates fragment ions b.
*/
public static Vector<FragmentIon> calculateBions(double[] peptideMasses, double hydrogenMass) {
Vector<FragmentIon> bIons = new Vector<FragmentIon>();
for (int i = 1; i < peptideMasses.length; i++) {
double bMass = 0.0;
/*
* Sum all the peptides from left until the current position. Finally add 1 extra hydrogen on
* the N-terminal AA if there is no fixed N-terminal modification. A B-ion has no new
* components at its C-terminal end.
*/
for (int j = 0; j < i; j++) {
bMass += peptideMasses[j];
}
bMass = bMass + hydrogenMass;
bIons.add(new FragmentIon(bMass, FragmentIonType.B_ION, i));
}
return bIons;
}
use of net.sf.mzmine.modules.peaklistmethods.identification.mascot.data.FragmentIon in project mzmine2 by mzmine.
the class PeptideUtils method calculateYions.
/**
* This method calculates fragment ions y.
*/
public static Vector<FragmentIon> calculateYions(double[] peptideMasses, double hydrogenMass, double oxygenMass) {
Vector<FragmentIon> yIons = new Vector<FragmentIon>();
double ctermMass = hydrogenMass + oxygenMass;
for (int i = 1; i < peptideMasses.length; i++) {
double yMass = 0.0;
/*
* Sum all the peptides from right until the current position. Finally add 1 extra hydroxyl on
* the C-terminal AA. A Y-ion also has 2 extra Hydrogens on its N-terminal end (NH in peptide
* bond, NH3+ when its free).
*/
for (int j = 0; j < i; j++) {
yMass += peptideMasses[(peptideMasses.length - 1) - j];
}
yMass = yMass + ctermMass + (2 * hydrogenMass);
yIons.add(new FragmentIon(yMass, FragmentIonType.Y_ION, i));
}
return yIons;
}
use of net.sf.mzmine.modules.peaklistmethods.identification.mascot.data.FragmentIon in project mzmine2 by mzmine.
the class PeptideUtils method getIonCoverage.
/**
* Returns the coverage of the ion series.
*
* @param dataPoints
* @param peptide
* @param ionType
* @param intensityThreshold
* @return
*/
public static double getIonCoverage(DataPoint[] dataPoints, Peptide peptide, SerieIonType ionType, double intensityThreshold) {
PeptideFragmentation fragmentation = peptide.getFragmentation();
FragmentIon[] fragmentIons = fragmentation.getFragmentIons(ionType);
PeptideIdentityDataFile peptideDataFile = peptide.getScan().getPeptideDataFile();
double fragmentIonMassErrorTol = peptideDataFile.getFragmentIonMassErrorTolerance();
DataPoint[] matchedDataPoints = getMatchedIons(dataPoints, fragmentIons, fragmentIonMassErrorTol, intensityThreshold);
double ionCoverage = calculateSerieCoverage(matchedDataPoints, fragmentIons);
return ionCoverage;
}
use of net.sf.mzmine.modules.peaklistmethods.identification.mascot.data.FragmentIon in project mzmine2 by mzmine.
the class PeptideUtils method calculateIonsLossNH3.
/**
* Returns Ions minus 'NH3', single and double charge.
*
* @return Vector<FragmentIon> ions - NH3
*/
public static Vector<FragmentIon> calculateIonsLossNH3(FragmentIon[] bIons, double hydrogenMass, double nitrogenMass, int indexFirstIonLossNH3, boolean doubleCharged, FragmentIonType ionType) {
Vector<FragmentIon> bIonsLossH20 = new Vector<FragmentIon>();
double lossMass;
if (doubleCharged)
lossMass = nitrogenMass + (hydrogenMass * 2);
else
lossMass = nitrogenMass + (hydrogenMass * 3);
double mass;
// losses NH3
if (indexFirstIonLossNH3 != bIons.length) {
for (int i = indexFirstIonLossNH3; i < bIons.length; i++) {
// b-ion minus 'NH3'
mass = bIons[i].getMass() - lossMass;
if (doubleCharged)
mass /= 2.0;
bIonsLossH20.add(new FragmentIon(mass, ionType, i + 1));
}
}
return bIonsLossH20;
}
use of net.sf.mzmine.modules.peaklistmethods.identification.mascot.data.FragmentIon in project mzmine2 by mzmine.
the class PeptideUtils method calculateCions.
/**
* Return b-ions plus 'NH3' (c-ions).
*
* @return Vector<FragmentIon> cIons.
*/
public static Vector<FragmentIon> calculateCions(FragmentIon[] bIons, double nitrogenMass, double hydrogenMass) {
Vector<FragmentIon> cIons = new Vector<FragmentIon>();
double mass;
double NH3 = nitrogenMass + (hydrogenMass * 3);
for (int i = 0; i < bIons.length; i++) {
// b-ion plus 'NH3'
mass = bIons[i].getMass() + NH3;
cIons.add(new FragmentIon(mass, FragmentIonType.C_ION, (i + 1)));
}
return cIons;
}
Aggregations