This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Xenopus tropicalis Ensembl Gene IDs and Transcripts ID with BiomaRt

Hi!

I am trying to retrieve all ensembl gene and transcripts IDs of Xenopus tropicalis using the biomaRt library.

getBM(attributes = c('ensembl_transcript_id', 'ensembl_gene_id'), filters ="chromosome_name", values="?", mart=ensembl)

Specifically I have doubt in the values parameter , as I do not know the scaffolds nomenclature to retrieve all the genes and transcripts using the chromosome name as filter.

Thanks!

Gaby

r ensembl biomart

2 answers

If you want to get all values for the attributes you're interested in, you don't need to supply any filters or values. The following query should return all available data, but bear in mind it might take a long time to run.

library(biomaRt)
ensembl <- useMart('ensembl', 
                   dataset = 'xtropicalis_gene_ensembl',
                   host = "www.ensembl.org")

transAndGene <- getBM(attributes = c('ensembl_transcript_id', 'ensembl_gene_id'), 
                      mart = ensembl)

We can look at the number of rows in transAndGene to see how many transcripts were returned.

> nrow(transAndGene)
[1] 24197

You can check this against the Ensembl annotation overview page here and see that it's the same number as listed there, so our query returned everything available.

how can i use this "transAndGene" to map my gene after I get result from deseq2 .I want to convert all the ENSEMBL to gene name can you let me know how do I do that?

For values you should put in whichever chromosome you want to filter by. What chromosome are you looking to get the genes from?

Log in to answer this question.