Hi all!
I have a problems reading the NUC4.2 and 4.4 matrix files with the
SubstitutionMatrix class included in BioJava 1.7.1.
A small example:
File d = new File("/Users/-----/Desktop/NUC");
FiniteAlphabet alphabet = (FiniteAlphabet)
AlphabetManager.alphabetForName("DNA");
try {
@SuppressWarnings("unused")
final SubstitutionMatrix matrix = new
SubstitutionMatrix(alphabet,d);
} catch (NumberFormatException e) {
e.printStackTrace();
} catch (NoSuchElementException e) {
e.printStackTrace();
} catch (BioException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
Thrown exception:
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String
index out of range: 0
at java.lang.String.charAt(String.java:686)
at
org.biojava.bio.alignment.SubstitutionMatrix.parseMatrix(SubstitutionMatrix.java:304)
at
org.biojava.bio.alignment.SubstitutionMatrix.<init>(SubstitutionMatrix.java:100)
at MatrixTest.main(MatrixTest.java:30)
All BLOSUM matrix files I have downloaded work, so I don't think there is a
problem like wrong encoding or something similar.
Anybody an idea?
Cheers Stefan
_______________________________________________
Biojava-l mailing list - [email protected]
http://lists.open-bio.org/mailman/listinfo/biojava-l