ConstructEnrichmentDataFrameAndDoStatistics: ConstructEnrichmentDataFrameAndDoStatistics

View source: R/Analysis.R

ConstructEnrichmentDataFrameAndDoStatisticsR Documentation

ConstructEnrichmentDataFrameAndDoStatistics

Description

Helper function for makeDotPlot that does the dataframe construction and statistics.

Usage

ConstructEnrichmentDataFrameAndDoStatistics(
  seuratObj,
  yField = "ClusterNames_0.2",
  xField = "Timepoint",
  extraGroupingFields = NULL,
  colorField = "Population",
  normalizationField = "cDNA_ID",
  sizeFactorField = "SizeFactor",
  maxSizeFactor = 100,
  independentVariableTestField = colorField,
  dependentVariableTestField = sizeFactorField
)

Arguments

seuratObj

The seurat object that holds the data.

yField

The y axis for the dotplots.

xField

The x axis for the dotplots.

extraGroupingFields

An optional vector of additional fields to use in grouping

colorField

The column of metadata that is used for the colorField

normalizationField

The metadata column that is used for size factor calculation (equivalently, normalization between different datasets.) Recommended to be cDNA_ID.

sizeFactorField

The column name of the seruat object metadata that size factors should be stored in.

maxSizeFactor

The maximum allowable SizeFactor before an error is automatically thrown. For instance, a size factor of 100 means you have a group of 8000 cells that you're comparing to 80 cells.

independentVariableTestField

This and dependentVariableTestField automatically define a small statistical test to see if your size factors are correlated. Ideally, they should not be if independentVariableTestField is not the same value as normalizationField.

dependentVariableTestField

This value should be equal to sizeFactorField initially, but can be changed to interactively see other correlations in the metadata.


bimberlabinternal/CellMembrane documentation built on Nov. 15, 2024, 9:34 p.m.