Entering edit mode
2.1 years ago
prithvi.mastermind
▴
50
I'm stuck while running the limma at design matrix step. It showing error stating that "Error in lmFit(LIMS, design.gse74706):row dimension of design doesn't match column dimension of data object". This is my code for running limma.
Col_data = read.table(file = "LUSC_Phenotype.txt", header = T, sep = "\t")
groups.LUSC = Col_data$Type
f.LUSC = factor(groups.LUSC, levels=c("Tumor", "Normal"))
design.LUSC = model.matrix(~0+f.LUSC)
colnames(design.LUSC) = c("Tumor", "Normal")
LIMS <- read.delim(file.choose(), row.names=1)
data.fit.LUSC = lmFit(LIMS, design.LUSC)
contrast.matrix.LUSC = makeContrasts(Tumor-Normal, levels=design.LUSC)
data.fit.con.LUSC = contrasts.fit(data.fit.LUSC, contrast.matrix.LUSC)
data.fit.eb.LUSC = eBayes(data.fit.con.LUSC)
the error is saying that the number of columns in
LIMS
doesn't match the number of rows indesign.LUSC
. Can you confirm thatLIMS
is formatted with genes as rows and samples as columns (i.e. a standard "gene count matrix")? Likewise double check thedesign.LUSC
object is as you expect.