Indeed, it has changed to entrezgene_id
• 0 views
•
link
Hello,
I'm working with biomaRt package in R. I'm trying to retreive all entrez genes of hsapiensgeneensembl data set. filtering by gene type - protein coding attributes - entrez gene ID
so far I did the following:
library(biomaRt)
human = useMart("ensembl", dataset = "hsapiens_gene_ensembl")
I'm not sure how to do it using getBM function so that it will not be specific to a list of values but to all values in human data set.
thanks for your help,
Tom :)
Nowadays it is like "entrezgene_id"
library(biomaRt)
mart <- useMart(biomart = "ensembl", dataset = "hsapiens_gene_ensembl")
genes=getBM(attributes = c("hgnc_symbol", "entrezgene_id"),
filters = "hgnc_symbol", values = all, bmHeader = TRUE, mart = mart)
Indeed, it has changed to entrezgene_id
I tried the method suggested by Stephane, but this did not work for me:
> library("biomaRt")
> ensembl <- useMart("ensembl", dataset = "hsapiens_gene_ensembl")
> mapping <- getBM(attributes = c("ensembl_gene_id", "hgnc_symbol"),
filters = "ensembl_gene_id" , values = list("*"), mart = ensembl)
> head(mapping)
[1] ensembl_gene_id hgnc_symbol
<0 rows> (or 0-length row.names)
However, leaving out the filters and values did the trick for me:
> library("biomaRt")
> ensembl <- useMart("ensembl", dataset = "hsapiens_gene_ensembl")
> mapping <- getBM(attributes = c("ensembl_gene_id", "hgnc_symbol"), mart = ensembl)
> head(mapping)
ensembl_gene_id hgnc_symbol
1 ENSG00000252303 RNU6-280P
2 ENSG00000281771
3 ENSG00000281256
4 ENSG00000283272
5 ENSG00000280864
6 ENSG00000280792
> dim(mapping)
[1] 63325 2
The below lines provide also entrezgene id
require(biomaRt)
mart = useEnsembl("ENSEMBL_MART_ENSEMBL")
mart=useMart(biomart="ensembl", dataset="hsapiens_gene_ensembl")
bmIDs = getBM(attributes=c('ensembl_gene_id','ensembl_transcript_id',
'description',
'chromosome_name',
'start_position',
'end_position',
'strand','mgi_symbol','entrezgene'),mart = mart)
Log in to answer this question.
Hi,
I have not used "biomart" from last 2-3 months. But here is something which I was using to play around-
Thanks!
let me be more specific - my goal is to download all FASTA sequences under the following conditions:
dataSet - hsapiensgeneensembl filter - gene type - protein coding attributes : ensembl gene id, ensembl transcript id, associated gene name, chromosome name, strand, transcript start.
under sequences: 5' UTR, 3000 bp upstream flank
in ensembl->biomart I got 21976/57945 matches and downloaded it a gz fasta file.
I wish to do this in biomaRt bioconductor in R.
I tried to do it with getSequence function but I dont know how to retrieve all sequences in hsapiens.
Thanks a lot,
tom
You just have to play around with the parameters for a while:
Get all genes for current release (GRCh38 on current date, June 16, 2019)
Then, obtain the 5UTR sequencs for genes based on their HGNC symbol:
If you want bases up- or down-stream of the UTR, you can either try the functionality within
getSequence()(seeupstreamanddownstreamparameters), OR, you can obtain the 5UTR co-ordinates from the originalgetBM()function (above), add 3000bp to these, and then usegetSequence()withoutid, like this:use a star in the values field (I need only entrezID but you can add more here)
Did not work for me; see my answer.