can not define "mart".... biomaRt
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
>
• 7,710 views
•
link
1 answer
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)
• 0 views
•
link
Log in to answer this question.
You should select a dataset first. See
?useMartfor more information.But I defined the data set as homo sapiens....? took a look at the
?useMartand it tells me to do exactly what I'm doing...That would have never happened if instead of BioMart they would have called it BioSmart :)