Move features to dataset
[jalview.git] / src / jalview / datamodel / Sequence.java
index dee67d3..0225c88 100755 (executable)
@@ -351,7 +351,7 @@ public class Sequence implements SequenceI
       if (seq=="")
         return null;
       int nstart = findPosition(start);
-      int nend=findPosition(end-1)-1;
+      int nend=findPosition(end)-1;
       // JBPNote - this is an incomplete copy.
       SequenceI nseq = new Sequence(this.getName(), seq, nstart, nend);
       nseq.setDatasetSequence(getDatasetSequence());
@@ -710,4 +710,12 @@ public class Sequence implements SequenceI
      sequence = newSeq.toString();
     }
 
+  public SequenceI getSubSequence(int start)
+  {
+    int e=getLength();
+    if (start>=e)
+      return null;
+    return getSubSequence(start, getLength());
+  }
+
 }