+ ids.addElement(name);
+
+ noSeqs++;
+ }
+ else
+ {
+ if (id.equals("JNETPRED"))
+ {
+ id = "Predicted Secondary Structure";
+ }
+
+ seq_entries.addElement(newseq.toString());
+ ids.addElement(id);
+ Symscores.put((Object) id,
+ (Object) new Integer(ids.size() - 1));
+ }
+ }
+ }
+ /* leave it to the parser user to actually check this.
+ if (noSeqs < 1)
+ {
+ throw new IOException(
+ "JpredFile Parser: No sequence in the prediction!");
+ }*/
+
+ maxLength = seq_entries.elementAt(0).toString().length();
+
+ for (int i = 0; i < ids.size(); i++)
+ {
+ // Add all sequence like objects
+ Sequence newSeq = new Sequence(ids.elementAt(i).toString(),
+ seq_entries.elementAt(i).toString(), 1,
+ seq_entries.elementAt(i).toString().length());
+
+
+ if (maxLength != seq_entries.elementAt(i).toString().length())
+ {
+ throw new IOException("JPredConcise: Entry (" +
+ ids.elementAt(i).toString() +
+ ") has an unexpected number of columns");
+ }
+
+ if (newSeq.getName().startsWith("QUERY") &&
+ (QuerySeqPosition == -1))
+ {
+ QuerySeqPosition = seqs.size();
+ }
+
+ seqs.addElement(newSeq);
+ }
+ }