Chapter 9 Normalization of counts
Let’s start by loading the necessary packages:
library(edgeR)
library(SummarizedExperiment)
Next, let’s set the working directory and separate the raw counts:
setwd("~/PreProcSEQ-main/7-normalizationCounts/tmm/")
load("../../6-annotationTranscripts/matrix_gse_salmon_tximeta_noted.RData")
<- assay(gse) gexp.counts.brut
Finally, let’s normalize the counts in TMM:
<- DGEList(counts=gexp.counts.brut)
dge <- calcNormFactors(dge)
dge <- cpm(dge)
gexp.TMM
<- gse
gse.TMM @assays@data$abundance <- gexp.TMM
gse.TMMsave(gse.TMM, file = "gse_tmm.RData")