From: gmungoc Date: Tue, 16 May 2017 14:38:33 +0000 (+0100) Subject: JAL-2505 refactored method removed X-Git-Tag: Release_2_10_3b1~269 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=516567645c306018e92e4556a8c120b3b2cdbc60;p=jalview.git JAL-2505 refactored method removed --- diff --git a/src/jalview/analysis/Rna.java b/src/jalview/analysis/Rna.java index 6bb123a..34233f0 100644 --- a/src/jalview/analysis/Rna.java +++ b/src/jalview/analysis/Rna.java @@ -215,86 +215,6 @@ public class Rna */ /** - * Figures out which helix each position belongs to and stores the helix - * number in the 'featureGroup' member of a SequenceFeature Based off of RALEE - * code ralee-helix-map. - * - * @param pairs - * Array of SequenceFeature (output from Rna.GetBasePairs) - */ - protected static void computeHelixMap(SequenceFeature[] pairs) - { - - int helix = 0; // Number of helices/current helix - int lastopen = 0; // Position of last open bracket reviewed - int lastclose = 9999999; // Position of last close bracket reviewed - - int open; // Position of an open bracket under review - int close; // Position of a close bracket under review - int j; // Counter - - Map helices = new HashMap(); - // Keep track of helix number for each position - - // Go through each base pair and assign positions a helix - for (int i = 0; i < pairs.length; i++) - { - - open = pairs[i].getBegin(); - close = pairs[i].getEnd(); - - // System.out.println("open " + open + " close " + close); - // System.out.println("lastclose " + lastclose + " lastopen " + lastopen); - - // we're moving from right to left based on closing pair - /* - * catch things like <<..>>..<<..>> | - */ - if (open > lastclose) - { - helix++; - } - - /* - * catch things like <<..<<..>>..<<..>>>> | - */ - j = pairs.length - 1; - while (j >= 0) - { - int popen = pairs[j].getBegin(); - - // System.out.println("j " + j + " popen " + popen + " lastopen " - // +lastopen + " open " + open); - if ((popen < lastopen) && (popen > open)) - { - if (helices.containsValue(popen) - && ((helices.get(popen)) == helix)) - { - continue; - } - else - { - helix++; - break; - } - } - - j -= 1; - } - - // Put positions and helix information into the hashtable - helices.put(open, helix); - helices.put(close, helix); - - // Record helix as featuregroup - pairs[i].setFeatureGroup(Integer.toString(helix)); - - lastopen = open; - lastclose = close; - } - } - - /** * Answers true if the character is a recognised symbol for RNA secondary * structure. Currently accepts a-z, A-Z, ()[]{}<>. *