From 35a5186a5d49868d70138aab55dfd284119914f4 Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 20 Aug 2008 15:54:22 +0000 Subject: [PATCH] Use 0f rather than NaN to specify non-valued annotation elements. --- src/jalview/io/AnnotationFile.java | 2 +- src/jalview/io/StockholmFile.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jalview/io/AnnotationFile.java b/src/jalview/io/AnnotationFile.java index 13cfc38..288ce2f 100755 --- a/src/jalview/io/AnnotationFile.java +++ b/src/jalview/io/AnnotationFile.java @@ -190,7 +190,7 @@ public class AnnotationFile } color = row.annotations[j].colour; - if (row.annotations[j].value != 0f) + if (row.annotations[j].value != 0f && row.annotations[j].value!=Float.NaN) { text.append(comma + row.annotations[j].value); } diff --git a/src/jalview/io/StockholmFile.java b/src/jalview/io/StockholmFile.java index d5f3cc2..ccbe818 100644 --- a/src/jalview/io/StockholmFile.java +++ b/src/jalview/io/StockholmFile.java @@ -480,18 +480,18 @@ public class StockholmFile extends AlignFile { String pos = annots.substring(i, i + 1); Annotation ann; - ann = new Annotation(pos, "", ' ', Float.NaN); + ann = new Annotation(pos, "", ' ', 0f); // 0f is 'valid' null - will not be written out if (ss) { ann.secondaryStructure = jalview.schemes.ResidueProperties .getDssp3state(pos).charAt(0); if (ann.secondaryStructure == pos.charAt(0) || pos.charAt(0) == 'C') { - ann.displayCharacter = ""; + ann.displayCharacter = ""; // null; // " "; } else { - ann.displayCharacter += " "; + ann.displayCharacter = " "+ann.displayCharacter; } } -- 1.7.10.2