Skip to content
Snippets Groups Projects
Commit 4d4bdfa5 authored by Andy Yates's avatar Andy Yates
Browse files

Fixes for the alt alleles code. We needed to make sure we used the right...

Fixes for the alt alleles code. We needed to make sure we used the right variables in the code. Also needed to make sure an array is actually defined during construction
parent af5057c8
No related branches found
No related tags found
No related merge requests found
......@@ -99,12 +99,12 @@ my %no_gene_id;
my @new_groups;
foreach my $group (@{$vega_groups}) {
my $members = $group->get_all_Genes_types();
my $new_core_group = undef;
my $new_core_group = Bio::EnsEMBL::AltAlleleGroup->new();
foreach my $member (@{$members}) {
my ($vega_gene, $attribs_hash) = @{$member};
if(exists $vega_to_ensembl_core_gene_id{$vega_gene->stable_id()}) {
$new_core_group ||= Bio::EnsEMBL::AltAlleleGroup->new(); # initalise if we don't already have one
foreach my $gene_id (keys %{$vega_to_ens_id{$vega_stable_id}} ) {
my $vega_stable_id = $vega_gene->stable_id();
if(exists $vega_to_ensembl_core_gene_id{$vega_stable_id}) {
foreach my $gene_id (keys %{$vega_to_ensembl_core_gene_id{$vega_stable_id}} ) {
#Add each gene in. If we had a 1:m relationship then we copy the attribute already assigned
#across
$new_core_group->add_member($gene_id, $attribs_hash);
......@@ -115,7 +115,9 @@ foreach my $group (@{$vega_groups}) {
print STDERR "no ensembl gene_id found for vega stable id $vega_stable_id in core\n";
}
}
push(@new_groups, $new_core_group);
if($new_core_group->size() > 0) {
push(@new_groups, $new_core_group);
}
}
#
......
......@@ -131,7 +131,7 @@ sub new {
my $self = $class->SUPER::new(@_);
my ( $list ) = rearrange( [ 'MEMBERS'], @_ );
$self->{'MEMBERS'} = $list;
$self->{'MEMBERS'} = $list || [];
return $self;
}
......
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