DrugReposition {DrugSim2DR}R Documentation

DrugReposition

Description

The function "DrugReposition" is used in drug repositioning by calculating the eigenvector centrality of drugs.

Usage

DrugReposition(DE,nperm = 1000,r = 0.9,p = 10^-10)

Arguments

DE

A matrix with one column of zscore.

nperm

Number of random permutations (default: 1000).

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 = 1000,r = 0.9,p = 10^-10)

[Package DrugSim2DR version 0.1.1 Index]