Skip to content

Commit

Permalink
fixed bug #16
Browse files Browse the repository at this point in the history
  • Loading branch information
dominik-kopczynski authored and nilshoffmann committed Aug 30, 2021
1 parent ec91497 commit 7458c1f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions LipidCreator/Lipid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -306,13 +306,13 @@ public static void computeFragmentData(DataTable transitionList, PrecursorData p
string adduct = LipidCreator.computeAdductFormula(null, precursorData.precursorAdduct);
if (monitoringType == MonitoringTypes.PRM)
{
lipidRowPrecursor[LipidCreator.COLLISION_ENERGY] = CE.ToString(CultureInfo.InvariantCulture);
lipidRowPrecursor[LipidCreator.COLLISION_ENERGY] = CE >= 0 ? CE.ToString(CultureInfo.InvariantCulture) : "";
}
else if (monitoringType == MonitoringTypes.SRM)
{
double ceValue = collisionEnergyHandler.getApex(instrument, lipidClass, adduct, "precursor");
if (ceValue != -1) ceValue = Math.Max(Math.Min(maxCE, ceValue), minCE);
lipidRowPrecursor[LipidCreator.COLLISION_ENERGY] = ceValue.ToString(CultureInfo.InvariantCulture);
ceValue = Math.Max(Math.Min(maxCE, ceValue), minCE);
lipidRowPrecursor[LipidCreator.COLLISION_ENERGY] = (ceValue >= 0) ? ceValue.ToString(CultureInfo.InvariantCulture) : "";
}
}
}
Expand Down Expand Up @@ -457,13 +457,13 @@ public static void computeFragmentData(DataTable transitionList, PrecursorData p
string adduct = LipidCreator.computeAdductFormula(null, precursorData.precursorAdduct);
if (monitoringType == MonitoringTypes.PRM)
{
lipidRow[LipidCreator.COLLISION_ENERGY] = CE.ToString(CultureInfo.InvariantCulture);
lipidRow[LipidCreator.COLLISION_ENERGY] = CE >= 0 ? CE.ToString(CultureInfo.InvariantCulture) : "";
}
else if (monitoringType == MonitoringTypes.SRM)
{
double ceValue = collisionEnergyHandler.getApex(instrument, lipidClass, adduct, fragName);
if (ceValue != -1) ceValue = Math.Max(Math.Min(maxCE, ceValue), minCE);
lipidRow[LipidCreator.COLLISION_ENERGY] = ceValue.ToString(CultureInfo.InvariantCulture);
ceValue = Math.Max(Math.Min(maxCE, ceValue), minCE);
lipidRow[LipidCreator.COLLISION_ENERGY] = ceValue >= 0 ? ceValue.ToString(CultureInfo.InvariantCulture) : "";
}
}
}
Expand Down

0 comments on commit 7458c1f

Please sign in to comment.