This module provides an API and processor for DrugBank content. It builds on the XML-formatted data schema of DrugBank and expects the XML file to be available locally. The full DrugBank download can be obtained at: https://www.drugbank.ca/releases/latest. Once the XML file is decompressed, it can be processed using the process_xml function.
Alternatively, the latest DrugBank data can be automatically loaded via
drugbank_downloader with the following code after doing
pip install drugbank_downloader bioversions:
import pickle import indra.sources.drugbank processor = indra.sources.drugbank.get_drugbank_processor() with open('drugbank_indra_statements.pkl', 'wb') as file: pickle.dump(processor.statements, file, protocol=pickle.HIGHEST_PROTOCOL)
DrugBank API (
Return a processor by extracting Statement from DrugBank XML.
et (xml.etree.ElementTree) – An ElementTree loaded from the DrugBank XML file to process.
A DrugbankProcessor instance which contains a list of INDRA Statements in its statements attribute that were extracted from the given ElementTree.
- Return type
process_from_web(username=None, password=None, version=None, prefix=None)¶
Get a processor using
A DrugbankProcessor instance which contains a list of INDRA Statements in its statements attribute that were extracted from the given DrugBank version
- Return type
Return a processor by extracting Statements from DrugBank XML.
DrugBank Processor (
Processor to extract INDRA Statements from DrugBank content.
The processor assumes that an ElementTree is available which it then traverses to find drug-target information.
xml_tree (xml.etree.ElementTree.ElementTree) – An XML ElementTree representing DrugBank XML content.
A list of INDRA Statements that were extracted from DrugBank content.
list of indra.statements.Statement