DTSEA {DTSEA}R Documentation

Main function of drug target set enrichment analysis (DTSEA)

Description

The DTSEA function determines whether a drug is potent for a specific disease by the proximity between its targets and the disease-related genes.

Usage

DTSEA(
  network,
  disease,
  drugs,
  rwr.pt = 0,
  sampleSize = 101,
  minSize = 1,
  maxSize = Inf,
  nproc = 0,
  eps = 1e-50,
  nPermSimple = 5000,
  gseaParam = 1,
  verbose = TRUE
)

Arguments

network

The human protein-protein interactome network. It should be or be preconverted before being inputted in DTSEA.

disease

The disease-related nodes.

drugs

The drug-target long format dataframe. It includes at least columns with the drug_id and drug_target.

rwr.pt

The random walk p0 vector. Set it to 0 if you wish DTSEA automatically compute it, or you can provide your predetermined p0 vector.

sampleSize

The size of a randomly selected gene collection, where size = pathwaySize

minSize

Minimal set of a drug set to be tested.

maxSize

Maximal set of a drug set to be tested.

nproc

The CPU workers that fgsea would utilize.

eps

The boundary of calculating the p value.

nPermSimple

Number of permutations in the simple fgsea implementation for preliminary estimation of P-values.

gseaParam

GSEA parameter value, all gene-level statistics are raised to the power of 'gseaParam' before calculating of GSEA enrichment scores.

verbose

Show the messages

Value

The resulting dataframe consists of drug_id, pval, padj, log2err, ES, NES, size, and leadingEdge.

Examples

library(dplyr)
library(DTSEA)

# Load the data
data("example_disease_list", package = "DTSEA")
data("example_drug_target_list", package = "DTSEA")
data("example_ppi", package = "DTSEA")

# Run the DTSEA and sort the result dataframe by normalized enrichment scores
# (NES)
result <- DTSEA(
  network = example_ppi,
  disease = example_disease_list,
  drugs = example_drug_target_list,
  verbose = FALSE
) %>%
arrange(desc(NES))

# Or you can utilize the multi-core advantages by enable nproc parameters
# on non-Windows operating systems.
## Not run: result <- DTSEA(
         network = example_ppi,
         disease = example_disease_list,
         drugs = example_drug_target_list,
         nproc = 10, verbose = FALSE
)
## End(Not run)

# We can extract the significantly NES > 0 drug items.
result %>%
  filter(NES > 0 & pval < .05)
# Or we can draw the enrichment plot of the first predicted drug.
fgsea::plotEnrichment(
  pathway = example_drug_target_list %>%
    filter(drug_id == slice(result, 1)$drug_id) %>%
    pull(gene_target),
  stats = random.walk(network = example_ppi,
                      p0 = calculate_p0(nodes = example_ppi,
                                        disease = example_disease_list)
                      )
)

# If you have obtained the supplemental data, then you can do random walk
# with restart in the real data set

# supp_data <- get_data(c("graph", "disease_related", "example_ppi"))
# result <- DTSEA(network = supp_data[["graph"]],
#                disease = supp_data[["disease_related"]],
#                drugs = supp_data[["drug_targets"]],
#                verbose = FALSE)


[Package DTSEA version 0.0.3 Index]