great! thanks, I inserted: vals = vals[vals$SYMBOL != NA,]. I'll have a look at plyr.
Map Genest 1.0 Id To Symbol Using Bioconductor
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?
• 3,936 views
•
link
1 answer
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
• 0 views
•
link
• 0 views
•
link
I added a bit to the question if you care to look.
• 0 views
•
link
Log in to answer this question.
If I understand you correctly - you can use
write.tablefunction to save your mappings to external file.try
toTable(hugene10sttranscriptclusterSYMBOL)for the whole shooting match, ortoTable(hugene10sttranscriptclusterSYMBOL[keys])then standard R.@Martin, thanks, write.table(toTable(hugene10sttranscriptclusterSYMBOL)), "out.tsv", row.names=F, col.names=T, sep="t") works as well.
@Martin, and see my edit to the question.