Vector conf;
Hashtable Scores; // Hash of names and score vectors
Hashtable Symscores; // indexes of symbol annotation properties in sequenceI vector
+ private int QuerySeqPosition;
+ public void setQuerySeqPosition(int QuerySeqPosition)
+ {
+ this.QuerySeqPosition = QuerySeqPosition;
+ }
+
+ public int getQuerySeqPosition()
+ {
+ return QuerySeqPosition;
+ }
+ public Hashtable getScores() {
+ return Scores;
+ }
+ public Hashtable getSymscores() {
+ return Symscores;
+ }
+
public JPredFile(String inStr)
{
super(inStr);
super.initData();
Scores = new Hashtable();
+ ids = null;
+ conf = null;
}
public JPredFile(String inFile, String type)
/**
* parse a JPred concise file into a sequence-alignment like object.
*/
-
public void parse()
throws IOException
{
-
+ // JBPNote log.System.out.println("all read in ");
String line;
-
+ QuerySeqPosition = -1;
noSeqs = 0;
Vector seq_entries = new Vector();
Vector ids = new Vector();
// Concise format allows no comments or non comma-formatted data
StringTokenizer str = new StringTokenizer(line, ":");
String id = "";
- String seq = "";
if (!str.hasMoreTokens())
{
continue;
Float score = new Float(ascore);
scores.addElement( (Object) score);
}
+ Scores.put(id, scores);
}
catch (Exception e)
{
}
Scores.put(id, scores);
}
- } else
- if (id.equals("jnetconf"))
+ }
+ else if (id.equals("jnetconf"))
{
+ // log.debug System.out.println("here");
id = "Prediction Confidence";
this.conf = new Vector(numSymbols);
for (int i = 0; i < numSymbols; i++)
else
{
// Sequence or a prediction string (rendered as sequence)
-
+
StringBuffer newseq = new StringBuffer();
-
+
for (int i = 0; i < numSymbols; i++) {
newseq.append(symbols.nextToken());
}
-
+
if (id.indexOf(";") > -1) {
seq_entries.addElement(newseq);
int i=1;
name = id.substring(id.indexOf(";")+1)+"_"+1;
}
ids.addElement(name);
+
noSeqs++;
}
else
ids.elementAt(i).toString()
+ ") has an unexpected number of columns");
}
+ if (newSeq.getName().startsWith("QUERY") && QuerySeqPosition==-1) {
+ QuerySeqPosition = seqs.size();
+ }
+
seqs.addElement(newSeq);
}
}
catch (java.io.IOException e)
{
- System.out.println("Exception " + e);
+ System.err.println("Exception " + e);
e.printStackTrace();
}
}