Learn R Programming

scTenifoldKnk (version 1.0.3)

plotKO: Plot KO network

Description

Generate and plot a KO-centered subnetwork from the output of `scTenifoldKnk`. The function selects genes with significant differential regulation, extracts their interactions from the reconstructed WT network, filters edges by weight quantile, and displays the network. When `annotate = TRUE` the function queries enrichment databases and overlays category pies on nodes and a legend of significant terms.

Usage

plotKO(
  X,
  gKO,
  q = 0.99,
  annotate = TRUE,
  nCategories = 20,
  fdrThreshold = 0.05
)

Value

Invisibly returns NULL. The primary purpose is plotting the network as a side effect.

Arguments

X

List. Output from `scTenifoldKnk` function.

gKO

Character. Gene symbol of simulated knockout gene.

q

Numeric. Edge-weight quantile used to threshold weak edges (default 0.99).

annotate

Logical. If TRUE, perform enrichment annotation and display pies on nodes (default TRUE).

nCategories

Integer. Maximum number of enrichment categories to show in the legend when annotation is requested (default 20).

fdrThreshold

Numeric. Adjusted p-value cutoff (FDR) for reporting enriched terms (default 0.05).

Details

Plot a KO-centered subnetwork and (optionally) annotate with enrichment

Examples

Run this code
if (FALSE) {
res <- scTenifoldKnk(countMatrix, gKO = "G100")
plotKO(res, gKO = "G100")
}

Run the code above in your browser using DataLab