BufferedReader in = new BufferedReader(new FileReader(file));\r
SequenceI seq = null;\r
String line, type, desc, token;\r
- UserColourScheme ucs;\r
+\r
int index, start, end;\r
StringTokenizer st;\r
SequenceFeature sf;\r
{\r
lineNo++;\r
st = new StringTokenizer(line, "\t");\r
- if (st.countTokens() != 7)\r
+ if (st.countTokens() == 2)\r
{\r
- System.out.println("Groups file " + file +\r
- " is invalid. Read help file.\nLine: \n"\r
- +lineNo +": "+line);\r
- break;\r
+ type = st.nextToken();\r
+ UserColourScheme ucs = new UserColourScheme(st.nextToken());\r
+ fr.setColour(type, ucs.findColour("A"));\r
+ continue;\r
}\r
\r
while (st.hasMoreElements())\r
{\r
- type = st.nextToken();\r
desc = st.nextToken();\r
token = st.nextToken();\r
if (!token.equals("ID_NOT_SPECIFIED"))\r
\r
start = Integer.parseInt(st.nextToken());\r
end = Integer.parseInt(st.nextToken());\r
- ucs = new UserColourScheme(st.nextToken());\r
\r
seq = viewport.alignment.getSequenceAt(index);\r
start = seq.findIndex(start) - 1;\r
end = seq.findIndex(end) - 1;\r
\r
+ type = st.nextToken();\r
+\r
sf = new SequenceFeature(type, desc, "", start, end);\r
- fr.setColour(type, ucs.findColour("A"));\r
\r
seq.addSequenceFeature(sf);\r
\r