get_subtype_prop_associations: Compute and plot associations between factor scores and cell...

View source: R/get_prop_associations.R

get_subtype_prop_associationsR Documentation

Compute and plot associations between factor scores and cell subtype composition for various clustering resolution parameters

Description

Compute and plot associations between factor scores and cell subtype composition for various clustering resolution parameters

Usage

get_subtype_prop_associations(
  container,
  max_res,
  stat_type,
  integration_var = NULL,
  min_cells_group = 50,
  use_existing_subc = FALSE,
  alt_ct_names = NULL,
  n_col = 2
)

Arguments

container

environment Project container that stores sub-containers for each cell type as well as results and plots from all analyses

max_res

numeric The maximum clustering resolution to use. Minimum is 0.5.

stat_type

character Either "fstat" to get F-Statistics, "adj_rsq" to get adjusted R-squared values, or "adj_pval" to get adjusted pvalues.

integration_var

character The meta data variable to use for creating the joint embedding with Conos if not already provided in container$embedding (default=NULL)

min_cells_group

numeric The minimum allowable size for cell subpopulations (default=50)

use_existing_subc

logical Set to TRUE to use existing subcluster annotations (default=FALSE)

alt_ct_names

character Cell type names used in clustering if different from those used in the main analysis. Should match the order of container$experiment_params$ctypes_use. (default=NULL)

n_col

numeric The number of columns to organize the plots into (default=2)

Value

The project container with a cowplot figure of cell subtype proportion-factor association results plots in container$plots$subtype_prop_factor_associations.


scITD documentation built on Sept. 8, 2023, 5:11 p.m.