| Type: | Package | 
| Title: | Predict Drug Functional Similarity to Drug Repurposing | 
| Version: | 0.1.2 | 
| Maintainer: | Junwei Han <hanjunwei1981@163.com> | 
| Description: | A systematic biology tool was developed to repurpose drugs via a drug-drug functional similarity network. 'DrugSim2DR' first predict drug-drug functional similarity in the context of specific disease, and then using the similarity constructed a weighted drug similarity network. Finally, it used a network propagation algorithm on the network to identify drugs with significant target abnormalities as candidate drugs. | 
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] | 
| Encoding: | UTF-8 | 
| LazyData: | true | 
| RoxygenNote: | 7.3.2 | 
| Imports: | igraph, stats, pheatmap, tidyr, reshape2, fastmatch | 
| Suggests: | knitr, rmarkdown | 
| VignetteBuilder: | knitr | 
| Depends: | R (≥ 3.6) | 
| NeedsCompilation: | no | 
| Packaged: | 2025-10-28 02:57:05 UTC; Nek | 
| Author: | Junwei Han [aut, cre, cph], Ji Li [aut], Jiashuo Wu [aut] | 
| Repository: | CRAN | 
| Date/Publication: | 2025-10-28 06:10:46 UTC | 
datasummary: Custom Data Summaries
Description
Easily generate custom data frame summaries
Author(s)
Maintainer: Junwei Han hanjunwei1981@163.com [copyright holder]
Authors:
- Ji Li 
- Jiashuo Wu 
CalDEscore
Description
Function "CalDEscore" uses gene expression to calculate differential expression level.
Usage
CalDEscore(exp, Label)
Arguments
| exp | A gene expression profile of interest (rows are genes, columns are samples). | 
| Label | A character vector consist of "0" and "1" which represent sample class in the gene expression profile. "0" means normal sample and "1" means disease sample. | 
Value
A matrix with one column of zscore.
Examples
# Obtain the example data
GEP<-Gettest("GEP")
label<-Gettest("label")
# Run the function
DEscore<-CalDEscore(GEP,label)
DrugReposition
Description
The function "DrugReposition" is used in drug repositioning by calculating the eigenvector centrality of drugs.
Usage
DrugReposition(DE,nperm = 2,r = 0.9,p = 10^-10)
Arguments
| DE | A matrix with one column of zscore. | 
| nperm | Number of random permutations (default: 2). | 
| r | Restart the probability of the random-walk algorithm (default: 0.9). | 
| p | For each node, if the difference in centrality score between iterations changes less than this value, the algorithm considers the calculation complete (default: 10^-10). | 
Value
A dataframe with seven columns those are drugbankid, centralscore, p.value,fdr,number of targets, drug targets,drugname.
Examples
library("igraph")
# Obtain the example data
GEP<-Gettest("GEP")
label<-Gettest("label")
# Run the function
DEscore<-CalDEscore(GEP,label)
# Run the function
drug_centrality<-DrugReposition(DE=DEscore,nperm = 2,r = 0.9,p = 10^-10)
DrugSimscore
Description
The function "DrugSimscore" is used in calculating the drug functional similarity score.
Usage
DrugSimscore(DE,nperm = 0)
Arguments
| DE | A matrix with one column of zscore. | 
| nperm | Number of random permutations (default: 0). | 
Value
A dataframe with four columns those are drug1, drug2, drug1 name, drug2 name, functional similarity score and FDR.
Examples
# Obtain the example data
GEP<-Gettest("GEP")
label<-Gettest("label")
# Run the function
DEscore<-CalDEscore(GEP,label)
# Run the function
drug_drug<-DrugSimscore(DE=DEscore,nperm = 0)
Gettest
Description
Get the example data
Usage
Gettest(exampleData)
Arguments
| exampleData | A character,should be one of"Jaccard","commongenes","GO_MF","Drugs","Drugbankid_CID","drugname","GEP","label" | 
Value
data
An environment variable which includes some example data
Description
An environment variable which includes some example data. Jaccard:A matrix of Jaccard score between drugs and GOMF. commongenes:A matrix consisting of genes shared by drug targets and GOMF. GO_MF:GO terms of molecular functions. Drugs:Drugs and corresponding targets. GEP:An example gene expression profile. label:A vector representing the label of the sample of GEP, where "1" is the disease sample and "0" is the normal sample. Drugbankid_CID:A dataframe including three columns which are drugbankid, ChembleID, and drugname.
Usage
myenv
Format
An environment variable
plotDruglink
Description
The function "plotDruglink" is used to plot a bipartite network of drugs and shared molecular functions.
Usage
plotDruglink(drug1,drug2,i = 5,color_MF = "#43AAEF",color_drug = "#F7525B",
layout_type = "circle")
Arguments
| drug1 | The drugbank ID of drug1. | 
| drug2 | The drugbank ID of drug2. | 
| i | Specifies the number of outputs molecular functions, which is 5 by default. | 
| color_MF | Defines the color of MF nodes in the network. | 
| color_drug | Defines the color of drug nodes in the network. | 
| layout_type | layout_type used to set the appropriate arrangement, there is an option to choose from "circle","dh",and "sugiyama". | 
Value
A bipartite network of drugs and shared molecular functions.
Examples
# Set drug1
drug1<-"DB02721"
# Set drug2
drug2<-"DB01213"
# Run the function
library(igraph)
plotDruglink(drug1,drug2,i = 5)
plotTargetheatmap
Description
The function "plotTargetheatmap" is used to plot a heat map of drug targets expression.
Usage
plotTargetheatmap(drugid,ExpData,label,significance=FALSE,
cluster.rows=FALSE,cluster.cols=FALSE,bk=c(-2.4,2.3),show.rownames=TRUE,
show.colnames=FALSE,ann_colors=c("#FFAA2C","#2CBADA"),col=c("#2A95FF","#FF1C1C"))
Arguments
| drugid | The drugbank ID of a drug. | 
| ExpData | A gene expression profile of interest (rows are genes, columns are samples). | 
| label | A character vector consists of "0" and "1" which represent sample class in the gene expression profile. "0" means normal sample and "1" means disease sample. | 
| significance | This parameter controls whether the p-value of differential expression is displayed. | 
| cluster.rows | Logical value that represents whether row clustering is used. | 
| cluster.cols | Logical value that represents whether col clustering is used. | 
| bk | This parameter adjusts the range of values displayed by the color bar. | 
| show.rownames | This parameter controls whether row names are displayed. | 
| show.colnames | This parameter controls whether column names are displayed. | 
| ann_colors | Vector of colors used to define groups. | 
| col | Vector of colors used in the heatmap. | 
Value
A heat map of drug targets expression.
Examples
# Obtain the example data
GEP<-Gettest("GEP")
label<-Gettest("label")
# Run the function
plotTargetheatmap("DB00780",GEP,label)