[ensembl-dev] extracting human mouse between species out paralogs

Stamboulian, Mouses Hrag mstambou at indiana.edu
Thu Oct 8 00:29:38 BST 2015


Hi,


Im trying to extract the human mouse between species out-paralogs. I tried using the GUI through ensemble biomart however could not able to extract the needed data because when I select homo sapiens as my dataset and then select homologs as the attribute, in the paralogs sections I only have options to select the human paralogs (i.e. within species paralogs) however no options for between species paralogs were found.


Furthermore I tried extracting the data through the perl API. In doing  so I tried too modify this script (please find below). In doing so I tried to change the parameter at the bolded line in the code, in the fetch_by_method_link_type_registry_aliases(), by replacing the 'ENSEMBL_ORTHOLOGUES' by 'ENSEMBL_PARALOGUES' or 'ENSEMBLE_HOMOLOGUES'  hoping it would return paralogs or all the homologs in general. However it failed to do that. I could not find what other parameters I could pass to this method instead of 'ENSEMBL_ORTHOLOGUES' , as I could not find it in your documentation present here: http://www.ensembl.org/info/docs/Doxygen/compara-api/classBio_1_1EnsEMBL_1_1Compara_1_1DBSQL_1_1MethodLinkSpeciesSetAdaptor.html#aeb42739559569b62ee3bfab6da764976?


my question is what would be a script to retrieve such data?  Help please. Thank you


use strict;
use warnings;

use Bio::EnsEMBL::Registry;

## Load the registry automatically
my $reg = "Bio::EnsEMBL::Registry";
$reg->load_registry_from_url('mysql://anonymous@ensembldb.ensembl.org');

## Get the compara mlss adaptor
my $mlss_adaptor = $reg->get_adaptor("Multi", "compara", "MethodLinkSpeciesSet");

## Get the compara homology adaptor
my $homology_adaptor = $reg->get_adaptor("Multi", "compara", "Homology");

## Species definition
my $species1 = 'human';
my $species2 = 'mouse';

## Get the MethodLinkSpeciesSet object describing the orthology between the two species
my $this_mlss = $mlss_adaptor->fetch_by_method_link_type_registry_aliases('ENSEMBL_ORTHOLOGUES', [$species1, $species2]);

## Get all the homologues
my $all_homologies = $homology_adaptor->fetch_all_by_MethodLinkSpeciesSet($this_mlss);

## For each homology
my $count = 0;
foreach my $this_homology (@{$all_homologies}) {

  ## only keeps the one2one
  if ($this_homology->description() eq 'ortholog_one2one') {
    $count++;
  }
}

print "There are $count 1-to-1 orthologues between $species1 and $species2\n";

## Alternative (shorter) version
my $all_one2one = $homology_adaptor->fetch_all_by_MethodLinkSpeciesSet($this_mlss, -orthology_type => 'ortholog_one2one');

print "It should be the same number as: ", scalar(@{$all_one2one}), "\n";
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20151007/7f92e6ad/attachment.html>


More information about the Dev mailing list