plotKO: Plot KO network

View source: R/plotKO.R

plotKOR Documentation

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
)

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

Value

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

Examples

## Not run: 
res <- scTenifoldKnk(countMatrix, gKO = "G100")
plotKO(res, gKO = "G100")

## End(Not run)


scTenifoldKnk documentation built on Jan. 26, 2026, 1:07 a.m.