From f55f4be417965ef25104337075dfdddeaf4963f2 Mon Sep 17 00:00:00 2001 From: Magali Ruffier <mr6@ebi.ac.uk> Date: Thu, 28 Aug 2014 12:06:07 +0100 Subject: [PATCH] add not_dna flag to avoid storing sequence if it is not a dna database --- modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm index d767823097..320f693289 100644 --- a/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm @@ -1953,6 +1953,7 @@ sub store { my $self = shift; my $slice = shift; my $seqref = shift; + my $not_dna = shift; # # Get all of the sanity checks out of the way before storing anything @@ -1985,7 +1986,7 @@ sub store { throw("Slice must have valid seq region name."); } - if($cs->is_sequence_level()) { + if($cs->is_sequence_level() && !$not_dna) { if(!$seqref) { throw("Must provide sequence for sequence level coord system."); } @@ -2022,7 +2023,7 @@ sub store { throw("Database seq_region insertion failed."); } - if($cs->is_sequence_level()) { + if($cs->is_sequence_level() && !$not_dna) { #store sequence if it was provided my $seq_adaptor = $db->get_SequenceAdaptor(); $seq_adaptor->store($seq_region_id, $$seqref); -- GitLab