X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fjws2%2FJPred301Client.java;h=a6be4f8d3fdc9d6bcd3b6c84ac0b210a714b0a34;hb=c19d2a91ca05e052e3408bf5852d88eb5d0608f1;hp=b086159f748d526bbaddbb32144006b996b6b54f;hpb=ad15cff29620f960119f80176f1fd443da9f6763;p=jalview.git diff --git a/src/jalview/ws/jws2/JPred301Client.java b/src/jalview/ws/jws2/JPred301Client.java index b086159..a6be4f8 100644 --- a/src/jalview/ws/jws2/JPred301Client.java +++ b/src/jalview/ws/jws2/JPred301Client.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) - * Copyright (C) $$Year-Rel$$ The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2) + * Copyright (C) 2015 The Jalview Authors * * This file is part of Jalview. * @@ -35,6 +35,8 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; +import java.util.Map; +import java.util.Set; import compbio.data.sequence.FastaSequence; import compbio.data.sequence.JpredAlignment; @@ -90,15 +92,18 @@ public class JPred301Client extends JabawsMsaInterfaceAlignCalcWorker return "calculating consensus secondary structure prediction using JPred service"; } - private static HashMap jpredRowLabels = new HashMap(); + private static Map jpredRowLabels = new HashMap(); - private static HashSet jpredRes_graph, jpredRes_ssonly; + private static final Set jpredRes_graph; + + private static final Set jpredRes_ssonly; + static { - jpredRes_ssonly = new HashSet(); + jpredRes_ssonly = new HashSet(); jpredRes_ssonly.add("jnetpred".toLowerCase()); jpredRes_ssonly.add("jnetpssm".toLowerCase()); jpredRes_ssonly.add("jnethmm".toLowerCase()); - jpredRes_graph = new HashSet(); + jpredRes_graph = new HashSet(); jpredRes_graph.add("jnetconf".toLowerCase()); jpredRes_graph.add("jnet burial".toLowerCase()); } @@ -123,8 +128,7 @@ public class JPred301Client extends JabawsMsaInterfaceAlignCalcWorker String[] k = jpredRowLabels.get(fsq.getId()); if (k == null) { - k = new String[] - { fsq.getId(), "JNet Output" }; + k = new String[] { fsq.getId(), "JNet Output" }; } if (fsq.getId().startsWith("JNETSOL")) { @@ -137,7 +141,8 @@ public class JPred301Client extends JabawsMsaInterfaceAlignCalcWorker { sol[spos] = '0'; } - if (vseq[spos] == 'B' && (sol[spos]=='0' || sol[spos] < amnt)) + if (vseq[spos] == 'B' + && (sol[spos] == '0' || sol[spos] < amnt)) { sol[spos] = amnt; } @@ -247,7 +252,7 @@ public class JPred301Client extends JabawsMsaInterfaceAlignCalcWorker try { elm[i] = new Annotation("" + annot, "" + annot, annot, - Integer.valueOf(""+annot)); + Integer.valueOf("" + annot)); } catch (Exception x) { System.err.println("Expected numeric value in character '"