scPathway {scapGNN} | R Documentation |
Infer pathway activation score matrix at single-cell resolution
Description
Calculate pathway activity score of single-cell by random walk with restart (RWR).
Usage
scPathway(
network.data,
gmt.path = NULL,
pathway.min = 10,
pathway.max = 500,
nperm = 50,
parallel.cores = 2,
rwr.gamma = 0.7,
normal_dist = TRUE,
seed = 1217,
verbose = TRUE
)
Arguments
network.data |
The input network data is the result from the |
gmt.path |
Pathway database in |
pathway.min |
Minimum size (in genes) for pathway to be considered. Default: |
pathway.max |
Maximum size (in genes) for database gene sets to be considered. Default: |
nperm |
Number of random permutations. Default: |
parallel.cores |
Number of processors to use when doing the calculations in parallel (default: |
rwr.gamma |
Restart parameter. Default: |
normal_dist |
Whether to use pnorm to calculate P values. Default: |
seed |
Random number generator seed. |
verbose |
Gives information about each step. Default: |
Details
scPathway
The scPathway
function integrates the results of ConNetGNN into a gene-cell association network.
The genes included in each pathway are used as a restart set in the gene-cell association network to calculate the strength of its association with each cell through RWR
.
Perturbation analysis was performed to remove noise effects in the network and to obtain the final single-cell pathway activity score matrix.
Value
A matrix of single-cell pathway activity score.
Examples
require(parallel)
require(utils)
# Load the result of the ConNetGNN function.
data(ConNetGNN_data)
kegg.path<-system.file("extdata", "KEGG_human.gmt", package = "scapGNN")
# We recommend the use of a compiler.
# The compiler package can be used to speed up the operation.
# library(compiler)
# scPathway<- cmpfun(scPathway)
scPathway_data<-scPathway(ConNetGNN_data,gmt.path=kegg.path,
pathway.min=25,nperm=2,parallel.cores=1)