008‐ Cell Frequencies & Proportions - rezakj/iCellR GitHub Wiki

  • Cell frequencies refer to the number of cells present in each cluster or category, providing insights into how cells are distributed across the dataset.

  • Proportions, on the other hand, represent the relative size of each cluster or category compared to the total number of cells, expressed as a fraction or percentage.

Calculate Cell Frequencies and Proportions

my.obj <- clust.cond.info(my.obj)

# write out 
data <- ([email protected])
write.table(data, "myFrequencies.tsv", sep = "\t", row.names =F)

# check 
head([email protected])
#  conditions  TC    SF clusters Freq Norm.Freq percentage
#1       Ctrl 491 1.265        1    4     3.162       0.81
#2       Ctrl 491 1.265       11   32    25.296       6.52
#3       Ctrl 491 1.265        8  114    90.119      23.22
#4       Ctrl 491 1.265        5   43    33.992       8.76
#5       Ctrl 491 1.265        2   33    26.087       6.72
#6       Ctrl 491 1.265        9   86    67.984      17.52

Plot Cell Frequencies and Proportions

clust.cond.info(my.obj, plot.type = "pie", normalize.ncell = TRUE, my.out.put = "plot", normalize.by = "percentage")

clust.cond.info(my.obj, plot.type = "bar", normalize.ncell = TRUE,my.out.put = "plot", normalize.by = "percentage")

clust.cond.info(my.obj, plot.type = "pie.cond", normalize.ncell = T, my.out.put = "plot", normalize.by = "percentage")

clust.cond.info(my.obj, plot.type = "bar.cond", normalize.ncell = T,my.out.put = "plot", normalize.by = "percentage")