This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error of Groups in R
> fit = lmFit(gse50397eset, design_gse50397)

Error in lmFit(gse50397eset, design_gse50397) : 
 row dimension of design doesn't match column dimension of data object.

Can anyone please help me out of this error.

affy limma oligo bioconductor r

Can you check and post:

dim(gse50397eset)
dim(design_gse50397)

dim(gse50397eset) [1] 33297 89 dim(design_gse50397) [1] 77 2 I run these commands but did not find anything useful.. :(

dim(gse50397eset) [1] 33297 89 dim(design_gse50397) [1] 77 2 I run these commands but did not find anything useful.. :(

dim tells you the sizes of your objects. And indeed, these do not match. You should check if you properly created those objects.

which objects aren't created properly?? and how can I make them proper match?

please tell according to my script that which objects are not properly defined?

shouldn't this be fit = lm(gse50397eset, design_gse50397)?

Then you get fit$fitted.values

Please help me and pinpoint the error specifically If you can I am not getting any help from the above responses.. Please help me get out of this error i will be very thankful to you.
gse50397dat = getGEO('GSE50397')
gse50397raw= getGEOSuppFiles("GSE50397")
tarfile <- grep("\\.tar$", rownames(gse50397raw), value = TRUE)
list.files("GSE50397")
untar("GSE50397/GSE50397_RAW.tar", exdir = "GSE50397/CEL")
list.files("GSE50397/CEL")
celfiles <- list.files("GSE50397/CEL", full = TRUE)
rawData <- read.celfiles(celfiles)
rawData
normData <- rma(rawData)
gse50397eset= exprs(normData)
groups = pData(phenoData(gse50397dat[[1]]))$Hba1c
groups=as.character(groups)
groups=sort(groups)
groups[c(11)]="diabetic"
groups[c(17)]="diabetic"
groups[c(25)]="diabetic"
groups[c(27)]="diabetic"
groups[c(29)]="diabetic"
groups[c(32)]="diabetic"
groups[c(35)]="diabetic"
groups[c(38)]="diabetic"
groups[c(42:43)]="diabetic"
groups[c(46)]="diabetic"
groups[c(48)]="diabetic"
groups[c(51)]="diabetic"
groups[c(53:56)]="diabetic"
groups[c(61)]="diabetic"
groups[c(65)]="diabetic"
groups[c(76:78)]="diabetic"
groups[c(82:84)]="diabetic"
groups[c(87)]="diabetic"
groups[c(13:16)]="control"
groups[c(23:24)]="control"
groups[c(30:31)]="control"
groups[c(57:60)]="control"
groups[c(62:64)]="control"
groups[c(66:75)]="control"
groups[c(80:81)]="control"
groups[c(88:89)]="control"
f = factor(groups, levels=c("control","diabetic"))
design_gse50397 = model.matrix(~0+f)
colnames(design_gse50397) = levels(f)
cont.matrix = makeContrasts(T2D-diabetic, levels=design_gse50397)
fit = lmFit(gse50397eset, design_gse50397)
Error in lmFit(gse50397eset, design_gse50397) : 
  row dimension of design doesn't match column dimension of data object

What an absurd way of creating your trait data object, I would like to suggest you first follow a proper introduction to R before you try to do research. I'd suggest http://swirlstats.com/

0 answers

No answers yet.

Log in to answer this question.