1
$\begingroup$

I need 18S rRNA gene sequences for a wide variety of eukaryotic species.
I know that Ensembl has this gene sequence, but I don't understand what is the correct protocol to download the sequences. I already know the basics of Ensembl's Rest API, but there are still a few things that I don't understand.

I only know the gene name (18S rRNA) and the list of taxa I want to select it from. But I do not know the region of the gene.

For example: I tried looking for '18srrna' on the Ensembl browser and I noticed that for the Fruit fly there are 2 sequences corresponding to this gene (Ensembl IDs: FBgn0085813 and FBgn0267521).

  1. How do I know which sequence I should use to make an alignment with other species?
  2. How can I batch download the same region for all the species of interest?
  3. Do you know any protocol/guide that goes into detail of how to download and select sequences to make phylogenies?

I don't have a solution for question (1) but for question (2) I am planning on requesting from the API the output of the endpoint GET sequence/region/:species/:region. But then again the problem is that I would need the position of the region for each species, and it sounds unfeasible to do for more than a dozen of species.

$\endgroup$
2
  • $\begingroup$ Hi @Mirk. I'll answer over the weekend if no-one else does. You wrote, "eucariotic" do you mean eukaryotes? $\endgroup$
    – M__
    Commented Mar 20 at 15:56
  • 1
    $\begingroup$ Yes, sorry I did a spelling mistake but now I corrected it. Thanks for pointing it out. $\endgroup$
    – Mirk
    Commented Mar 20 at 16:22

2 Answers 2

2
$\begingroup$

I can suggest two ways to batch-download aligned sequences for the species of interest. Both ways are integral to the Ensembl database and toolsets.

But before that, I suggest FBgn0085802 (which is rRNA) instead of FBgn0085813 and FBgn0267521 (which are pseudogenes). You may check FlyBase database.

  1. Metazoa Ensembl is preferable Since you are interested in Fruit fly 18S rRNA homologs. You query Ensembl ID in the Ensembl search box (at www.metazoa.ensembl.org) and click the popping link. 18SrRNA:CR41548 comes for FBgn0085802. On the left-hand side, Gene-based displays, select Sequence. under the Marked-up sequence, pick "BLAST this sequence".

Opening the BLAST/BLAT search automatically sets a DNA alignment query. You may search against the species of interest and add "18S" as Description. Later, run without changing any other parameter. It may take several minutes. Then, view results for hits found. You can investigate Sequence/s with the best alignment and closest genomic locations, then export data in FASTA or other formats.

While this assures you of the alignment and lets you investigate in detail the homologs, you may not batch-download particularly in this way.

  1. As mentioned, BioMart Restful API is a way to batch-download sequences that you want. The website does only allow one search at a moment but editing the Perl script, which is generated according to your query, you may get sequences for multiple datasets. For setup, you should follow BioMart Perl API guideline cautiosly.

For your example query, set proper datasets, filters and attributes. Again for fruit fly, you may refer to:

https://www.metazoa.ensembl.org/info/data/biomart/biomart_perl_api.html

My example query seems like below in popping Perl script:

$query->setDataset("dyakuba_eg_gene"); 
$query->addFilter("with_dmelanogaster_eg_homolog", ["Only"]);
$query->addFilter("biotype", ["rRNA"]);
$query->addFilter("transcript_biotype", ["rRNA"]);
$query->addAttribute("ensembl_gene_id");
$query->addAttribute("ensembl_transcript_id");
$query->addAttribute("gene_biotype");
$query->addAttribute("description");
$query->addAttribute("transcript_biotype");
$\endgroup$
1
$\begingroup$
  • How do I know which sequence I should use to make an alignment with other species?

Use both. For fruit flies there should thousands of 18S sequences.

  • How can I batch download the same region for all the species of interest?

Using Blast (below)

  • Do you know any protocol/guide that goes into detail of how to download and select sequences to make phylogenies?

Sure - Blast ... align via muscle -super5 and build via IQ-TREE

EMBL I don't know - using REST API via a CLI is possible. The problem is that you could potentially 1000s of 18S genes but a simple search term can ignore everything that isn't part of a genome explicitly labelled "18S". Thats where a Blast style approach is useful.

However, for NCBI Blast they intentionally block access to CLI with >100 hits requested. This is a complete pain and really, really limits using Blast to extract out a gene remotely using a remote request script.

Basically the way to do it is to ditch the API and run this via the Blast NCBI web interface, or download the entire eukaryotic database and perform local Blast, MMseqs2 or Minimap2.

It's a bit bizarre I know, NCBI just doesn't like bots running its Blast service, but it gives more permission to use its web-service. The central advantage is that Blast will nicely remove the 18S gene from any given genome which can be downloaded as a single locus, without needing to download loads of genome stuff thats not needed. NCBI still does impose a limit on how much can be blasted via the web which sadly now is only 5000 (I'm sure it was much more like 50000) and its really not cool.

What you can do is use the Blast search "exclude/include" parameters to target the taxa of interest within the 5000 limit and using a tree of relevant eukaryotic evolution navigate the data sets. I assume you are looking for around 100000 sequences. Basically, once you've blasted you have the option of downloading just the region blasted and nothing else ... or the whole genome (avoid this option)... you will then have 5000 nicely 18S genes excised in silico

You can also set a lot other blast parameters, in particular only considering full length hits.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.