Map Genest 1.0 Id To Symbol Using Bioconductor
1
0
Entering edit mode
12.4 years ago
brentp 24k

I want to get the Symbol for probes on the HuGeneSt 1.0 gene array. I can do something like this:

mget(c("8093624"), hugene10sttranscriptclusterSYMBOL)

to get a single probe and see it's what I want. And I can do this:

vals = mget(keys, hugene10sttranscriptclusterSYMBOL)

to get the entire set of mappings. How can I then write vals to a file with columns of ID, SYMBOL?

EDIT: This question is answered, but an addition, what if I wanted the table with an additional column for hugene10sttranscriptclusterGENENAME --where the table will include rows where there's a value for either GENENAME or SYMBOL?

bioconductor affymetrix r • 3.0k views
ADD COMMENT
1
Entering edit mode

try toTable(hugene10sttranscriptclusterSYMBOL) for the whole shooting match, or toTable(hugene10sttranscriptclusterSYMBOL[keys]) then standard R.

ADD REPLY
0
Entering edit mode

If I understand you correctly - you can use write.table function to save your mappings to external file.

ADD REPLY
0
Entering edit mode

@Martin, thanks, write.table(toTable(hugene10sttranscriptclusterSYMBOL)), "out.tsv", row.names=F, col.names=T, sep="t") works as well.

ADD REPLY
0
Entering edit mode

@Martin, and see my edit to the question.

ADD REPLY
1
Entering edit mode
12.4 years ago
Neilfws 49k

You can convert the list vals to a dataframe using ldply from the plyr package, then use write.table().

library(plyr)
vals <- ldply(vals)
colnames(vals) <- c("ID", "SYMBOL")
write.table(vals, file = "vals.tsv", sep = "\t",
                  col.names = T, row.names = F, quote = F) #tab-separated
ADD COMMENT
0
Entering edit mode

great! thanks, I inserted: vals = vals[vals$SYMBOL != NA,]. I'll have a look at plyr.

ADD REPLY
0
Entering edit mode

I added a bit to the question if you care to look.

ADD REPLY

Login before adding your answer.

Traffic: 2495 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