quanted / hem_app

django app for the human exposure model

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

by product - hair color and nail polish plots not appearing

kdionisio opened this issue · comments

When user selects 'hair color' or 'nail polish' in a 'by product' search, the plot which appears is blank, though the correct chemicals appear in a legend over the blank plot. Note hair color is in the DB as runparams_id=8, and nail polish is runparams_id=9

Hair color (runparams_id=8):
Error was a result of all records in the database for chemical 64-17-5 (DTXSID9020584, chemical_id=40648) and chemical 78-70-6 (DTXSID7025502, chemical_id=47907) having a zero dose. Resolved by removing records associated with these chemicals from the dose table, but in future will need to create exception for plotting when all records for a chemical have zero dose.
Removed records with:

DELETE FROM dev_hem_dave.hem_app_dose WHERE runparams_id=8 AND chemical_id=47907;
DELETE FROM dev_hem_dave.hem_app_dose WHERE runparams_id=8 AND chemical_id=40648;

Each command above deleted 73528 records from dose table.
Hair color plot now working.

Nail polish (runparams_id=9):
Error was a result of all records in the database for chemical 138-86-3 (DTXSID2029612, chemical_id=5618) and chemical 78-70-6 (DTXSID7025502, chemical_id=47907) having a zero dose. Resolved by removing records associated with these chemicals from the dose table. Removed records with:

DELETE FROM dev_hem_dave.hem_app_dose WHERE runparams_id=9 AND chemical_id=5618;
DELETE FROM dev_hem_dave.hem_app_dose WHERE runparams_id=9 AND chemical_id=47907;

Each command above deleted 295568 records from the dose table.
Nail polish plot now working.