[ensembl-dev] error message compara API

Matthieu Muffato muffato at ebi.ac.uk
Tue Feb 16 17:36:34 GMT 2016


Hi Nathalie,

The code is sound, but it seems that $mouse_slice is sometimes 
undefined. I wonder which genes you are querying, and whether some of 
them could be on unanchored scaffolds (e.g. GL456210.1 , see 
http://www.ensembl.org/Mus_musculus/Location/View?r=GL456210.1:7643-60662;db=core 
)

If this is the case, the first parameter of 
$mouse_slice_adaptor->fetch_by_region() should be "scaffold" for them. 
In order to be able to pick chromosomes *and* scaffolds, you could in 
fact set it to undef and let the API find the right kind.
Another, more straightforward, way of getting the slice of a Gene is to do:
   my $mouse_slice = $gene->feature_Slice()
instead of calling fetch_by_region(). This is essentially the same, but 
done by the API itself

Matthieu

On 15/02/16 18:39, nconte wrote:
> Hi,
> I am trying to link genomic blocks between mouse and human. The script
> will start and then will stop and throw an error,  I am not sure why
> -------------------- EXCEPTION --------------------
> MSG: [] should be a Bio::EnsEMBL::Slice object
>
> STACK
> Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::fetch_all_by_MethodLinkSpeciesSet_Slice
> /net/isilon5/ma/home/nconte/src/ensembl-compara/modules/Bio/EnsEMBL/Compara/DBSQL/Geno
>
> micAlignBlockAdaptor.pm:526
> STACK toplevel ./Ortho_mouse_human.pl:125
> Date (localtime)    = Mon Feb 15 17:31:12 2016
> Ensembl API version = 83
> ---------------------------------------------------
>
> This is the bit in the script where the error points at:
>
> my $method_link_species_set_adaptor =
>      Bio::EnsEMBL::Registry->get_adaptor(
>        "Multi", "compara", "MethodLinkSpeciesSet");
> my $methodLinkSpeciesSet = $method_link_species_set_adaptor->
>      fetch_by_method_link_type_species_set_name("EPO", "mammals");
> my $mouse_slice_adaptor =
>      Bio::EnsEMBL::Registry->get_adaptor(
>        "$non_ref_name", "core", "Slice");
>
> my $gab_adaptor = Bio::EnsEMBL::Registry->get_adaptor(
>          'Multi', 'compara', 'GenomicAlignBlock');
>
> # this is where I create the mouse slice from a gene object
> my $mouse_chromosome= $gene->seq_region_name;
> my $mouse_start= $gene->seq_region_start;
> my $mouse_end= $gene->seq_region_end;
> my $mouse_slice = $mouse_slice_adaptor->fetch_by_region(
>      "chromosome", $mouse_chromosome, $mouse_start, $mouse_end);
>
> my $all_genomic_align_blocks = $gab_adaptor->
> fetch_all_by_MethodLinkSpeciesSet_Slice($methodLinkSpeciesSet,
> $mouse_slice); #method to link genomics blocks between species
>
> Then the script continues  to get other type of features from the align
> block. The error message point at the
> fetch_all_by_MethodLinkSpeciesSet_Slice stating I should use
> Bio::EnsEMBL::Slice object which I do, $mouse_slice is a slice object. I
> am not sure if this is the reason why the scripts stops but this is the
> only error message in the error file. This script was working on a
> previous ensembl version (79).
> the output file show this
> Exited with exit code 255.
>
> Resource usage summary:
>
>      CPU time :               267.21 sec.
>      Max Memory :             162 MB
>      Average Memory :         155.47 MB
>
>
> Thanks for any tips.
> Nathalie
>
>
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info:
> http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/

-- 
Matthieu Muffato, Ph.D.
Ensembl Compara and TreeFam Project Leader
European Bioinformatics Institute (EMBL-EBI)
European Molecular Biology Laboratory
Wellcome Trust Genome Campus, Hinxton
Cambridge, CB10 1SD, United Kingdom
Room  A3-145
Phone + 44 (0) 1223 49 4631
Fax   + 44 (0) 1223 49 4468




More information about the Dev mailing list