Unverified Commit 906f3ff8 authored by s-mm's avatar s-mm Committed by GitHub

Merge pull request #116 from Ensembl/Bugfix/ClonesLocusError

Processing case with only one locus entry
parents f83d0ba2 79fd59d8
......@@ -259,6 +259,15 @@ sub init_AceDatabase {
my ($locus_key, $transcript_key, $exon_hash);
my $xml_string = $self->Client->get_region_xml($self->slice);
my $xml_data = XMLin($xml_string);
#Sometimes we don't have array of locus entries, but only one hash ref. So here we convert it to array
if($xml_data->{sequence_set}->{locus}->{name}) {
my $locus_entry = $xml_data->{sequence_set}->{locus};
my $locus_name = $xml_data->{sequence_set}->{locus}->{name};
$xml_data->{sequence_set}->{locus} = {};
$xml_data->{sequence_set}->{locus}->{$locus_name} = $locus_entry;
}
foreach $locus_key(keys %{$xml_data->{sequence_set}->{locus}}) {
if (exists($xml_data->{sequence_set}->{locus}->{$locus_key}->{transcript}->{exon_set})) {
$exon_hash = $xml_data->{sequence_set}->{locus}->{$locus_key}->{transcript}->{exon_set};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment