while (!" ------ inclusion threshold ------".equals(line)
&& !"".equals(line))
{
- SequenceI seq = seqs[index];
Scanner scanner = new Scanner(line);
String evalue = scanner.next();
String score = scanner.next();
+ checkSequenceOrder(index, scanner);
+ SequenceI seq = seqs[index];
addScoreAnnotations(evalue, score, seq);
scanner.close();
line = br.readLine();
}
}
+ private void checkSequenceOrder(int index, Scanner scanner)
+ {
+ String seqName = null;
+
+ for (int i = 0; i < 8; i++)
+ {
+ seqName = scanner.next();
+ }
+
+ if (!seqs[index].getName().equals(seqName))
+ {
+ SequenceI temp = seqs[index];
+
+ for (int j = 0; j < seqs.length; j++)
+ {
+ if (seqs[j].getName().equals(seqName))
+ {
+ seqs[index] = seqs[j];
+ seqs[j] = temp;
+ break;
+ }
+ }
+ }
+ }
+
}
while (!" ------ inclusion threshold ------".equals(line)
&& !"".equals(line))
{
- SequenceI seq = seqs[index];
Scanner scanner = new Scanner(line);
String evalue = scanner.next();
evalue = scanner.next();
+ checkSequenceOrder(index, scanner);
+ SequenceI seq = seqs[index];
String score = scanner.next();
addScoreAnnotations(evalue, score, seq);
scanner.close();
br.close();
}
+ private void checkSequenceOrder(int index, Scanner scanner)
+ {
+ String seqName = null;
+
+ for (int i = 0; i < 8; i++)
+ {
+ seqName = scanner.next();
+ }
+
+ if (!seqs[index + 1].getName().equals(seqName))
+ {
+ SequenceI temp = seqs[index + 1];
+
+ for (int j = 0; j < seqs.length; j++)
+ {
+ if (seqs[j].getName().equals(seqName))
+ {
+ seqs[index + 1] = seqs[j];
+ seqs[j] = temp;
+ break;
+ }
+ }
+ }
+ }
+
protected void addScoreAnnotations(String eValue, String bitScore,
SequenceI seq)
{