end position not correctly set.
authorjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 28 Jun 2007 14:12:30 +0000 (14:12 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 28 Jun 2007 14:12:30 +0000 (14:12 +0000)
git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@408 be28352e-c001-0410-b1a7-c7978e42abec

src/uk/ac/vamsas/objects/utils/Seq.java

index ec279a1..7c82d82 100644 (file)
@@ -95,12 +95,12 @@ public class Seq {
       asq.setName(name);
       asq.setSequence(alSequence);
       asq.setRefid(refseq);
+      if (end>refseq.getEnd() || end<start || end==-1)
+        end = refseq.getEnd();
+      asq.setEnd(end);
       if (start<refseq.getStart())
         start = refseq.getStart();
       asq.setStart(start);
-      if (end>refseq.getEnd())
-        end = refseq.getEnd();
-      asq.setEnd(end);
       return asq;
     }
     return null;