Changeset 4548


Ignore:
Timestamp:
Feb 28, 2014, 2:48:40 PM (9 years ago)
Author:
Fredrik Levander
Message:

Catching unexpected modifications in msp library export.

File:
1 edited

Legend:

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

    r4547 r4548  
    10011001          {
    10021002            int pos = om.getPosition();
    1003             ModifiedAminoAcid maa = new ModifiedAminoAcid(pep.aminoAcids[pos],Modifier.parseMolecule(om.getDiffFormula()));
    1004             pep.aminoAcids[pos]=maa;
     1003            if (om.getDiffFormula()!=null)
     1004            {
     1005              ModifiedAminoAcid maa = new ModifiedAminoAcid(pep.aminoAcids[pos],Modifier.parseMolecule(om.getDiffFormula()));
     1006              pep.aminoAcids[pos]=maa;
     1007            }
     1008            else
     1009            {
     1010              output2.write("WARNING! Couldn't calculate modification properly for peptide:"+om.getName()+"\n");
     1011            }
    10051012          }
    10061013          List<Ion<PeptideFragment>> ions = PeptideUtil.possibleYAndBIons(pep, 2);
Note: See TracChangeset for help on using the changeset viewer.