View source: R/application_prediction.R
get_lfc_celltype | R Documentation |
get_lfc_celltype
Get log fold change of genes between two conditions in cell type of interest when using a Seurat single-cell object.
get_lfc_celltype(celltype_oi, seurat_obj, condition_colname, condition_oi, condition_reference, celltype_col = "celltype")
#'
celltype_oi |
Name of celltype of interest. Should be present in the celltype metadata dataframe. |
seurat_obj |
Single-cell expression dataset as Seurat object https://satijalab.org/seurat/. |
condition_colname |
Name of the column in the meta data dataframe that indicates which condition/sample cells were coming from. |
condition_oi |
Condition of interest. Should be a name present in the "condition_colname" column of the metadata. |
condition_reference |
The second condition (e.g. reference or steady-state condition). Should be a name present in the "condition_colname" column of the metadata. |
celltype_col |
Metadata colum name where the cell type identifier is stored. Default: "celltype". If this is NULL, the Idents() of the seurat object will be considered as your cell type identifier. |
... |
Additional arguments passed to |
A tbl with the log fold change values of genes. Positive lfc values: higher in condition_oi compared to condition_reference.
## Not run:
requireNamespace("dplyr")
seuratObj = readRDS(url("https://zenodo.org/record/3531889/files/seuratObj_test.rds"))
get_lfc_celltype(seurat_obj = seuratObj, celltype_oi = "CD8 T", condition_colname = "aggregate", condition_oi = "LCMV", condition_reference = "SS", celltype_col = "celltype", expression_pct = 0.10)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.