knitr::opts_chunk$set(collapse = T, comment = "#>")
options(tibble.print_min = 4L, tibble.print_max = 4L)
library(dplyr)
library(ggplot2)
set.seed(1014)

scop: Single-Cell Operations in R.

scop definition:

sparse matrix

head(bt771)

... is in tpm form

range(bt771)

also converts from sparse matrix

m = logtpm(bt771, bulk = F) range(m)

Center gene

m = rowcenter(m)

check that centering worked

range_rowmeans(m)

args(hca) hca.obj = hca(m = m, min.cluster.size = 5, max.cluster.size = 0.8) sapply(hca.obj, class)

cor.mat = hca.obj$cr is.cor(cor.mat) cor.mat = reorder(cor.mat) head(cor.mat) cor.plotted = cormap(cor.mat, lim.find = T) cor.with.dend = cormap(cor.mat, lim.find = T, dend = hca.obj$hc)

clusters = hca.obj$clusters length(clusters) range(lengths(clusters))

less.clusters = hca(hc = hca.obj$hc, clusters = T, min.cluster.size = 5, max.cluster.size = 0.5) length(less.clusters) range(lengths(less.clusters)) clusters = less.clusters

?dea



jlaffy/scrabble documentation built on Nov. 16, 2019, 7:56 a.m.