- if (id.indexOf(";") > -1) {
- seq_entries.addElement(newseq);
- int i=1;
- String name = id.substring(id.indexOf(";")+1);
- while (ids.lastIndexOf(name)>-1) {
- name = id.substring(id.indexOf(";")+1)+"_"+1;
+ if (seqsym.length() != (2 * numSymbols))
+ {
+ // Set of scalars for some property
+ if (Scores.containsKey(id))
+ {
+ int i = 1;
+
+ while (Scores.containsKey(id + "_" + i))
+ {
+ i++;
+ }
+
+ id = id + "_" + i;
+ }
+
+ Vector scores = new Vector();
+
+ // Typecheck from first entry
+ int i = 0;
+ String ascore = "dead";
+
+ try
+ {
+ // store elements as floats...
+ while (symbols.hasMoreTokens())
+ {
+ ascore = symbols.nextToken();
+
+ Float score = new Float(ascore);
+ scores.addElement((Object) score);
+ }
+
+ Scores.put(id, scores);
+ }
+ catch (Exception e)
+ {
+ // or just keep them as strings
+ i = scores.size();
+
+ for (int j = 0; j < i; j++)
+ {
+ scores.setElementAt(
+ (Object) ((Float) scores.elementAt(j)).toString(), j);
+ }
+
+ scores.addElement((Object) ascore);
+
+ while (symbols.hasMoreTokens())
+ {
+ ascore = symbols.nextToken();
+ scores.addElement((Object) ascore);
+ }
+
+ Scores.put(id, scores);
+ }