<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>-&gt;<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>-&gt;<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> &gt; 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>-&gt;<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>-&gt;<SPAN id=method>start</SPAN><SPAN id=braces>(</SPAN> <SPAN id=var>$seq</SPAN>-&gt;<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>-&gt;<SPAN id=method>start</SPAN><SPAN id=braces>(</SPAN> <SPAN id=var>$seq</SPAN>-&gt;<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>-&gt;<SPAN id=method>end</SPAN><SPAN id=braces>(</SPAN> <SPAN id=var>$new_seq</SPAN>-&gt;<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>-&gt;<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>-&gt;<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>&nbsp;&nbsp;<BR>&nbsp;&nbsp;if ($start &gt; 1) {<BR>&nbsp;&nbsp;&nbsp;my $pre_start_seq = $seq-&gt;subseq(1, $start - 1);<BR>&nbsp;&nbsp;&nbsp;$pre_start_seq =~ s/\W//g;<BR>&nbsp;&nbsp;&nbsp;if ($seq-&gt;strand &gt; 0){<BR>&nbsp;&nbsp;&nbsp;&nbsp;$new_seq-&gt;start( $seq-&gt;start + CORE::length($pre_start_seq) );<BR>&nbsp;&nbsp;&nbsp;} else {<BR>&nbsp;&nbsp;&nbsp;&nbsp;$new_seq-&gt;start( $seq-&gt;end - CORE::length($pre_start_seq) - CORE::length($slice_seq) + 1);<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;} else {<BR>&nbsp;&nbsp;&nbsp;$new_seq-&gt;start( $seq-&gt;start);<BR>&nbsp;&nbsp;}<BR>&nbsp;&nbsp;$new_seq-&gt;end( $new_seq-&gt;start + CORE::length($slice_seq) - 1 );</SPAN></P>
<P><SPAN></SPAN>&nbsp;</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>