I'm analyzing a bunch of data from the Affymetrix Human Genome U133 Plus 2 Array platform, but I'm not going to replace the probe ID with the gene ID, and I've looked at some information, but the problem hasn't been solved. (My English is not very good, I hope you can understand the problem I described, thank you very much )
library(oligo)
celFiles <- list.celfiles()
affyRaw <- read.celfiles(celFiles)
library(pd.hg.u133.plus.2)
eset <- rma(affyRaw)
library(limma)
design <- model.matrix(~ 0+factor(c(1,1,1,2,2,2)))
colnames(design) <- c("group1", "group2")
contrast.matrix <- makeContrasts(contrasts="group2-group1",levels=design)
design
fit <- lmFit(eset, design)
fit1<- contrasts.fit(fit, contrast.matrix)
fit2 <- eBayes(fit1)
dif<-topTable(fit2,coef="group2-group1",n=nrow(fit2),lfc=log2(2))
dif<-dif[dif[,"adj.P.Val"]<0.05,]
head(dif)
How do I transform the probe ID into the gene ID?
First of all, thank you very much for your reply. In fact, I want to say, the two methods I have tried, but did not do it, the following is the wrong tips
This is the first method,using the PdInfo package
library(oligo)
celFiles <- list.celfiles()
affyRaw <- read.celfiles(celFiles)
library(pd.hg.u133.plus.2)
eset <- rma(affyRaw)
library(affycoretools)
eset<- annotateEset(eset, pd.hg.u133.plus.2)
错误: There is no annotation object provided with the x package
Here are second ways, using the ChipDb package
library(hgu133plus2.db)
eset<- annotateEset(eset,hgu133plus2.db)
And then there was a hint :select()' returned 1:many mapping between keys and columns
And then I didn't know what to do
That's not a hint. It's a message that some of the probesets map to more than one thing. By default you get just the first thing, although there are arguments that you can use to get all the mappings. But you claim it doesn't work without apparently even looking at the output. You should probably make sure it didn't work before you come here to make claims.