Manager¶
Defines the Bio2BEL DrugBank manager.
-
class
bio2bel_drugbank.manager.
Manager
(*args, **kwargs)[source]¶ Manager for Bio2BEL DrugBank.
-
namespace_model
¶ alias of
bio2bel_drugbank.models.Drug
-
get_group_by_name
(name: str) → Optional[bio2bel_drugbank.models.Group][source]¶ Get a Group by name.
-
get_or_create_group
(name: str) → bio2bel_drugbank.models.Group[source]¶ Get or create a Group by name.
-
get_species_by_name
(name: str) → Optional[bio2bel_drugbank.models.Species][source]¶ Get a Species by name.
-
get_or_create_species
(name: str) → bio2bel_drugbank.models.Species[source]¶ Get or create a Species by name.
-
get_category_by_name
(name: str) → Optional[bio2bel_drugbank.models.Category][source]¶ Get a Category by name.
-
get_or_create_category
(name: str, **kwargs) → bio2bel_drugbank.models.Category[source]¶ Get or create a Category by name.
-
get_or_create_patent
(country: str, patent_id: str, **kwargs) → bio2bel_drugbank.models.Patent[source]¶ Get or creates a Patent.
-
populate
(url: Optional[str] = None) → None[source]¶ Populate DrugBank.
Parameters: url – Path to the DrugBank XML
-
count_drugs_categories
() → int[source]¶ Count the number of drug-category relations in the database.
-
list_drug_protein_interactions
() → List[bio2bel_drugbank.models.DrugProteinInteraction][source]¶ List drug-protein interactions.
-
enrich_targets
(graph: pybel.struct.graph.BELGraph) → None[source]¶ Enrich the protein targets in the graph with Drug-Protein interactions from DrugBank.
-
lookup_drug
(node: pybel.dsl.node_classes.BaseEntity) → Optional[bio2bel_drugbank.models.Drug][source]¶ Try and look up a drug.
-
enrich_drug_inchi
(graph: pybel.struct.graph.BELGraph) → None[source]¶ Enrich drugs in the graph with their InChI equivalent nodes.
-
enrich_drug_equivalences
(graph: pybel.struct.graph.BELGraph) → None[source]¶ Enrich drugs in the graph with their equivalent nodes.
-
enrich_drugs
(graph: pybel.struct.graph.BELGraph) → None[source]¶ Enrich drugs in the graph with their targets.
-
get_hgnc_id_to_drugs
() → Dict[str, List[str]][source]¶ Get a dictionary of HGNC identifiers (not prepended with HGNC:) to list of drug names.
-
get_drug_to_hgnc_ids
(cache=True, recalculate=False) → Dict[str, List[str]][source]¶ Get a dictionary of drug names to lists HGNC identifiers (not prepended with HGNC:).
-