Entering edit mode
22 months ago
rupali
•
0
finding error to run edgeR, error in ploting MDS and after that in model matrix also
library(edgeR)
counts <- read.delim("GSE116959_series_matrix.txt", row.names = 1)
head(counts)
d0 <- DGEList(counts)
d0 <- calcNormFactors(d0)
d0
cutoff <- 1
drop <- which(apply(cpm(d0), 1, max) < cutoff)
d <- d0[-drop,]
dim(d) # number of genes left
snames <- colnames(counts) # Sample names
snames
sample <- substr(snames, 1, nchar(snames) - 2)
sample_no <- substr(snames, nchar(snames) - 1, nchar(snames) - 1)
sample
sample_no
group <- interaction(sample, sample_no)
group
plotMDS(d, col = as.numeric(group))
mm <- model.matrix(~0 + group)
y <- voom(d, mm, plot = T)
okay thanks for the help