Learn R Programming

BioMedR (version 1.2.1)

getDrug: Retrieve Drug Molecules in MOL and SMILES Format from Databases

Description

Retrieve Drug Molecules in MOL and SMILES Format from Databases(BMgetDrug)

Retrieve Drug Molecules in MOL and Smi Format from the PubChem Database(BMgetDrug...PubChem)

Retrieve Drug Molecules in MOL and Smi Format from the ChEMBL Database(BMgetDrug...ChEMBL)

Retrieve Drug Molecules in InChI Format from the CAS Database(BMDrugMolCAS)

Retrieve Drug Molecules in MOL and Smi Format from the KEGG Database(BMgetDrug...KEGG)

Retrieve Drug Molecules in MOL and Smi Format from the DrugBank Database(BMgetDrug...DrugBank)

Usage

BMgetDrug(id, from = c("pubchem", "chembl", "cas", "kegg", "drugbank"),
  type = c("mol", "smile"), parallel = 5)

BMgetDrugMolPubChem(id, parallel = 5)

BMgetDrugSmiPubChem(id, parallel = 5)

BMgetDrugMolChEMBL(id, parallel = 5)

BMgetDrugSmiChEMBL(id, parallel = 5)

BMDrugMolCAS(id, parallel = 5)

BMgetDrugMolKEGG(id, parallel = 5)

BMgetDrugSmiKEGG(id, parallel = 5)

BMgetDrugMolDrugBank(id, parallel = 5)

BMgetDrugSmiDrugBank(id, parallel = 5)

Arguments

id

A character vector, as the drug ID(s).

from

The database, one of 'pubchem', 'chembl', 'cas', 'kegg', 'drugbank'.

type

The returned molecule format, mol or smile.

parallel

An integer, the parallel parameter, indicates how many process the user would like to use for retrieving the data (using RCurl), default is 5. For regular cases, we recommend a number less than 20.

Value

A length of id character vector, each element containing the corresponding drug molecule.

Details

This function retrieves drug molecules in MOL and SMILES format from five databases.

This function retrieves drug molecules in MOL format from the PubChem database.

This function retrieves drug molecules in MOL format from the ChEMBL database.

This function retrieves drug molecules in InChI format from the CAS database. CAS database only provides InChI data, so here we return the molecule in InChI format, users could convert them to SMILES format using Open Babel (http://openbabel.org/) or other third-party tools.

This function retrieves drug molecules in MOL format from the KEGG database.

This function retrieves drug molecules in MOL format from the DrugBank database.

See Also

See BMgetProt for retrieving protein sequences from three databases.

Examples

Run this code
# NOT RUN {
# BMgetDrug
id = c('DB00859', 'DB00860')
BMgetDrug(id, 'drugbank', 'smile')
# }
# NOT RUN {
# }
# NOT RUN {
# BMgetDrugMolPubChem
id = c('7847562', '7847563')  # Penicillamine
BMgetDrugMolPubChem(id)
# }
# NOT RUN {
# }
# NOT RUN {
# BMgetDrugsmiPubChem
id = c('7847562', '7847563')  # Penicillamine
BMgetDrugSmiPubChem(id)
# }
# NOT RUN {
# }
# NOT RUN {
# BMgetDrugMolChEMBL
id = 'CHEMBL1430'  # Penicillamine
BMgetDrugMolChEMBL(id)
# }
# NOT RUN {
# }
# NOT RUN {
# BMgetDrugSmiChEMBL
id = 'CHEMBL1430'  # Penicillamine
BMgetDrugSmiChEMBL(id)
# }
# NOT RUN {
# }
# NOT RUN {
# BMDrugMolCAS
id = '52-67-5'  # Penicillamine
BMDrugMolCAS(id)
# }
# NOT RUN {
# }
# NOT RUN {
# BMgetDrugMolKEGG
id = 'D00496'  # Penicillamine
BMgetDrugMolKEGG(id)
# }
# NOT RUN {
# }
# NOT RUN {
# BMgetDrugSmiKEGG
id = 'D00496'  # Penicillamine
BMgetDrugSmiKEGG(id)
# }
# NOT RUN {
# }
# NOT RUN {
# BMgetDrugMolDrugBank
id = 'DB00859'  # Penicillamine
BMgetDrugMolDrugBank(id)
# }
# NOT RUN {
# }
# NOT RUN {
# BMgetDrugSmiDrugBank
id = 'DB00859'  # Penicillamine
BMgetDrugSmiDrugBank(id)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab