This is a test version of Biostars. For the public version, visit https://www.biostars.org.
mapping ensembl gene id to an array id

Hello,

I have two tables,one from biomart called mart and one from an array(expression data) called duke array.

I'm trying to map the ensembl gene ID (Ensembl.Gene.ID) to the ID of my table duke array(ENS_ID)

I tried the MATCH function in R but it didn't work,does anyone has an idea on how I can do it?

Gene            ENS_ID
TSPAN6          ENSG00000000003
TNMD            ENSG00000000005
DPM1            ENSG00000000419
SCYL3           ENSG00000000457
C1orf112        ENSG00000000460
FGR             ENSG00000000938

  Ensembl.Gene.ID               Associated.Gene.Name
1 ENSG00000261657               SLC25A26
2 ENSG00000223116               AL157931.1
3 ENSG00000233440               HMGA1P6
4 ENSG00000207157               RNY3P4
5 ENSG00000229483               LINC00362
6 ENSG00000252952               RNU6-58P
> head(sub_duke_array)
r expression-data

What exactly are you trying to get in the end? Are you trying to merge the two tables? If so, since you're using R, you can try something like:

merged = merge(mart, sub_duke_array, by=c("ENS_ID","Ensembl.Gene.ID"))

If instead you want to get only the rows of one table whose gene ID is also present in the other table you can do:

mart[mart$ENS_ID %in% sub_duke_array$Ensembl.Gene.ID, ]

provided the two tables are data.frames

thanks for your replies.Yes I wanted to match gene ID from Ensembl to my array results

0 answers

No answers yet.

Log in to answer this question.