# NOT RUN {
## Simulate data from given matrix of counts
## In practice, you would obtain mat from a real dataset, not simulate it.
set.seed(1)
n <- 100
p <- 1000
mat <- matrix(stats::rpois(n * p, lambda = 50), nrow = p)
## Subsample the matrix, then feed it into a thinning function
submat <- select_counts(mat = mat, nsamp = 10, ngene = 100)
thout <- thin_2group(mat = submat, prop_null = 0.5)
## The rownames and colnames (if NULL in mat) tell you which genes/samples
## were selected.
rownames(submat)
colnames(submat)
# }
Run the code above in your browser using DataLab