Changeset 4546


Ignore:
Timestamp:
Feb 27, 2014, 9:35:31 AM (9 years ago)
Author:
Fredrik Levander
Message:

Writing theoretical m/z for matched ions in library export.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/contrib/SpectrumLibraryExport/src/satoshi/LibraryExportPlugin.java

    r4545 r4546  
    10911091            output2.write(fourDecimals.format(mzs.get(l)) + "\t"
    10921092                + ints.get(l) + "\t\"");
    1093             String s = PeptideUtil.matchedIonsAsString(PeptideUtil.matchingIons(ions, mzs.get(l), mzTolerance));
    1094             if (s!=null && s.length()>0)
     1093            List<Ion<PeptideFragment>> matchedIons = PeptideUtil.matchingIons(ions, mzs.get(l), mzTolerance);
     1094            if (!matchedIons.isEmpty())
    10951095            {
    1096               output2.write(s+"\"\n");
     1096              double mzTheoretical = matchedIons.get(0).mz();
     1097              String s = PeptideUtil.matchedIonsAsString(matchedIons);             
     1098              output2.write(fourDecimals.format(mzTheoretical) + "\t"
     1099                  + ints.get(l) + "\t\""+s+"\"\n");
    10971100            }
    10981101            else
    10991102            {
    1100               output2.write("?\"\n");
     1103              output2.write(fourDecimals.format(mzs.get(l)) + "\t"
     1104                  + ints.get(l) + "\t\"?\"\n");
    11011105            }
    11021106          }
Note: See TracChangeset for help on using the changeset viewer.