Support Toxicity (LD50 / LC50) #7
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Toxicity data lives under PubChem's
"Toxicity"heading, and it's a different animal from scalar properties. A single entry might read"LD50 Oral - Rat - 5000 mg/kg"or"LC50 (96h) Bluegill Sunfish: 12 mg/L". The values carry an endpoint type (LD50, LC50, NOAEL), a species, a route of administration, and a unit. Delimiters and word orderings vary across depositors.This is hard parsing, but it's also one of the most valuable annotation types for ML-ready chemical datasets.
Scope
Add
TOXICITY = "Toxicity"toAnnotation. Createpcdigitizer/data/toxicity.pywith aToxicityDataprocessor. Output schema:cid,sid,pclid,endpoint(String — "LD50", "LC50", "NOAEL", etc.),value(Float64),unit(String),species(String, nullable),route(String, nullable),comment(String, nullable).Start with LD50 and LC50 and treat other endpoints as follow-up work. A string that can't be parsed should never raise; log a warning and skip, as with pKa.
Because the data is so varied, write a dedicated test file with at least 15–20 hand-picked real examples from PubChem covering different endpoints, species, routes, and units.
Register, export, and test.
Definition of done
Working pipeline for LD50 and LC50 entries. Other endpoints are a stretch goal. Tests pass. Docstrings present.