use of net.sf.mzmine.modules.peaklistmethods.identification.mascot.data.FragmentIon in project mzmine2 by mzmine.
the class PeptideUtils method calculatePrecursorIons.
/**
* Returns precursor ions , minus 'NH3' and minus H2O.
*
* @return Vector<FragmentIon> precursorIons
*/
public static FragmentIon[] calculatePrecursorIons(double precursorMass, int charge, double hydrogenMass, double oxygenMass, double nitrogenMass) {
Vector<FragmentIon> precursorIons = new Vector<FragmentIon>();
double H2O = (hydrogenMass) * 2 + oxygenMass;
double NH3 = nitrogenMass + (hydrogenMass * 3);
if (precursorMass != 0.0) {
precursorIons.add(new FragmentIon(precursorMass, FragmentIonType.PRECURSOR, 0));
double mass = precursorMass - (H2O / charge);
precursorIons.add(new FragmentIon(mass, FragmentIonType.PRECURSOR_H2O, 0));
mass = precursorMass - (NH3 / charge);
precursorIons.add(new FragmentIon(mass, FragmentIonType.PRECURSOR_NH3, 0));
}
return precursorIons.toArray(new FragmentIon[0]);
}
use of net.sf.mzmine.modules.peaklistmethods.identification.mascot.data.FragmentIon in project mzmine2 by mzmine.
the class PeptideUtils method calculateZHions.
/**
* Return z-ions plus 'H' (zh-ions).
*
* @return Vector<FragmentIon> zhIons.
*/
public static Vector<FragmentIon> calculateZHions(FragmentIon[] zIons, double hydrogenMass) {
Vector<FragmentIon> zhIons = new Vector<FragmentIon>();
double mass;
for (int i = 0; i < zIons.length; i++) {
// b-ion minus 'CO' plus 'H2'
mass = zIons[i].getMass() + hydrogenMass;
zhIons.add(new FragmentIon(mass, FragmentIonType.ZH_ION, (i + 1)));
}
return zhIons;
}
use of net.sf.mzmine.modules.peaklistmethods.identification.mascot.data.FragmentIon in project mzmine2 by mzmine.
the class PeptideUtils method calculateZHHions.
/**
* Return z-ions plus 'H2' (zhh-ions).
*
* @return Vector<FragmentIon> zhhIons.
*/
public static Vector<FragmentIon> calculateZHHions(FragmentIon[] zIons, double hydrogenMass) {
Vector<FragmentIon> zhhIons = new Vector<FragmentIon>();
double mass;
for (int i = 0; i < zIons.length; i++) {
// z-ion plus 'H2'
mass = zIons[i].getMass() + (hydrogenMass * 2);
zhhIons.add(new FragmentIon(mass, FragmentIonType.ZHH_ION, (i + 1)));
}
return zhhIons;
}
use of net.sf.mzmine.modules.peaklistmethods.identification.mascot.data.FragmentIon in project mzmine2 by mzmine.
the class PeptideUtils method calculateIonsLossH2O.
/**
* Returns Ions minus 'H2O', single and double charge.
*
* @return Vector<FragmentIon> ions - H2O
*/
public static Vector<FragmentIon> calculateIonsLossH2O(FragmentIon[] bIons, double hydrogenMass, double oxygenMass, int indexFirstIonLossH2O, boolean doubleCharged, FragmentIonType ionType) {
Vector<FragmentIon> bIonsLossH20 = new Vector<FragmentIon>();
double lossMass;
if (doubleCharged)
lossMass = hydrogenMass + oxygenMass;
else
lossMass = (hydrogenMass * 2) + oxygenMass;
double mass;
// Verify position of fist aa who can loose H2O
if (indexFirstIonLossH2O != bIons.length) {
for (int i = indexFirstIonLossH2O; i < bIons.length; i++) {
// b-ion minus 'H2O'
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 calculateDoubleChargedIons.
/**
* Returns all double charged ions.
*
* @return Vector<FragmentIon> doubleChargedIons
*/
public static Vector<FragmentIon> calculateDoubleChargedIons(FragmentIon[] bIons, double hydrogenMass, FragmentIonType ionType) {
Vector<FragmentIon> bDoubleIons = new Vector<FragmentIon>();
double mass;
for (int i = 0; i < bIons.length; i++) {
// b-ion plus 'H' over a double charge
mass = (bIons[i].getMass() + hydrogenMass) / 2.0;
bDoubleIons.add(new FragmentIon(mass, ionType, i + 1));
}
return bDoubleIons;
}
Aggregations