Hi all,
could anybody help me adding Go-ID terms to my ensemble gene list please? My object (diffexpr_results) looks like this: x Gene baseMean log2FoldChange
1 ENSMUSG00000004552 111,80117 1,0805015
2 ENSMUSG00000057897 627,24564 -1,1564159
3 ENSMUSG00000026347 146,49072 -0,7324188
4 ENSMUSG00000071796 85,67142 0,777473
5 ENSMUSG00000044337 15,15884 1,6598731
6 ENSMUSG00000076940 35,37653 -1,0034472
How can I add a Go-ID column? I tried: mouse.ensembl<- useMart("ensembl") mouse.ensembl<- useDataset("mmusculusgeneensembl", mart=mouse.ensembl) go <- getBM(attributes = c("ensemblgeneid", "goid"), + filters = "ensemblgeneid", + values = diffexprresults, + mart = mouse.ensembl)
Thanks a lot
What happened when you tried the biomaRt example?
Also, do note that Ensembl gene ID -> GO ID is a one-to-many mapping, so it's not so simple to add to a table like that. For example, your first gene:
You could concatenate all those GO IDs with commas or something, but a GO ID isn't really useful as it is (you don't mention your use case), and in general for eyeballometric analyses you would rather the Term, as the ID is pretty cryptic.