Error while running Limma
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)
• 1,189 views
•
link
0 answers
No answers yet.
Log in to answer this question.
the error is saying that the number of columns in
LIMSdoesn't match the number of rows indesign.LUSC. Can you confirm thatLIMSis formatted with genes as rows and samples as columns (i.e. a standard "gene count matrix")? Likewise double check thedesign.LUSCobject is as you expect.