Question: can not define "mart".... biomaRt
0
gravatar for chrisclarkson100
3.1 years ago by
European Union
chrisclarkson10050 wrote:

Trying to request the following info for a csv file called genes command as follows (it won't accept my command to set ensembl as m mart):

useMart(biomart="ensembl", dataset="hsapiens_gene_ensembl")
Object of class 'Mart':
 Using the ensembl BioMart database
 Using the hsapiens_gene_ensembl dataset
> results <- getBM(attributes = c("ensembl_gene_id", "hgnc_symbol"), filters = "hgnc_symbol", values = genes$Genesymbol, mart = ensembl)
Error in martCheck(mart) : 
  No dataset selected, please select a dataset first.  You can see the available datasets by using the listDatasets function see ?listDatasets for more information.  Then you should create the Mart object by using the useMart function.  See ?useMart for more information
> 
R • 1.8k views
ADD COMMENTlink modified 3.1 years ago by Giovanni M Dall'Olio25k • written 3.1 years ago by chrisclarkson10050

You should select a dataset first. See ?useMart for more information. ;-)

ADD REPLYlink written 3.1 years ago by Giovanni M Dall'Olio25k

But i defined the data set as homo sapiens....? took a look at the ?useMart and it tells me to do exactly what im doing...

useMart(biomart="ensembl", dataset="hsapiens_gene_ensembl")
ADD REPLYlink written 3.1 years ago by chrisclarkson10050

That would have never happened if instead of BioMart they would have called it BioSmart :)

ADD REPLYlink written 3.1 years ago by Biojl1.5k
1
gravatar for Giovanni M Dall'Olio
3.1 years ago by
London, UK
Giovanni M Dall'Olio25k wrote:

You need to assign the output of useMart to the ensembl variable:

 

> ensembl = useMart(biomart="ensembl", dataset="hsapiens_gene_ensembl")
> results <- getBM(attributes = c("ensembl_gene_id", "hgnc_symbol"), filters = "hgnc_symbol", values = genes$Genesymbol, mart = ensembl)
ADD COMMENTlink written 3.1 years ago by Giovanni M Dall'Olio25k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1656 users visited in the last hour