<BR>
<P>Hi there,</P>
<P>it's the original code when calculate the start of the sliced LocatableSeq</P><SPAN id=comment><PRE>        <SPAN id=perlKey>my</SPAN> <SPAN id=var>$slice_seq</SPAN> = <SPAN id=var>$seq</SPAN>-><SPAN id=method>subseq</SPAN><SPAN id=braces>(</SPAN><SPAN id=var>$start</SPAN>, <SPAN id=var>$seq_end</SPAN><SPAN id=braces>)</SPAN>;
        <SPAN id=var>$new_seq</SPAN>-><SPAN id=method>seq</SPAN><SPAN id=braces>(</SPAN> <SPAN id=var>$slice_seq</SPAN> <SPAN id=braces>)</SPAN>;
        <SPAN id=comment># start</SPAN><BR>        <SPAN id=perlKey>if</SPAN> <SPAN id=braces>(</SPAN><SPAN id=var>$start</SPAN> > 1<SPAN id=braces>)</SPAN> <SPAN id=braces>{</SPAN>
         <SPAN id=perlKey>my</SPAN> <SPAN id=var>$pre_start_seq</SPAN> = <SPAN id=var>$seq</SPAN>-><SPAN id=method>subseq</SPAN><SPAN id=braces>(</SPAN>1, <SPAN id=var>$start</SPAN> - 1<SPAN id=braces>)</SPAN>;
         <SPAN id=var>$pre_start_seq</SPAN> =~ <SPAN id=regExp>s/\W//g</SPAN>; <SPAN id=comment>#print "$pre_start_seq\n";</SPAN><BR>         <SPAN id=var>$new_seq</SPAN>-><SPAN id=method>start</SPAN><SPAN id=braces>(</SPAN> <SPAN id=var>$seq</SPAN>-><SPAN id=method>start</SPAN> + <SPAN id=module>CORE</SPAN>::<SPAN id=method>length</SPAN><SPAN id=braces>(</SPAN><SPAN id=var>$pre_start_seq</SPAN><SPAN id=braces>)</SPAN> <SPAN id=braces>)</SPAN>;
        <SPAN id=braces>}</SPAN> <SPAN id=perlKey>else</SPAN> <SPAN id=braces>{</SPAN>
         <SPAN id=var>$new_seq</SPAN>-><SPAN id=method>start</SPAN><SPAN id=braces>(</SPAN> <SPAN id=var>$seq</SPAN>-><SPAN id=method>start</SPAN><SPAN id=braces>)</SPAN>;
        <SPAN id=braces>}</SPAN>
        <SPAN id=comment># end</SPAN><BR>        <SPAN id=var>$slice_seq</SPAN> =~ <SPAN id=regExp>s/\W//g</SPAN>;
        <SPAN id=var>$new_seq</SPAN>-><SPAN id=method>end</SPAN><SPAN id=braces>(</SPAN> <SPAN id=var>$new_seq</SPAN>-><SPAN id=method>start</SPAN> + <SPAN id=module>CORE</SPAN>::<SPAN id=method>length</SPAN><SPAN id=braces>(</SPAN><SPAN id=var>$slice_seq</SPAN><SPAN id=braces>)</SPAN> - 1 <SPAN id=braces>)</SPAN>;</PRE></SPAN>
<P><SPAN>and I think should be like this</SPAN></P>
<P><SPAN><SPAN id=perlKey>my</SPAN> <SPAN id=var>$slice_seq</SPAN> = <SPAN id=var>$seq</SPAN>-><SPAN id=method>subseq</SPAN><SPAN id=braces>(</SPAN><SPAN id=var>$start</SPAN>, <SPAN id=var>$seq_end</SPAN><SPAN id=braces>)</SPAN>;<BR><SPAN id=var>$new_seq</SPAN>-><SPAN id=method>seq</SPAN><SPAN id=braces>(</SPAN> <SPAN id=var>$slice_seq</SPAN> <SPAN id=braces>)</SPAN>;<BR></SPAN><SPAN>$slice_seq =~ s/\W//g;<BR> <BR> if ($start > 1) {<BR> my $pre_start_seq = $seq->subseq(1, $start - 1);<BR> $pre_start_seq =~ s/\W//g;<BR> if ($seq->strand > 0){<BR> $new_seq->start( $seq->start + CORE::length($pre_start_seq) );<BR> } else {<BR> $new_seq->start( $seq->end - CORE::length($pre_start_seq) - CORE::length($slice_seq) + 1);<BR> }<BR> } else {<BR> $new_seq->start( $seq->start);<BR> }<BR> $new_seq->end( $new_seq->start + CORE::length($slice_seq) - 1 );</SPAN></P>
<P><SPAN></SPAN> </P>
<P><SPAN><SPAN>if it's negative strand, the start is no longer start + length($pre_start_seq).</SPAN></SPAN><SPAN><SPAN></P></SPAN></SPAN>