[ensembl-dev] fetch all within species paralogous genes

Matthieu Muffato muffato at ebi.ac.uk
Tue Apr 17 14:17:45 BST 2012

Dear Shaohua

The most efficient way is probably to use the fetch_all_by_MethodLinkSpeciesSet_orthology_type() method from the HomologyAdaptor

You first have to create a MethodLinkSpeciesSet object
my $mlss_adaptor = $reg->get_adaptor("Multi", "compara", "MethodLinkSpeciesSet");
my $mlss = $mlss_adaptor->fetch_by_method_link_type_registry_aliases("ENSEMBL_PARALOGUES", ["human"]);
This object describes which kind of data you want, and on which species

Then, you can retrieve the homologies:
my $homology_adaptor = $reg->get_adaptor("Multi", "compara", "Homology");
my $all_paralogues = $homology_adaptor->fetch_all_by_MethodLinkSpeciesSet_orthology_type($mlss, "within_species_paralog");

This method can be extended to orthologues and to pairs of species. It is the fastest when it comes to fetch big sets of homologues

Hope this helps,

On 17/04/12 10:45, shaohua fan wrote:
> Dear all,
> As a newbie of Ensembl compara API, I want to ask whether there is a way to fetch all the within species paralogous genes of one specified genome by using the compara API? I have searched the former emails and Ensembl website and only found the solution for the single gene in the tutorial of compara API.
> Thanks a lot!
> shaohua

More information about the Dev mailing list