Princeton-LSI-ResearchComputing / tracebase

Mouse Metabolite Tracing Data Repository for the Rabinowitz Lab
MIT License
4 stars 1 forks source link

Add formula validation to PeakGroup and Compound #68

Open lparsons opened 3 years ago

lparsons commented 3 years ago

Validation for PeakGroup.formula and Compound.formula to ensure they are:

  1. not empty
  2. can be parsed by chempy.Substance.from_formula

_Discussion originally posted by @lparsons in https://github.com/Princeton-LSI-ResearchComputing/tracebase/pull/55#discussion_r626810803_

jcmatese commented 3 years ago

Just adding a note here which came out of data loading testing of PR #55 , in case it affects validation decisions/strategies in this issue

PeakGroup formulas might get set as nan https://github.com/Princeton-LSI-ResearchComputing/tracebase/pull/55#discussion_r627518449