From d96a2f4679fa106e7beed4466f63a9191faa5b90 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 1 Jun 2012 10:57:51 +0100 Subject: [PATCH] JWS-36 patched Scores writer to put spaces between ranges and space separated scores --- datamodel/compbio/data/sequence/Score.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/datamodel/compbio/data/sequence/Score.java b/datamodel/compbio/data/sequence/Score.java index ec4cadc..fed0ef0 100644 --- a/datamodel/compbio/data/sequence/Score.java +++ b/datamodel/compbio/data/sequence/Score.java @@ -187,12 +187,13 @@ public class Score implements Comparable { * *
 	 * {@code
-	 * #MethodName 
+	 * #MethodName [comma separated list of ranges] 
 	 * 	  
 	 * For example:
 	 * 	 
 	 * #KABAT 0.2 0.3 0.2 0 0.645 0.333 1 1 0 0
 	 * #SMERFS 0.645 0.333 1 1 0 0 0.2 0.3 0.2 0
+	 * #COILS 22-33, 44-56 0.121 3.212
 	 * }
 	 * 
* @@ -212,17 +213,17 @@ public class Score implements Comparable { throw new NullPointerException("Writer must be provided!"); } for (Score score : scores) { - writer.write("#" + score.method + " "); + writer.write("#" + score.method); int count = score.ranges.size(); for (Range range : score.ranges) { count--; - writer.write(range.toString()); + writer.write(" "+range.toString()); if (count != 0) { - writer.write(", "); + writer.write(","); } } for (Float scoreVal : score.scores) { - writer.write(NUMBER_FORMAT.format(scoreVal) + " "); + writer.write(" "+NUMBER_FORMAT.format(scoreVal)); } writer.write("\n"); writer.flush(); -- 1.7.10.2