DOI-USGS / rt-quic-db

A database application for RT-QuIC data with tools for visualization and analysis
https://DOI-USGS.github.io/rt-quic-db/
The Unlicense
1 stars 0 forks source link

View Assay relies on well name formatting to parse into rows and columns #130

Open nathanbollig opened 2 years ago

nathanbollig commented 2 years ago

app_server.py > get_viz_data(): The dimensions of the grid shown in View Assay (with all wells selected) appears to come from the rows and cols returned by wcModel.get_assay_viz_dataGrid(assay_id). Note these are packaged into a json object retrieved at the front end via a .getJSON call.

get_assay_viz_dataGrid() parses the well names into variables like

rows = ['A', 'B', ..., 'H']
cols = ['01', '02', ..., '12]
well_conditions = [[], [], ..., []]
len(well_conditions) = len(rows)
len(well_conditions[0]) = len(cols)
len(well_conditions[0][0]) = number of fluorescence timepoints

This logic depends on the well names and therefore is less general than the two-option handling of well names proposed for Upload Assay in #123.

nathanbollig commented 2 years ago

An assumption is being made at lines 222 and 224 of model.py that the first character of the well name will uniquely identify rows, and the remaining characters will uniquely identify columns.

image

nbollig-usgs commented 1 year ago

If well names are not named according to this assumption, then we should validate that the total number of wells is rows*cols as specified in the plate template. There needs to be some kind of control input to determine if the ordering of wells in the file is row-wise (row 1, then row 2, etc.) or column-wise. This is referred to as "Option 2" in #123.