How to retrieve attributes from a certain feature page using biomaRt
1
0
Entering edit mode
georgewwp • 0
@georgewwp-9719
Last seen 8 months ago

Hi all,

When I tried to retrieve attributes "description" from the ensembl database for Drosophila, it returned NA for all the genes.

dmGeneList <- c("FBgn0000003 ", "FBgn0000008", "FBgn0000014")
ensembl = useMart("ensembl",dataset="dmelanogaster_gene_ensembl")
annoTable <- getBM(
      attributes=c("description", "external_gene_name", "flybase_gene_id"),
      filters = 'flybase_gene_id', 
      values = dmGeneList, 
      mart = ensembl)

  description external_gene_name flybase_gene_id
1          NA     7SLRNA:CR32864     FBgn0000003
2          NA                  a     FBgn0000008
3          NA              abd-A     FBgn0000014

I searched the attributes with the name "description",

searchAttributes(ensembl, pattern = "^description")

It turns out that there are attributes with the same name "description" on different pages.

        name      description         page
5    description Gene description feature_page
137  description Gene description    structure
164  description Gene description     homologs
2471 description Gene description    sequences

I guess this is the reason for the "NA". How can I retrieve the attributes from only the "feature_page"?

Thanks!

Wanpeng

biomaRt getBM • 272 views
ADD COMMENT
2
Entering edit mode
@james-w-macdonald-5106
Last seen 1 hour ago
United States

Usually an illustrative thing to do is go directly to the Biomart server and try what you think is a comparable search, and see if you can get the results you want. Here's a search for a bunch of flybase IDs, using the feature page Gene description and getting nothing.

So that's pretty boring. But if you are using flybase IDs, it's easy enough to use Bioconductor annotation packages directly.

> library(org.Dm.eg.db)
> z <- head(keys(org.Dm.eg.db, "FLYBASE"))
> z
[1] "FBgn0040373" "FBgn0040372" "FBgn0261446" "FBgn0000316" "FBgn0005427"
[6] "FBgn0040370"
> select(org.Dm.eg.db, z, c("SYMBOL","GENENAME"), "FLYBASE")
'select()' returned 1:1 mapping between keys and columns
      FLYBASE  SYMBOL                GENENAME
1 FBgn0040373  CG3038 uncharacterized protein
2 FBgn0040372     G9a                     G9a
3 FBgn0261446 CG13377 uncharacterized protein
4 FBgn0000316     cin                cinnamon
5 FBgn0005427     ewg              erect wing
6 FBgn0040370 CG13375 uncharacterized protein

Which, I believe, is what you are after?

ADD COMMENT
0
Entering edit mode

Thank you, James! It's a great idea to do the search first! The "gene description" column seems to be empty in this version. It worked previously. I'm turning to flybase and use the "gene snapshot" table. This annotation package for fly is also very useful. Thank you for sharing!

Wanpeng

ADD REPLY

Login before adding your answer.

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