DrugReposition: DrugReposition

View source: R/DrugReposition.R

DrugRepositionR Documentation

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)

DrugSim2DR documentation built on Nov. 5, 2025, 5:38 p.m.