Benchling-Open-Source/allotropy

SoftmaxPro ValueError

Closed this issue · 4 comments

I'm new to the Allotrope Data Format so if any of this info is covered there, would love to learn more about how it's handled.

Context: the SoftmaxPro has a feature call PathCheck that allows the instrument to measure the liquid level in each well and normalize the measured Optical Density to a 1 cm path length (to compare to a cuvette method). This feature is necessary in labs that have multiple ways of collecting Optical Density measurements, such as ours. It works by measuring the absorbance peak of water in the near infrared region to calculate the optical path length.

Problem: If there is no liquid or the instrument cannot accurately measure the path of a well, the output result is: "Path?". When running softmax_pro_structure, a ValueError is thrown since the parser expects a float value.

The easy fix is importing the try_float method from allotropy.parsers.utils.values and inserting it into line 337 (well_data[well].processed_data.append(float(value)) becomes well_data[well].processed_data.append(try_float(value))) however it might be worth making a note somehow of the wavelength error - could help automation teams track down liquid pipetting errors in the future. Additionally, it might be worth including pathcheck as metadata in the results so companies can keep track of OD data by equipment and measurement type.

@corona779 it's a good point about capturing this as metadata field since many plate readers have a "path length correction" feature.

The Allotrope Ontology has a term for cell path length to capture the actual length, but not a term to capture whether a path length correction is applied.

If implemented, this part of the device control document and would likely be something like: path length correction enabled setting, as it would be analogous a term like automatic cycle threshold enabled setting that is used in the qPCR model.

@alejandro-salgado could you look at suggested edit? I don't believe any of our test data has examples where a string appears in as the absorbance value, but since it can occur this might make the adapter more robust.

@LimulusPolyphemus @alejandro-salgado if it helps I can provide y'all with an output file that contains this error.

@corona779 if you could that would be super helpful.