Error in martCheck(mart, c("ensembl", "ENSEMBL_MART_ENSEMBL")) : No dataset selected, please select a dataset first.
1
0
Entering edit mode
didemdkn • 0
@didemdkn-23211
Last seen 3.8 years ago

Hello everyone,

I am trying to retrieve exonic-intronic locations and sequences using biomaRt. Basically, I want to retrieve the sequence->exons tab on ensembl BUT FOR A TRANSCRIPT LIST-QUERY

ensembl exons

Thus, I tried to run this code to retrieve exon and intron list to my ensembl transcript list (enstxxxxXXX)

human <- useDataset( "hsapiens_gene_ensembl", mart = useMart(
"ensembl" ) ) mart = useMart("ENSEMBL_MART_ENSEMBL",dataset="hsapiens_gene_ensembl",
 host="www.ensembl.org") 

getSequence(id = ensdf, 
            type="ensembl_transcript_id ",
            seqType="transcript_exon_intron",
            upstream=100, 
          mart=ensembl)

However, it gives an error like:

> Error in martCheck(mart, c("ensembl", "ENSEMBL_MART_ENSEMBL")) : 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

Do you know how to solve this error? Or another way to retrieve intronic locations and sequences?

Thank you so much!

biomart mart ensembl • 2.3k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States

You do two things here. First you set up a mart object and then call getSequence on something that doesn't exist called 'ensembl'. Plus you are doing it in the most convoluted way possible. Instead try

mart <- useEnsembl("ensembl","hsapiens_gene_ensembl", mirror = "useast")
## here I use 'useast' because that's where I am. Choose what is best for  you.
getSequence(id = ensdf, type = "ensembl_transcript_id", seqType = "transcript_exon_intron", upstream = 100, mart = mart)

ADD COMMENT
0
Entering edit mode

I did it!

You helped a lot!

Thank you very much, You just saved my day!

ADD REPLY

Login before adding your answer.

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