From 5ede8fe9bb0f8188633f33e1885d0988a180f722 Mon Sep 17 00:00:00 2001
From: Stephen Searle <searle@sanger.ac.uk>
Date: Wed, 25 Oct 2006 15:57:25 +0000
Subject: [PATCH] Modified split_Slice so it can handle slices which don't
 start at 1, for example HAP or PAR slices

---
 modules/Bio/EnsEMBL/Utils/Slice.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/Bio/EnsEMBL/Utils/Slice.pm b/modules/Bio/EnsEMBL/Utils/Slice.pm
index 4b52c22264..1674bb009f 100644
--- a/modules/Bio/EnsEMBL/Utils/Slice.pm
+++ b/modules/Bio/EnsEMBL/Utils/Slice.pm
@@ -76,7 +76,7 @@ sub split_Slices{
 
   foreach my $slice (@$slice_big){
 
-    my $start = 1;
+    my $start = $slice->start;
     my $end;
     my $multiple;
     my $number;
@@ -106,7 +106,7 @@ sub split_Slices{
       $end = $start + $multiple + $overlap;
 
       #any remainder gets added to the last slice of the seq_region
-      $end = $length if($i == $number-1);
+      $end = $slice->end if($i == $number-1);
 
       push @out, Bio::EnsEMBL::Slice->new
         (-START             => $start,
-- 
GitLab