From: jprocter Date: Thu, 26 Apr 2007 17:15:13 +0000 (+0000) Subject: use hasScore method to test presence of score in annotation. X-Git-Tag: Release_2_3~153 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e1138429961fa5e88f89b66ba9a413a003328e02;p=jalview.git use hasScore method to test presence of score in annotation. --- diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index 0ea7730..54263aa 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -380,7 +380,7 @@ public class AnnotationLabels { desc.append(aa.description+"
"); } - if(!Float.isNaN(aa.score)) + if(aa.hasScore()) { desc.append("Score: "+aa.score); } diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index b90f497..45c76ee 100755 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -534,7 +534,7 @@ public class Jalview2XML } an.setLabel(aa[i].label); - if (!Float.isNaN(aa[i].score)) + if (aa[i].hasScore()) { an.setScore(aa[i].getScore()); } @@ -1338,12 +1338,11 @@ public class Jalview2XML for (int aa = 0; aa < ae.length && aa < anot.length; aa++) { - anot[ae[aa].getPosition()] = new jalview.datamodel.Annotation( ae[aa].getDisplayCharacter(), ae[aa].getDescription(), - ae[aa].getSecondaryStructure()==null ? ' ' : + (ae[aa].getSecondaryStructure()==null || ae[aa].getSecondaryStructure().length() == 0) ? ' ' : ae[aa].getSecondaryStructure().charAt(0), ae[aa].getValue() diff --git a/src/jalview/io/AnnotationFile.java b/src/jalview/io/AnnotationFile.java index a936dac..463e922 100755 --- a/src/jalview/io/AnnotationFile.java +++ b/src/jalview/io/AnnotationFile.java @@ -169,7 +169,7 @@ public class AnnotationFile text.append("|"); } - if(!Float.isNaN(row.score)) + if(row.hasScore()) text.append("\t"+row.score); text.append("\n");