[ensembl-dev] genomic_align id on Compara API 67

Sophie Marion de Procé sophie.m2p at gmail.com
Wed Jul 1 16:54:51 BST 2015

Dear all,

I'm trying to obtain genomic_align objects using EPO mammals alignments
from Compara, with the API 67.
My aim is to look at the genomic_align_blocks and see if they are
contiguous for a specific set of species. To group the genomic_align
objects within a genomic_align_block, I've tried to use the
$genomic_align_block->dbID() and
$genomic_align_block->reference_genomic_align_id() functions, as well as
the $genomic_align->genomic_align_block_id function.
These seem to give the sort of id I need, however, regardless of the method
I use, I do no get an id for the first and last genomic_align of each
The error message is always something like "Use of uninitialized value
$dbID in concatenation (.) or string"

Could you please tell me what I'm doing wrong? Or suggest another way to
achieve this?

Below is a snippet of my code.

Many thanks,

my $genomic_align_blocks =
my @species = ("human","dog","mouse");
foreach my $givenSp (@species) {
foreach my $genomic_align_block (@$genomic_align_blocks) {
my $dbID = $genomic_align_block->dbID();
my $refID = $genomic_align_block->reference_genomic_align_id();
my $genomic_aligns = $genomic_align_block->get_all_GenomicAligns();
BLOCK: foreach my $genomic_align (@$genomic_aligns) {
my $dnafrag = $genomic_align->dnafrag;
my $genomic_align_dbID = $genomic_align->dbID;
my $genome_db = $genomic_align->genome_db;
my $gabID = $genomic_align->genomic_align_block_id;
my $species = $genome_db->name;
next BLOCK if ($species ne $givenSp);
$countSpBlocks{$species} = $nbBlocks;
my $chr = $dnafrag->name;
my $start = $genomic_align->dnafrag_start;
my $end = $genomic_align->dnafrag_end;
my $strand = $genomic_align->dnafrag_strand;
my $name = $dnafrag->name();
my $sizeBlock = $end - $start + 1;
print ("$species\t$start\t$end\t$strand\t$name\t$sizeBlock\t$gabID\t");
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20150701/3661e202/attachment.html>

More information about the Dev mailing list