Parse name from last index of /
authoramwaterhouse <Andrew Waterhouse>
Fri, 18 Nov 2005 10:24:38 +0000 (10:24 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 18 Nov 2005 10:24:38 +0000 (10:24 +0000)
src/jalview/datamodel/Sequence.java

index 0002200..df7345a 100755 (executable)
@@ -58,14 +58,12 @@ public class Sequence implements SequenceI
     public Sequence(String name, String sequence, int start, int end)\r
     {\r
       this.name = name;\r
+      this.sequence = sequence;\r
       this.start = start;\r
       this.end = end;\r
 \r
       parseId();\r
 \r
-      this.sequence = sequence;\r
-\r
-\r
       checkValidRange();\r
     }\r
 \r
@@ -114,7 +112,7 @@ public class Sequence implements SequenceI
 \r
              // If we're still in this loop, parsing of start and end was ok\r
              // Therefore remove it from the sequence name\r
-             name = name.substring(0, name.indexOf("/"));\r
+             name = name.substring(0, name.lastIndexOf("/"));\r
            }\r
            catch (NumberFormatException ex)\r
            {\r