From: janengelhardt Date: Mon, 15 Aug 2011 09:15:30 +0000 (+0200) Subject: JAL-891; Labeling of structure conservation is improved a bit. X-Git-Tag: Jalview_2_9~576^2~7 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4b60f281b768044e3d66289c5ff6d941e6998f0b;p=jalview.git JAL-891; Labeling of structure conservation is improved a bit. Brackets instead of 'H'. Change-Id: I220e86f21e2ff539ab5828bba4c0d07d76777422 --- diff --git a/src/jalview/analysis/StructureFrequency.java b/src/jalview/analysis/StructureFrequency.java index c253dce..7b97a8d 100644 --- a/src/jalview/analysis/StructureFrequency.java +++ b/src/jalview/analysis/StructureFrequency.java @@ -144,11 +144,11 @@ public class StructureFrequency cEnd = seq[bpEnd]; if (checkBpType(c, cEnd)) { - values['H']++; // H means it's a helix (structured) + values['(']++; // H means it's a helix (structured) } pairs[c][cEnd]++; - maxResidue = "H"; + maxResidue = "("; } } // nonGap++; @@ -163,7 +163,7 @@ public class StructureFrequency residueHash.put(PAIRPROFILE, pairs); } - count = values['H']; + count = values['(']; residueHash.put(MAXCOUNT, new Integer(count)); residueHash.put(MAXRESIDUE, maxResidue); @@ -178,7 +178,29 @@ public class StructureFrequency result[i] = residueHash; } if (bpEnd > 0) - { + { + values[')']=values['(']; + values['(']=0; + + residueHash = new Hashtable(); + maxResidue = ")"; + + if (profile) + { + residueHash.put(PROFILE, new int[][] + { values, new int[] + { jSize, (jSize - values['-']) } }); + + residueHash.put(PAIRPROFILE, pairs); + } + + residueHash.put(MAXCOUNT, new Integer(count)); + residueHash.put(MAXRESIDUE, maxResidue); + + percentage = ((float) count * 100) / (float) jSize; + residueHash.put(PID_GAPS, new Float(percentage)); + + result[bpEnd] = residueHash; } }