[x] If you've fixed a bug or added code that should be tested, add tests!
[ ] Documentation in docs is updated
Description of changes
Add dgidb for drug annotation
Fix bug and add new functions for lookup object with type drug
The dgidb metadata is saved for enrichment function. A small example:
adata = sc.datasets.pbmc3k_processed()
pt_drug = pt.md.Drug()
pt_drug.annotate(adata, source="dgidb")
pt_enricher = pt.tl.Enrichment()
pt_enricher.score(
adata, targets = pt_drug.dgidb_dict
)
# pt_drug.dgidb_dict saves the target and compunds in a unnested dictionary.
However currently pt.tl.Enrichment.plot_dotplot doesnt accept targets in the unnested format (gives error if an unnested dict is given). I think it makes sense to go with nested dict to filter further categories. For this the user can play with the metadata
I didnt save it into Drug() because there are multiple possible categories to choose including approved, immunotherapy, anti_neoplastic, interaction_type.
Do you probably have any suggestions how to interact with enrichment funtion better?
PR Checklist
docs
is updatedDescription of changes
drug
pt.tl.Enrichment.plot_dotplot
doesnt accept targets in the unnested format (gives error if an unnested dict is given). I think it makes sense to go with nested dict to filter further categories. For this the user can play with the metadataI didnt save it into Drug() because there are multiple possible categories to choose including
approved
,immunotherapy
,anti_neoplastic
,interaction_type
.Do you probably have any suggestions how to interact with enrichment funtion better?
Technical details
Additional context