fr.orsay.lri.varna.models.templates
Class RNATemplateAlign

java.lang.Object
  extended by fr.orsay.lri.varna.models.templates.RNATemplateAlign

public class RNATemplateAlign
extends Object

This class is about the alignment between a tree of RNANodeValue2 and a tree of RNANodeValueTemplate.

Author:
Raphael Champeimont

Constructor Summary
RNATemplateAlign()
           
 
Method Summary
static TreeAlignResult<RNANodeValue2,RNANodeValueTemplate> alignRNAWithTemplate(RNA rna, RNATemplate template)
          Align the given RNA with the given RNA template.
private static boolean canBePartOfABrokenHelix(RNANodeValue2 leftNodeValue)
           
private static boolean canBePartOfAnHelix(RNANodeValue2 leftNodeValue)
           
private static boolean canBePartOfASequence(RNANodeValue2 leftNodeValue)
           
static int[] intArrayFromList(List<Integer> l)
          Convert a list of integers into an array of integers.
static RNATemplateMapping makeTemplateMapping(TreeAlignResult<RNANodeValue2,RNANodeValueTemplate> alignResult, RNA rna)
          This method takes an alignment between a tree of RNANodeValue2 of RNANodeValue and a tree of RNANodeValue2 of RNANodeValueTemplate, and the original RNA object that was used to create the first tree in the alignment.
static RNATemplateMapping mapRNAWithTemplate(RNA rna, RNATemplate template)
          Map an RNA with an RNATemplate using tree alignment.
static void printIntArray(int[] A)
          Print an integer array.
static void printIntArrayList(ArrayList<Integer> A)
          Print an integer ArrayList.
static void printMapping(RNATemplateMapping mapping, RNATemplate template, String sequence)
           
static void printShortMatrix(short[][] M)
          Print an matrix of shorts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RNATemplateAlign

public RNATemplateAlign()
Method Detail

canBePartOfAnHelix

private static boolean canBePartOfAnHelix(RNANodeValue2 leftNodeValue)

canBePartOfASequence

private static boolean canBePartOfASequence(RNANodeValue2 leftNodeValue)

canBePartOfABrokenHelix

private static boolean canBePartOfABrokenHelix(RNANodeValue2 leftNodeValue)

makeTemplateMapping

public static RNATemplateMapping makeTemplateMapping(TreeAlignResult<RNANodeValue2,RNANodeValueTemplate> alignResult,
                                                     RNA rna)
                                              throws RNATemplateMappingException
This method takes an alignment between a tree of RNANodeValue2 of RNANodeValue and a tree of RNANodeValue2 of RNANodeValueTemplate, and the original RNA object that was used to create the first tree in the alignment. It returns the corresponding RNATemplateMapping.

Throws:
RNATemplateMappingException

printMapping

public static void printMapping(RNATemplateMapping mapping,
                                RNATemplate template,
                                String sequence)

alignRNAWithTemplate

public static TreeAlignResult<RNANodeValue2,RNANodeValueTemplate> alignRNAWithTemplate(RNA rna,
                                                                                       RNATemplate template)
                                                                                throws RNATemplateDrawingAlgorithmException
Align the given RNA with the given RNA template.

Throws:
RNATemplateDrawingAlgorithmException

mapRNAWithTemplate

public static RNATemplateMapping mapRNAWithTemplate(RNA rna,
                                                    RNATemplate template)
                                             throws RNATemplateDrawingAlgorithmException
Map an RNA with an RNATemplate using tree alignment.

Throws:
RNATemplateDrawingAlgorithmException

printIntArray

public static void printIntArray(int[] A)
Print an integer array.


printIntArrayList

public static void printIntArrayList(ArrayList<Integer> A)
Print an integer ArrayList.


printShortMatrix

public static void printShortMatrix(short[][] M)
Print an matrix of shorts.


intArrayFromList

public static int[] intArrayFromList(List<Integer> l)
Convert a list of integers into an array of integers. The returned arrays is freshly allocated. Returns null if given null.