import jalview.bin.Cache;
import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
+import jalview.datamodel.Annotation;
import jalview.datamodel.HiddenMarkovModel;
import jalview.datamodel.SequenceI;
import jalview.gui.AlignFrame;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
+import java.util.Scanner;
import javax.swing.JOptionPane;
public void readTable() throws IOException
{
-
- /*
BufferedReader br = new BufferedReader(new FileReader(inputTableTemp));
String line = "";
while (!line.startsWith("Query:"))
{
line = br.readLine();
}
- for (int i = 0; i < 4; i++)
+ for (int i = 0; i < 5; i++)
{
- br.readLine();
+ line = br.readLine();
}
-
-
+
int index = 0;
- while (!" ------ inclusion threshold ------".equals(line))
+ while (!" ------ inclusion threshold ------".equals(line)
+ && !"".equals(line))
{
Scanner scanner = new Scanner(line);
String str = scanner.next();
- AlignmentAnnotation annots = new AlignmentAnnotation("", "", null);
- annots.setScore(Double.parseDouble(str));
- seqs[index].addAlignmentAnnotation(annots);
+ Annotation[] annots = new Annotation[seqs[index].getLength()];
+ for (Annotation an : annots)
+ {
+ an = new Annotation(Float.parseFloat(str));
+ }
+ AlignmentAnnotation annot = new AlignmentAnnotation("E-value",
+ "Score", annots);
+ annot.setScore(Double.parseDouble(str));
+ annot.setSequenceRef(seqs[index]);
+ seqs[index].addAlignmentAnnotation(annot);
scanner.close();
+ line = br.readLine();
+ index++;
}
br.close();
- */
-
}
+
}