\r
return this.sequence.substring(start, end);\r
}\r
-\r
+ /**\r
+ * make a new Sequence object from start to end (including gaps) over this seqeunce\r
+ * @param start int\r
+ * @param end int\r
+ * @return SequenceI\r
+ */\r
+ public SequenceI getSubSequence(int start, int end) {\r
+ if (start<0)\r
+ start = 0;\r
+ String seq = getSequence(start, end);\r
+ if (seq=="")\r
+ return null;\r
+ start = findPosition(start);\r
+ end=findPosition(end);\r
+ // JBPNote - this is an incomplete copy.\r
+ SequenceI nseq = new Sequence(this.getName(), seq, start, end);\r
+ nseq.setDatasetSequence(getDatasetSequence());\r
+ return nseq;\r
+ }\r
/**\r
* DOCUMENT ME!\r
*\r
* @return DOCUMENT ME!\r
*/\r
public String getSequence(int start, int end);\r
-\r
+ /**\r
+ * create a new sequence object from start to end of this sequence\r
+ * @param start int\r
+ * @param end int\r
+ * @return SequenceI\r
+ */\r
+ public SequenceI getSubSequence(int start, int end);\r
/**\r
* DOCUMENT ME!\r
*\r