Entering edit mode
8.6 years ago
786
▴
50
I'm working with GSE12643 and want to extract differentially expressed gene.Can any one help me in removing the error...
study4 = "GSE12643"
gse12643dat = getGEO('GSE12643')
gse12643raw= getGEOSuppFiles(study4)
tarfile <- grep("\\.tar$", rownames(gse12643raw), value = TRUE)
untar(tarfile, exdir="study4")
celFiles <- unlist(list.files("study4", pattern = "\\.CEL.gz", full.names = TRUE))
gse12643preset = ReadAffy(filenames = celFiles)
rmaData = rma(gse12643preset)
gse12643eset= exprs(rmaData)
groups = pData(phenoData(gse12643dat[[1]]))$source_name_ch1
groups=as.character(groups)
groups[groups=="myotubes from control subject"]="Control"
groups[groups=="myotubes from type 2 diabetes subject"]="T2D"
f = factor(groups, levels=c("Control","T2D"))
design_gse12643 = model.matrix(~0+f)
colnames(design_gse12643) = levels(f)
cont.matrix = makeContrasts(T2D-Control, levels=design_gse12643)
fit = lmFit(gse12643eset, design_gse12643)
fit2 = contrasts.fit(fit, cont.matrix)
fit2 = eBayes(fit2)
fit2$genes$Symbol = getSYMBOL(fit2$genes$ID, "hgu95av2")
fit2$genes$GeneName = unlist(mget(fit$genes$ID, hgu95av2GENENAME))
results = topTable(fit2, adjust ="BH", number = nrow(gse12643eset))
Error is in last command i.e., results = topTable(fit2, adjust ="BH", number = nrow(gse12643eset)) EEROR:
Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x), :
attempt to set an attribute on NULL
Please help me out.