Convert multiple rows value retrieved from ensemble biomart to comma separated list for a common ensemble gene ID.
1
0
Entering edit mode
3.0 years ago
sontiroy • 0

I have retrieved the gene ontology data from ensemble as a data frame, as shown bellow

Gene ontology data table I retrieved from biomart enter image description here

and I want to add those details to my DEG list which have unique ensemble id in each row , so I want to convert the ensemble dataframe to match this format. where each unique gene id will be linked to multiple GO separated by comma.

This format I want enter image description here

If anyone can suggest some code to do it in R it will be very helpful. Thanks.

ensembl Biomart R geneontology • 1.9k views
ADD COMMENT
0
Entering edit mode

so the ensembl ids in the GO df are not unique?

you can post your data in plain text so that others can help with that

ADD REPLY
1
Entering edit mode
3.0 years ago

Hi, welcome.

There are resources on the World Wide Web that go over how to merge two data-frames. Can you please search?

Key functions from base R are match(), which(), and merge(). Tidyverse provides other —more fancy— functions - see for example: https://dplyr.tidyverse.org/reference/join.html

Kind regards,

Kevin

ADD COMMENT

Login before adding your answer.

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