| Type: | Package |
| Title: | In-Silico Knockout Experiments from Single-Cell Gene Regulatory Networks |
| Version: | 1.0.3 |
| Description: | A workflow based on 'scTenifoldNet' to perform in-silico knockout experiments using single-cell RNA sequencing (scRNA-seq) data from wild-type (WT) control samples as input. First, the package constructs a single-cell gene regulatory network (scGRN) and knocks out a target gene from the adjacency matrix of the WT scGRN by setting the gene’s outdegree edges to zero. Then, it compares the knocked out scGRN with the WT scGRN to identify differentially regulated genes, called virtual-knockout perturbed genes, which are used to assess the impact of the gene knockout and reveal the gene’s function in the analyzed cells. |
| URL: | https://github.com/cailab-tamu/scTenifoldKnk |
| BugReports: | https://github.com/cailab-tamu/scTenifoldKnk/issues |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.3.3 |
| Imports: | pbapply, Matrix, methods, stats, utils, MASS, scTenifoldNet, cli, enrichR, igraph, reshape2 |
| Suggests: | testthat (≥ 2.1.0) |
| NeedsCompilation: | no |
| Packaged: | 2026-01-19 22:08:00 UTC; dcosorioh |
| Author: | Daniel Osorio |
| Maintainer: | Daniel Osorio <dcosorioh@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-01-25 22:00:02 UTC |
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
Description
Predict gene perturbations
Usage
scTenifoldKnk(
countMatrix,
qc = TRUE,
gKO = NULL,
qc_mtThreshold = 0.1,
qc_minLSize = 1000,
qc_minCells = 25,
nc_lambda = 0,
nc_nNet = 10,
nc_nCells = 500,
nc_nComp = 3,
nc_scaleScores = TRUE,
nc_symmetric = FALSE,
nc_q = 0.9,
td_K = 3,
td_maxIter = 1000,
td_maxError = 1e-05,
td_nDecimal = 3,
ma_nDim = 2,
nCores = parallel::detectCores()
)
Arguments
countMatrix |
countMatrix |
qc |
A boolean value (TRUE/FALSE), if TRUE, a quality control is applied over the data. |
gKO |
gKO |
qc_mtThreshold |
A decimal value between 0 and 1. Defines the maximum ratio of mitochondrial reads (mithocondrial reads / library size) present in a cell to be included in the analysis. It's computed using the symbol genes starting with 'MT-' non-case sensitive. |
qc_minLSize |
An integer value. Defines the minimum library size required for a cell to be included in the analysis. |
qc_minCells |
An integer value. Defines the minimum number of cells a gene should be expressed in to be included in the analysis. By default, it's set to 25. |
nc_lambda |
A continuous value between 0 and 1. Defines the multiplicative value (1-lambda) to be applied over the weaker edge connecting two genes to maximize the adjacency matrix directionality. |
nc_nNet |
An integer value. The number of networks based on principal components regression to generate. |
nc_nCells |
An integer value. The number of cells to subsample each time to generate a network. |
nc_nComp |
An integer value. The number of principal components in PCA to generate the networks. Should be greater than 2 and lower than the total number of genes. |
nc_scaleScores |
A boolean value (TRUE/FALSE), if TRUE, the weights will be normalized such that the maximum absolute value is 1. |
nc_symmetric |
A boolean value (TRUE/FALSE), if TRUE, the weights matrix returned will be symmetric. |
nc_q |
A decimal value between 0 and 1. Defines the cut-off threshold of top q% relationships to be returned. |
td_K |
An integer value. Defines the number of rank-one tensors used to approximate the data using CANDECOMP/PARAFAC (CP) Tensor Decomposition. |
td_maxIter |
An integer value. Defines the maximum number of iterations if error stay above |
td_maxError |
A decimal value between 0 and 1. Defines the relative Frobenius norm error tolerance. |
td_nDecimal |
An integer value indicating the number of decimal places to be used. |
ma_nDim |
An integer value. Defines the number of dimensions of the low-dimensional feature space to be returned from the non-linear manifold alignment. |
nCores |
An integer value. Defines the number of cores to be used. |
Author(s)
Daniel Osorio <dcosorioh@tamu.edu>
Examples
# Loading single-cell data
scRNAseq <- system.file("single-cell/example.csv", package = "scTenifoldKnk")
scRNAseq <- read.csv(scRNAseq, row.names = 1)
# Running scTenifoldKnk
scTenifoldKnk(countMatrix = scRNAseq, gKO = "G100", qc_minLSize = 0)