From: jprocter Date: Wed, 20 Aug 2008 15:54:22 +0000 (+0000) Subject: Use 0f rather than NaN to specify non-valued annotation elements. X-Git-Tag: Release_2_4~13 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=35a5186a5d49868d70138aab55dfd284119914f4;p=jalview.git Use 0f rather than NaN to specify non-valued annotation elements. --- 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; } }