Fix to prevent pattern calculation with illegal characters
@@ -69,7 +69,7 @@ public class IsotopePatternCalculator implements MZmineModule {
double mergeWidth, int charge, PolarityType polarity, boolean storeFormula) {
IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
-
+ molecularFormula = molecularFormula.replace(" ", "");
IMolecularFormula cdkFormula =
MolecularFormulaManipulator.getMolecularFormula(molecularFormula, builder);
@@ -90,7 +90,6 @@ public class IsotopePatternCalculator implements MZmineModule {
public static IsotopePattern calculateIsotopePattern(IMolecularFormula cdkFormula,
double minAbundance, double mergeWidth, int charge, PolarityType polarity,
boolean storeFormula) {
-
// TODO: check if the formula is not too big (>100 of a single atom?).
// if so, just cancel the prediction
