Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Download this zip file and unzip it on your computer to view the files (Most computers will automatically unzip files).

results.zip

Single Cell Proportion Test

In order to identify differences in proportions of cell types between conditions, scProportionTest can be run. It reads in a seurat object and runs a permutation test to calculate a p-value for each cluster and a magnitude difference between conditions. It also generates a plot showing the pvalues and difference. It can be used to identify enriched or depleted cell types between conditions.

Code Block
library("scProportionTest")

#read in seurat object, saved as a RData file
load("seurat.RData")

#read in seurat object (pbmc), assuming that pbmc has multiple samples with different condition identities
prop_test <- sc_utils(pbmc)
Code Block
#run permutation test to compare between cells with orig.ident as 'Con' and ident 'Treatment'
#run it for every cluster
prop_test <- permutation_test(
	prop_test, cluster_identity = "custom_clusters",
	sample_1 = "Con", sample_2 = "Treatment",
	sample_identity = "orig.ident"
)
Code Block
#Generate plot
permutation_plot(prop_test)

View file
namepermutation_plot.l2.pdf