This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error running edgeR, plotting MDS and in model matrix

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)
deg

1 answer

First issue is that GEO series matrix files can't be read using read.delim.

Second issue is the data are from Agilent microarrays and so would need to be analysed by limma rather than by edgeR. The GEO series itself tells you the data was analysed by limma.

You should learn more about how to read GEO data, for example using the GEOquery package, and then follow the limma User's Guide for Agilent microarrays.

okay thanks for the help

Log in to answer this question.