View source: R/wrapper_run_scfeatures.R
scFeatures | R Documentation |
The scFeatures function generates a variety of features from a Seurat object containing single cell RNA-sequencing data. By default, all feature types will be generated and returned in a single list containing multiple data frames.
scFeatures(
data = NULL,
sample = NULL,
celltype = NULL,
spatialCoords = NULL,
spotProbability = NULL,
feature_types = NULL,
type = "scrna",
ncores = 1,
species = "Homo sapiens",
celltype_genes = NULL,
aggregated_genes = NULL,
geneset = NULL
)
data |
input data, a matrix of genes by cells |
sample |
a vector of sample information |
celltype |
a vector of cell type information |
spatialCoords |
a list of two vectors containing the x and y coordinates of each cell |
spotProbability |
a matrix of spot probability, each row represents a celltype and each column represents a spot |
feature_types |
vector containing the name of the feature types to generate, options are "proportion_raw", "proportion_logit" , "proportion_ratio", "gene_mean_celltype", "gene_prop_celltype", "gene_cor_celltype", "pathway_gsva" , "pathway_mean", "pathway_prop", "CCI", "gene_mean_aggregated", "gene_prop_aggregated", 'gene_cor_aggregated', "L_stats" , "celltype_interaction" , "morans_I", "nn_correlation". If no value is provided, all the above feature types will be generated. |
type |
input data type, either "scrna" (stands for single-cell RNA-sequencing data), "spatial_p" (stands for spatial proteomics data), or "spatial_t" (stands for single cell spatial data ) |
ncores |
number of cores , default to 1 |
species |
either "Homo sapiens" or "Mus musculus". Defaults to "Homo sapiens" if no value provided |
celltype_genes |
the genes of interest for celltype specific gene expression feature category If no value is provided, the top variable genes will be used |
aggregated_genes |
the genes of interest for overall aggregated gene expression feature category If no value is provided, the top variable genes will be used |
geneset |
the geneset of interest for celltype specific pathway feature category If no value is provided, the 50 hallmark pathways will be used |
a list of dataframes containing the generated feature matrix in the form of sample x features
utils::data("example_scrnaseq" , package = "scFeatures")
data <- example_scrnaseq
celltype <- data$celltype
sample <- data$sample
data <- data@assays$RNA@data
scfeatures_result <- scFeatures(data, celltype = celltype, sample = sample, type = "scrna", feature_types = "proportion_raw")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.