{\r
try\r
{\r
- sg.cs = (ColourSchemeI) cs.getClass().newInstance();\r
+ sg.cs = cs.getClass().newInstance();\r
} catch (Exception ex)\r
{\r
ex.printStackTrace();\r
throw new RuntimeException("The file provided does not match the T-Coffee scores file format");\r
}\r
\r
+ /*\r
+ * check that the score matrix matches the alignment dimensions\r
+ */\r
+ AlignmentI aln; \r
+ if( (aln=viewport.alignment) != null && (aln.getHeight() != file.getHeight() || aln.getWidth() != file.getWidth()) ) {\r
+ throw new RuntimeException("The scores matrix does not match the alignment dimensions");\r
+ }\r
+ \r
tcoffeeColour.setEnabled(true);\r
tcoffeeScoreFile = file;\r
\r