Learn R Programming

Drug set enrichment analysis (DTSEA)

DTSEA contains the basic R functions and sample data for running the DTSEA algorithm. After installing and loading the package, users will be able to explore the framework of DTSEA.

More about DTSEA

The Drug Target Set Enrichment Analysis (DTSEA) is a novel tool used to identify the most effective drug set against a particular disease based on the Gene Set Enrichment Analysis (GSEA). It assumes the most effective drugs are those with a closer affinity to the specified disease.

Getting started

Step 1. Prerequisites for installation

You should ensure that you have the necessary system dependencies configured.

For Debian-based Linux system (Debian buster or bullseye), build-essential should be installed at first:

sudo apt install -y build-essential

For Windows (8.1 / 10 / 11): Rtools should be installed to the system path.

The latest base R is recommended. The compatibility of the earlier version (v4.0.x) is under evaluation.

Step 2. Install the package

The dependency fgsea and BiocParallel are unavailable on the CRAN but available on BioConductor. So we need to install the BiocManager manually.

if (!"BiocManager" %in% as.data.frame(installed.packages())$Package)
  install.packages("BiocManager")
BiocManager::install(c("fgsea", "BiocParallel"))

Then you can install the development version of DTSEA from GitHub with:

if (!"devtools" %in% as.data.frame(installed.packages())$Package)
  install.packages("devtools")
devtools::install_github("hanjunwei-lab/DTSEA")

Examples

Below is a basic example that shows how to solve a common problem:

library(DTSEA)

# Load the data
data(example_disease_list)
data(example_drug_target_list)
data(example_ppi)

# Perform a simple DTSEA analysis

result <- DTSEA(
    network = example_ppi,
    disease = example_disease_list,
    drugs = example_drug_target_list
)

You can enable the multicore feature to utilize the multicore advantages. Here is the benchmark.

# set up environment

single.core <- function() {
  suppressWarnings(capture.output(DTSEA(network = example_ppi, disease = example_disease_list, drugs = example_drug_target_list, nproc = 0)))
  NULL
}

dual.core <- function() {
  suppressWarnings(capture.output(DTSEA(network = example_ppi, disease = example_disease_list, drugs = example_drug_target_list, nproc = 10)))
  NULL
}

single.core()
dual.core()

Supplementary data files

In this package, we provide the example data, which is a small set of data to demonstrate the usage and the main idea behind DTSEA. We provide some extra data files, the real data we used in the DTSEA paper. The supplementary package is now on the GitHub. Anyone can obtain this package by:

if (!"devtools" %in% as.data.frame(installed.packages())$Package)
  install.packages("devtools")
devtools::install_github("hanjunwei-lab/DTSEAdata")

Known bugs

The Intel Math Kernel Library (MKL) performs poorly with this package when dealing with linear algebra operations. If you use MKL-based BLAS or MKL-based R distribution (like Microsoft R Open), you will get unexpected or zero results in certain circumstances. Please install the Automatically Tuned Linear Algebra package (libatlas) or the multi-threaded OpenBlas library in order to get higher performance and reliable results with:

sudo apt install libatlas3-base -y

or

sudo apt install libopenblas-base -y

Copy Link

Version

Install

install.packages('DTSEA')

Monthly Downloads

213

Version

0.0.3

License

GPL (>= 2)

Maintainer

Junwei Han

Last Published

November 6th, 2022

Functions in DTSEA (0.0.3)

example_drug_target_list

An example data frame of drug target lists
kendall.w

Kendall's coefficient of concordance W
random.walk

Function to implement Random Walk with Restart (RwR) algorithm on the input graph
get_data

Get extra data
example_disease_list

An example vector of disease nodes
DTSEA-package

The Drug target set enrichment analysis (DTSEA)
calculate_p0

Function to calculate the p0 vector used in Random Walk with Restart (RwR)
DTSEA

Main function of drug target set enrichment analysis (DTSEA)
cronbach.alpha

Cronbach's alpha
calculate_within

Calculate within variance
calculate_between

Calculate between variance in network
example_ppi

An example human gene functional interaction network object
separation

A measure of network separation
random_graph

A random graph for the computation of the separation measure