Description Usage Arguments Value Examples
View source: R/MakeSigMatrix.R
This function is intended to collapse many single cells into 3 (groupsize) groups with the average count across all cells in each of the groups. These groups can then be used to perform a t-test (for example) between the 3 groups of CellX with 3 groups of CellY
1 2 3 4 5 6 |
RNAcounts |
The single cell matrix |
cellIDs |
A vector will cell types for each column in scCountMatrix (DEFAULT: colnames(RNAcounts)) |
groupSize |
The number of sets to break it up into (DEFAULT: 3) |
randomize |
Set to TRUE to randomize the sets (DEFAULT: TRUE) |
a list with a multiple sets
1 2 3 4 5 6 7 8 | RNAcounts <- matrix(0, nrow=10, ncol=100)
rownames(RNAcounts) <- make.names(rep('Gene', nrow(RNAcounts)), unique=TRUE)
colnames(RNAcounts) <- make.names(c('CellX', rep('CellY', 39),
rep('CellZ', 30), rep('CellB', 30)), unique=TRUE)
RNAcounts[, grepl('CellY', colnames(RNAcounts))] <- 1
RNAcounts[, grepl('CellZ', colnames(RNAcounts))] <- 2
RNAcounts[, grepl('CellB', colnames(RNAcounts))] <- 3
scSample(RNAcounts, groupSize=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.