Learn R Programming

scapGNN (version 0.1.4)

scPathway: 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
)

Value

A matrix of single-cell pathway activity score.

Arguments

network.data

The input network data is the result from the ConNetGNN function.

gmt.path

Pathway database in GMT format.

pathway.min

Minimum size (in genes) for pathway to be considered. Default: 10.

pathway.max

Maximum size (in genes) for database gene sets to be considered. Default: 500.

nperm

Number of random permutations. Default: 50. We recommend the setting of 100.

parallel.cores

Number of processors to use when doing the calculations in parallel (default: 2). If parallel.cores=0, then it will use all available core processors unless we set this argument with a smaller number.

rwr.gamma

Restart parameter. Default: 0.7.

normal_dist

Whether to use pnorm to calculate P values. Default: TRUE.Note that if normal_dist is FALSE, we need to increase nperm (we recommend 100).

seed

Random number generator seed.

verbose

Gives information about each step. Default: TRUE.

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.

Examples

Run this code
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)

Run the code above in your browser using DataLab