Closed gt8mar closed 4 years ago
I've isolated the offender -- it's well E5 in that data. Specifically, the spot detection must be failing, resulting in "None" being written to the 96-well "od_well" array (it would also be "None" in Int-array and BG-array, if it got that far).
I think the solution here touches on other issues too -- we should report failed spots and handle them gracefully here. There's another slight issue here too: the "od_well" array is an 8x12 array (96-wells) of objects
. It's initialized as such in metadata.py:
def _calc_empty_plate_const():
constants.WELL_BG_ARRAY = np.empty((8, 12), dtype=object)
constants.WELL_INT_ARRAY = np.empty((8, 12), dtype=object)
constants.WELL_OD_ARRAY = np.empty((8, 12), dtype=object)
instead we could use:
def _calc_empty_plate_const():
constants.WELL_BG_ARRAY = np.zeros((8, 12, row, col), dtype='float64')
constants.WELL_INT_ARRAY = np.zeros((8, 12, row, col), dtype='float64')
constants.WELL_OD_ARRAY = np.zeros((8, 12, row, col), dtype='float64')
Of course this needs to be tested. I'll start a new PR for that.
Ok there are several ways to fix this but. One way that is currently in branch nonetype_well_registration
is to check for None types and assign a value instead (-999 in this case)
The other problem that arose is, may1 and may2 data have antigens with very long names that causes excel errors. Excel complains when opening saying the data is corrupted, then attempts to repair it.
This second problem is not fixed.
Problem is that spot detection failure causes the program to skip the entire well -- so no OD-well is written. There is now a check for Nonetype at the report-writing time.
fixed in PR #70
Describe the bug See screenshot below. The bug is caused because there is nothing in the antigen_position array. In the metadata, there are "empty" and "Blank" entries where there aren't antigens. Perhaps these should be " " or "None"?
The function write_antigen_report() appears to have code to ignore the previous two entries, but not "empty" or "blank".
To Reproduce Steps to reproduce the behavior:
Expected behavior Error with screenshot below:
Screenshots
Operating environment (please complete the following information):
Additional context metadata file: "/ELISAarrayReader/images_cuttlefish/2020-05-02-13-49-02-COVID_May2_JVassay_FcIgGplate_images/rotated/pysero_output_data_metadata.xlsx"