Search in sources :

Example 1 with IonSignificance

use of net.sf.mzmine.modules.peaklistmethods.identification.mascot.data.IonSignificance in project mzmine2 by mzmine.

the class MascotParserUtils method parseIonSeriesSignificance.

/*
   * ion series
   * 
   * [Mascot 2.2] 0 a 1 place holder 2 a++
   * 
   * 3 b 4 place holder 5 b++
   * 
   * 6 y 7 place holder 8 y++
   * 
   * 9 c 10 c++ 11 x 12 x++ 13 z 14 z++ 15 z+H 16 z+H++ 17 z+2H 18 z+2H++
   * 
   * 0 0 0 0 0 0 0 0 0 0 1 0 0 2 0 0 2 0 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
   */
public static PeptideIonSerie parseIonSeriesSignificance(String seriesIonString) {
    PeptideIonSerie peptideIonSeries = new PeptideIonSerie();
    IonSignificance significance = IonSignificance.NOT_Sign_NOT_Scoring;
    for (int i = 0; i < seriesIonString.length(); i++) {
        significance = IonSignificance.NOT_Sign_NOT_Scoring;
        switch(seriesIonString.charAt(i)) {
            case '1':
                significance = IonSignificance.NOT_Sign_NOT_Scoring;
                break;
            case '2':
                significance = IonSignificance.NOT_Sign_NOT_Scoring;
                break;
        }
        switch(i) {
            case // a-ion
            0:
                peptideIonSeries.addSerie(SerieIonType.A_SERIES, significance);
                break;
            case // a-double-ion
            2:
                peptideIonSeries.addSerie(SerieIonType.A_DOUBLE_SERIES, significance);
                break;
            case // b-ion
            3:
                peptideIonSeries.addSerie(SerieIonType.B_SERIES, significance);
                break;
            case // b-double-ion
            5:
                peptideIonSeries.addSerie(SerieIonType.B_DOUBLE_SERIES, significance);
                break;
            case // y-ion
            6:
                peptideIonSeries.addSerie(SerieIonType.Y_SERIES, significance);
                break;
            case // y-ion
            8:
                peptideIonSeries.addSerie(SerieIonType.Y_DOUBLE_SERIES, significance);
                break;
            case // c-ion
            9:
                peptideIonSeries.addSerie(SerieIonType.C_SERIES, significance);
                break;
            case // c-double-ion
            10:
                peptideIonSeries.addSerie(SerieIonType.C_DOUBLE_SERIES, significance);
                break;
            case // x-ion
            11:
                peptideIonSeries.addSerie(SerieIonType.X_SERIES, significance);
                break;
            case // x-double-ion
            12:
                peptideIonSeries.addSerie(SerieIonType.X_DOUBLE_SERIES, significance);
                break;
            case // z-ion
            13:
                peptideIonSeries.addSerie(SerieIonType.Z_SERIES, significance);
                break;
            case // z-double-ion
            14:
                peptideIonSeries.addSerie(SerieIonType.Z_DOUBLE_SERIES, significance);
                break;
            case // zh-ion
            15:
                peptideIonSeries.addSerie(SerieIonType.ZH_SERIES, significance);
                break;
            case // zh-double-ion
            16:
                peptideIonSeries.addSerie(SerieIonType.ZH_DOUBLE_SERIES, significance);
                break;
            case // zhh-ion
            17:
                peptideIonSeries.addSerie(SerieIonType.ZHH_SERIES, significance);
                break;
            case // zhh-double-ion
            18:
                peptideIonSeries.addSerie(SerieIonType.ZHH_DOUBLE_SERIES, significance);
                break;
            default:
                break;
        }
    }
    return peptideIonSeries;
}
Also used : PeptideIonSerie(net.sf.mzmine.modules.peaklistmethods.identification.mascot.data.PeptideIonSerie) IonSignificance(net.sf.mzmine.modules.peaklistmethods.identification.mascot.data.IonSignificance) DataPoint(net.sf.mzmine.datamodel.DataPoint) SimpleDataPoint(net.sf.mzmine.datamodel.impl.SimpleDataPoint)

Aggregations

DataPoint (net.sf.mzmine.datamodel.DataPoint)1 SimpleDataPoint (net.sf.mzmine.datamodel.impl.SimpleDataPoint)1 IonSignificance (net.sf.mzmine.modules.peaklistmethods.identification.mascot.data.IonSignificance)1 PeptideIonSerie (net.sf.mzmine.modules.peaklistmethods.identification.mascot.data.PeptideIonSerie)1