Models

Database models for bio2bel_drugbank.

class bio2bel_drugbank.models.Base(**kwargs)

The most base type

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class bio2bel_drugbank.models.Type(**kwargs)[source]

Represents the type of a drug - either small molecule or biologic.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class bio2bel_drugbank.models.Drug(**kwargs)[source]

Represents a drug.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

as_bel() → pybel.dsl.node_classes.Abundance[source]

Get this drug as a PyBEL abundance identified by its DrugBank identifier.

as_inchi_bel() → pybel.dsl.node_classes.Abundance[source]

Get this drug as a PyBEL abundance identified by InChI.

as_inchikey_bel() → pybel.dsl.node_classes.Abundance[source]

Get this drug as a PyBEL abundance identified by InChI-key.

as_cas_bel() → pybel.dsl.node_classes.Abundance[source]

Get this drug as a PyBEL abundance identified by its CAS identifier.

class bio2bel_drugbank.models.DrugXref(**kwargs)[source]

Represents a drug’s cross-reference to another database.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class bio2bel_drugbank.models.Patent(**kwargs)[source]

Represents a patent.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

google_url

Return the Google Patents URL of this patent.

class bio2bel_drugbank.models.Alias(**kwargs)[source]

Represents an alias of a drug.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class bio2bel_drugbank.models.AtcCode(**kwargs)[source]

Represents an ATC code of a drug.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class bio2bel_drugbank.models.Group(**kwargs)[source]

Represents a drug group.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class bio2bel_drugbank.models.Category(**kwargs)[source]

Represents a drug category.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class bio2bel_drugbank.models.Species(**kwargs)[source]

Represents a species.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class bio2bel_drugbank.models.Protein(**kwargs)[source]

Represents a protein.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

as_bel() → pybel.dsl.node_classes.Protein[source]

Serialize as a PyBEL node with the UniProt namespace.

class bio2bel_drugbank.models.Action(**kwargs)[source]

Represents the action a drug takes in a drug-protein interaction.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class bio2bel_drugbank.models.Article(**kwargs)[source]

Represents an article in PubMed.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class bio2bel_drugbank.models.DrugProteinInteraction(**kwargs)[source]

Represents an interaction between a drug and a protein.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

add_to_graph(graph: pybel.struct.graph.BELGraph) → Set[str][source]

Add this interaction to the graph.

Returns:A set of the hashes of the edges that were added