Protein–ligand binding affinity support #9
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?
Binding affinity data — Ki, Kd, IC50, EC50 — is among the most valuable data types for ML in drug discovery. But unlike everything else in pcdigitizer, binding affinities are relational. They describe an interaction between a ligand and a protein target. A single compound identifier isn't enough; you need a target identifier too.
The current architecture assumes one compound per annotation entry. Binding affinity breaks that assumption, which means this issue may require changes to the data model itself.
Scope
Exploration and design
Use
PubChemAPI.get_annotations()to find the exact heading names for binding affinity data. Fetch several pages and document the response structure, paying close attention to how target (protein) information is represented. Then propose an output schema in a comment on this issue.The schema comment should answer three questions. Does the
AnnotationEntrycontain a protein accession or gene symbol, or only a compound? Do we need a different PubChem endpoint (E.g., BioAssay) to retrieve the protein target? Should the output include bothcidandtarget_accession/target_genecolumns?implementation
Build the processor. Likely output schema:
cid,sid,pclid,target_name(String),target_accession(String, nullable),target_gene_symbol(String, nullable),affinity_type(String),affinity_value(Float64),affinity_unit(String),comment(String, nullable).If this requires extending
PubChemAPIto hit additional endpoints, that new endpoint code should be a separate PR merged first.Definition of done
Phase 1: a design document with real data samples and a proposed schema, reviewed by the maintainer. Phase 2: a working processor with tests.