get_module_score: Calculate the module score of KEGG pathway

Description Usage Arguments Value

Description

It is extremely important to set seed for this function

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
get_module_score(
  x,
  save_path,
  all_path = NULL,
  pgenes = NULL,
  append_meta = F,
  regexp = "^X",
  species = "human",
  control_num = 50
)

Arguments

x

a Seurat object

save_path

where to save to output dataframe. It is recommended to save the results because this function tends to be time consuming.

all_path

a dataframe with pathway column being the comon pathway names, and the kegg_id column being the KEGG ID for the pathways

pgenes

a named list of vectors of genes

append_meta

if TRUE, a Seurat object will be created with the expression matrix being the module scores and metadata inherited from the input Seurat object. This output will be more convenient for doing violin plot and heatmap

regexp

remove a part of cell ID names that may arise because of some tidyverse manipulations. If NULL, no changes will happen

Value

a matrix or a Seurat object whose rows are gene module names in pgenes and whose columns are cell names


Yutong441/TBdev documentation built on Dec. 18, 2021, 8:22 p.m.