adding gene name to expressionset table
1
0
Entering edit mode
4.8 years ago

hello dear, i'm beginner in R. I extracted expressionSet from my GSE.

gset <- getGEO("GSE42387", GSEMatrix =TRUE, AnnotGPL=FALSE, destdir = "Data/")
if (length(gset) > 1) idx <- grep("GPL16297", attr(gset, "names")) else idx <- 1
gset <- gset[[idx]]
gset=gset[[1]]
ex=exprs(gset)

or this code:

>library(Biobase)
> library(GEOquery) 
>data = getGEO("GSE76092")
>eset = exprs (data[[1]])
>write.table(eset, "Results/HT29.0xpt.txt", row.names=T, sep="\t", quote=F)

but it doesn't have any gene name, ID, gene symbol, and ... it has only GSM. like this:

GSM1974065  GSM1974066  GSM1974067  GSM1974068  GSM1974069  GSM1974070
6.94    7.02    6.93    7.02    6.98    7.18
12.92   12.86   12.84   13.07   13.04   13.02
9.37    9.51    9.49    9.32    9.35    9.53
14.04   14  13.86   13.32   13.42   13.24
16.9    16.93   17.03   16.72   16.71   16.67

how can i insert gene name to my expressionset table? any suggestion is useful. Thanks

R • 2.2k views
ADD COMMENT
0
Entering edit mode
GSM1974065  GSM1974066  GSM1974067  GSM1974068  GSM1974069  GSM1974070

These are sample IDs. What are the IDs for your genes? - they will be set as the rownames of your ExpressionSet object.

ADD REPLY
0
Entering edit mode
4.8 years ago
russhh 5.7k

The ExpressionSet has a few different tables (https://www.rdocumentation.org/packages/Biobase/versions/2.32.0/topics/ExpressionSet): assayData (stores the expression values), phenoData (stores the details for individual samples, the columns of the assayData), featureData (stores the details for the genes/features, the rows of the assayData).

When you download from GEOquery, you get a list of ExpressionSets and your code data[[1]] extracts the first of them (there' ll probably only be one entry in this list, so your code for that is correct). By running ex <- exprs(...) or eset <- exprs(...) you've extracted the expression matrix from the assayData component of the expressionSet data[[1]], so you've actually removed any gene-annotations that were originally present.

If you want the feature data to be printed to a file, either print the featureData to a separate file, or print the cbind() of the expression data and the feature data

ADD COMMENT

Login before adding your answer.

Traffic: 1582 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6