From 7d3c15518c8a237ff2ef0c135b6553891485462d Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 20 Nov 2014 14:52:22 +0000 Subject: [PATCH] JAL-674 JAL-1569 mark RNA helix number in the value field --- src/jalview/datamodel/AlignmentAnnotation.java | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index 0731991..0207575 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -110,10 +110,41 @@ public class AlignmentAnnotation isrna = true; showAllColLabels = true; scaleColLabel = true; + _markRnaHelices(); } // System.out.println("featuregroup " + _rnasecstr[0].getFeatureGroup()); + } + private void _markRnaHelices() + { + // Figure out number of helices + // Length of rnasecstr is the number of pairs of positions that base pair + // with each other in the secondary structure + for (int x = 0; x < _rnasecstr.length; x++) + { + + /* + * System.out.println(this.annotation._rnasecstr[x] + " Begin" + + * this.annotation._rnasecstr[x].getBegin()); + */ + // System.out.println(this.annotation._rnasecstr[x].getFeatureGroup()); + int val = 0; + try + { + val = Integer.valueOf(_rnasecstr[x].getFeatureGroup()); + } catch (NumberFormatException q) + { + } + ; + + annotations[_rnasecstr[x].getBegin()].value = val; + annotations[_rnasecstr[x].getEnd()].value = val; + + annotations[_rnasecstr[x].getBegin()].displayCharacter = "" + val; + annotations[_rnasecstr[x].getEnd()].displayCharacter = "" + val; + } + } /** * map of positions in the associated annotation */ -- 1.7.10.2