getMolecularFm {DRviaSPCN} | R Documentation |
Plot chemical molecular formula of drugs
Description
The function "getMolecularFm" outputs the chemical molecular formula of a drug or compound . The results can be visualized by the "plot" function.
Usage
getMolecularFm(drugid = NULL, drugname = NULL,sdfSET,main = "", sub = "")
Arguments
drugid |
A character string of DrugBank ID. |
drugname |
A character string of drug name. |
sdfSET |
Sdf data of drug structure. |
main |
An overall title for the chemical structure graph. |
sub |
A sub title for the chemical structure graph. |
Value
Chemical molecular formula of the drug or compound.
Examples
#"sdfSET" has been uploaded to the
#github repository.Users can download and install through "install_github"
#function and set parameter url="hanjunwei-lab/DRviaSPCNData".
#After installing and loading package "DRviaSPCNData",
#users can use the following command to get the data.
# Obtain molecular formula and visualize it.
#Get the sdf data of drug structure from DRviaSPCNData package
#library("Chemminer")
#sdf<-GetData('sdfSET')
#Run the function
#Mole_formula<-getMolecularFm(drugname ="methotrexate",sdfSET=sdf)
#plot(Mole_formula)
[Package DRviaSPCN version 0.1.4 Index]