fr.orsay.lri.varna.models.templates
Class RNATemplate.RemovePseudoKnots

java.lang.Object
  extended by fr.orsay.lri.varna.models.templates.RNATemplate.RemovePseudoKnots
Enclosing class:
RNATemplate

private class RNATemplate.RemovePseudoKnots
extends Object


Field Summary
private  ArrayList<RNATemplate.RNATemplateHelix> helixesSeq
          The elements of the template as an array, in the order of the RNA sequence.
private  ArrayList<Integer> helixesStruct
          For any i, j = helixesStruct[i] is the index in helixesSeq where the same helix also appears.
private  int[] helixesStructWithoutPseudoKnots
          The same as helixesStruct, but without the pseudoknots, ie.
 
Constructor Summary
private RNATemplate.RemovePseudoKnots()
           
 
Method Summary
private  void initArrays()
           
private  boolean isSelfCrossing()
          Tells whether there is a pseudoknot.
private  Set<RNATemplate.RNATemplateHelix> makeSet()
           
 Set<RNATemplate.RNATemplateHelix> removePseudoKnots()
           
private  void removePseudoKnotsAux()
          We compute helixesStructWithoutPseudoKnots from helixesStruct by replacing values by -1 for the helixes we cut (the bases are become non-paired).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

helixesSeq

private ArrayList<RNATemplate.RNATemplateHelix> helixesSeq
The elements of the template as an array, in the order of the RNA sequence. Note that helixes will appear twice, and non-paired sequences don't appear.


helixesStruct

private ArrayList<Integer> helixesStruct
For any i, j = helixesStruct[i] is the index in helixesSeq where the same helix also appears. It means we have for all i: helixesSeq[helixesStruct[i]] == helixesSeq[i]


helixesStructWithoutPseudoKnots

private int[] helixesStructWithoutPseudoKnots
The same as helixesStruct, but without the pseudoknots, ie. helixesStructWithoutPseudoKnots[i] may be -1 even though helixesStruct[i] != -1 .

Constructor Detail

RNATemplate.RemovePseudoKnots

private RNATemplate.RemovePseudoKnots()
Method Detail

initArrays

private void initArrays()
                 throws fr.orsay.lri.varna.exceptions.ExceptionInvalidRNATemplate
Throws:
fr.orsay.lri.varna.exceptions.ExceptionInvalidRNATemplate

isSelfCrossing

private boolean isSelfCrossing()
Tells whether there is a pseudoknot. Adapted from RNAMLParser.isSelfCrossing()


removePseudoKnotsAux

private void removePseudoKnotsAux()
We compute helixesStructWithoutPseudoKnots from helixesStruct by replacing values by -1 for the helixes we cut (the bases are become non-paired). We try to cut as few base pairs as possible.


makeSet

private Set<RNATemplate.RNATemplateHelix> makeSet()

removePseudoKnots

public Set<RNATemplate.RNATemplateHelix> removePseudoKnots()
                                                    throws fr.orsay.lri.varna.exceptions.ExceptionInvalidRNATemplate
Throws:
fr.orsay.lri.varna.exceptions.ExceptionInvalidRNATemplate