From 47ed19f29e8f6419b7f140e5ef14c8d0d3a0e017 Mon Sep 17 00:00:00 2001 From: Daniel Rios <dr2@sanger.ac.uk> Date: Mon, 28 Jul 2008 10:32:06 +0000 Subject: [PATCH] added condition to check for regulatory features only if there is a FuncGen database --- modules/Bio/EnsEMBL/Utils/TranscriptAlleles.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/Bio/EnsEMBL/Utils/TranscriptAlleles.pm b/modules/Bio/EnsEMBL/Utils/TranscriptAlleles.pm index 88637dee35..f6f6cb3154 100644 --- a/modules/Bio/EnsEMBL/Utils/TranscriptAlleles.pm +++ b/modules/Bio/EnsEMBL/Utils/TranscriptAlleles.pm @@ -255,9 +255,8 @@ sub type_variation { } ##to find if a SNP is overlapping with the transcript of the regulatory region, also the SNP should be within 5kb on both side of the transcript, then check whether they overlapping - - if ($tr and ref($tr) and $tr->isa('Bio::EnsEMBL::Transcript')) { - my $dbFunc = $tr->adaptor->db->get_db_adaptor("funcgen"); + my $dbFunc = $tr->adaptor->db->get_db_adaptor("funcgen"); + if ($tr and ref($tr) and $tr->isa('Bio::EnsEMBL::Transcript') and (defined $dbFunc)) { my $efa = $dbFunc->get_ExternalFeatureAdaptor(); my $rfa = $dbFunc->get_RegulatoryFeatureAdaptor(); my @rf; -- GitLab