#########################################################################################
# FUNCTION GET CHEMBLID
# Code Author: Marian Gimeno -- mgimenoc@tecnun.es
# Conceptual Design: Fernando Carazo -- fcarazo@tecnun.es
# Data Developer: Carlos Castilla -- ccastilla.1@tecnun.es
#########################################################################################
getDrugBankID<-function(DrugName){
DrugName<-toupper(DrugName)
load("./singleDrugSynonymsTabulatesDH_IDcreated.RData")
iix<-agrep(DrugName,singleDrugSynonyms$Drug_synonyms, max=3, ignore.case = T)
DB_ID<- singleDrugSynonyms$DB[iix]
if(length(DB_ID>0)){
return(unique(DB_ID))
}
if(length(DB_ID)==0){
stop("No DrugBank ID found")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.