From: gmungoc Date: Mon, 27 Mar 2017 13:27:35 +0000 (+0100) Subject: JAL-2416 class Javadoc updates prior to parsing changes X-Git-Tag: Release_2_10_2~3^2~105^2~2^2~44 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=2ef3e2f98a054c66f45c36bfdf62f085a28fc770;p=jalview.git JAL-2416 class Javadoc updates prior to parsing changes --- diff --git a/src/jalview/io/ScoreMatrixFile.java b/src/jalview/io/ScoreMatrixFile.java index eee7d68..a332846 100644 --- a/src/jalview/io/ScoreMatrixFile.java +++ b/src/jalview/io/ScoreMatrixFile.java @@ -10,12 +10,26 @@ import java.util.StringTokenizer; /** * A class that can parse a file containing a substitution matrix and register * it for use in Jalview + *

+ * Accepts 'NCBI' format (e.g. + * https://www.ncbi.nlm.nih.gov/Class/FieldGuide/BLOSUM62.txt), with the + * addition of a header line to provide a matrix name, e.g. * - * @author gmcarstairs - * + *

+ * ScoreMatrix BLOSUM62
+ * 
+ * + * Also accepts 'aaindex' format (as described at + * http://www.genome.jp/aaindex/aaindex_help.html) with the minimum data + * required being + * + *
+ * H accession number (used as score matrix identifier in Jalview)
+ * D description (used for tooltip in Jalview)
+ * M rows = symbolList
+ * and the substitution scores
+ * 
*/ -// TODO modify the AlignFile / IdentifyFile pattern so that non-alignment files -// like this are handled more naturally public class ScoreMatrixFile extends AlignFile implements AlignmentFileReaderI { @@ -149,7 +163,8 @@ public class ScoreMatrixFile extends AlignFile implements * optionally with the symbol as the first column for readability */ StringTokenizer scoreLine = new StringTokenizer(data, DELIMITERS); - if (scoreLine.countTokens() == size + 1) + int tokenCount = scoreLine.countTokens(); + if (tokenCount == size + 1) { /* * check 'guide' symbol is the row'th letter of the alphabet