fr.orsay.lri.varna.models.rna
Class RNA

java.lang.Object
  extended by fr.orsay.lri.varna.interfaces.InterfaceVARNAObservable
      extended by fr.orsay.lri.varna.models.rna.RNA
All Implemented Interfaces:
Serializable

public class RNA
extends InterfaceVARNAObservable
implements Serializable

The RNA model which contain the base list and the draw algorithm mode

Author:
darty
See Also:
Serialized Form

Nested Class Summary
private static class RNA.ComputeArcCenter
           
static class RNA.DrawRNATemplateMethod
          What to do in case some helices are of a different length in the template and the actual helix.
 
Field Summary
 double _bpHeightIncrement
           
private  ArrayList<ChemProbAnnotation> _ChemProbAnnotations
           
 GeneralPath _debugShape
           
private  int _drawMode
          The draw algorithm mode
private  boolean _drawn
           
private  ArrayList<TextAnnotation> _listeAnnotations
           
protected  ArrayList<ModeleBase> _listeBases
          the base list
private  ArrayList<HighlightRegionAnnotation> _listeRegionHighlights
           
private  ArrayList<InterfaceVARNAListener> _listeVARNAListener
           
(package private)  StructureTemp _listStrands
          the strand list
private  String _name
           
(package private) static ArrayList<String> _normalBases
           
private  Double _spaceBetweenBases
           
private  boolean _strandEndsAnnotated
           
private  ArrayList<ModeleBP> _structureAux
          Additional bonds and info can be specified here.
static double BASE_PAIR_DISTANCE
           
 int BASE_RADIUS
           
 double CHEM_PROB_ARROW_HEIGHT
           
static double CHEM_PROB_ARROW_THICKNESS
           
 double CHEM_PROB_ARROW_WIDTH
           
 double CHEM_PROB_BASE_LENGTH
           
 double CHEM_PROB_DIST
           
 double CHEM_PROB_DOT_RADIUS
           
 double CHEM_PROB_PIN_SEMIDIAG
           
 double CHEM_PROB_TRIANGLE_WIDTH
           
static int DEFAULT_DRAW_MODE
           
static int DRAW_MODE_CIRCULAR
          Selects the "Feynman diagram" drawing algorithm that places the bases on a circle and draws the base-pairings as chords of the circle graph.
static int DRAW_MODE_LINEAR
          Selects the linear algorithm.
static int DRAW_MODE_MOTIFVIEW
          Selects the RNAView algorithm.
static int DRAW_MODE_NAVIEW
          Selects the NAView algorithm.
static int DRAW_MODE_RADIATE
          Selects the "tree drawing" algorithm.
static int DRAW_MODE_TEMPLATE
           
static int DRAW_MODE_VARNA_VIEW
           
static int FILE_TYPE_BPSEQ
           
static int FILE_TYPE_CT
           
static int FILE_TYPE_DBN
           
static int FILE_TYPE_RNAML
           
static int FILE_TYPE_UNKNOWN
           
static double LOOP_DISTANCE
           
static double MULTILOOP_DISTANCE
           
private static long serialVersionUID
           
static double VIRTUAL_LOOP_RADIUS
           
 
Constructor Summary
RNA()
           
RNA(RNA r)
           
RNA(String n)
           
 
Method Summary
 void adaptColorMapToValues(ModeleColorMap cm)
           
 void addAnnotation(TextAnnotation t)
           
 void addBP(int i, int j)
           
 void addBP(int i, int j, ModeleBP msbp)
           
 void addBPAux(int i, int j)
           
 void addBPAux(int i, int j, ModeleBP msbp)
           
 void addBPToStructure(int index5, int index3)
           
 void addBPToStructure(int index5, int index3, ModeleBP msbp)
           
 void addBPToStructureUsingNumbers(int baseNumber5, int baseNumber3)
          Adds a base pair to this RNA's structure.
 void addBPToStructureUsingNumbers(int number5, int number3, ModeleBP msbp)
          Adds a base pair to this RNA's structure.
 void addChemProbAnnotation(ChemProbAnnotation cpa)
           
 void addHighlightRegion(HighlightRegionAnnotation n)
           
 void addHighlightRegion(int from, int to)
           
 void addHighlightRegion(int from, int to, Color fill, Color outline, double radius)
           
 void addVARNAListener(InterfaceVARNAListener rl)
           
static Double angle(Point2D.Double p1, Point2D.Double p2, Point2D.Double p3)
           
private static double angleFromVector(double x, double y)
           
private static double angleFromVector(Point2D.Double v)
          Compute the angle made by a vector.
private  void applyBPs(ArrayList<ModeleBP> allbps)
           
private  void applyStruct(int[] str)
           
 void applyStyleOnBases(ArrayList<Integer> basesList, ModeleStyleBase style)
           
 void autoAnnotateHelices()
           
 void autoAnnotateInteriorLoops()
           
 void autoAnnotateStrandEnds()
           
 void autoAnnotateTerminalLoops()
           
(package private)  Point2D.Double buildCaptionPosition(ModeleBase mb, double heightEstimate, VARNAConfig conf)
           
 void clearAnnotations()
           
 RNA clone()
           
private  void computeBezierTangentVectorTarget(RNATemplate.RNATemplateElement.EdgeEndPoint endPoint, Point2D.Double curveEndPoint, Point2D.Double curveVectorOtherPoint)
          A cubic Bezier curve can be defined by 4 points, see http://en.wikipedia.org/wiki/Bezier_curve#Cubic_B.C3.A9zier_curves For each of the curve end points, there is the last/first point of the curve and a point which gives the direction and length of the tangent vector on that side.
private  void computeHelixEndPointDirections(RNATemplate.RNATemplateElement.EdgeEndPoint helixEndPoint, Point2D.Double i, Point2D.Double j)
          IN: Argument helixEndPoint is an IN argument (will be read), and must contain an helix edge endpoint.
private  double computeHelixRealLength(int[] basesInHelixArray)
          Compute helix actual length (as drawHelixLikeTemplateHelix() would draw it).
private  double computeHelixTemplateLength(RNATemplate.RNATemplateHelix helix)
          Get helix length in template.
private  void computeHelixTranslations(Tree<RNANodeValueTemplate> tree, Map<RNATemplate.RNATemplateHelix,Point2D.Double> translateVectors, RNATemplateMapping mapping, Point2D.Double parentDeltaVector)
           
private  Map<RNATemplate.RNATemplateHelix,Point2D.Double> computeHelixTranslations(Tree<RNANodeValueTemplate> tree, RNATemplateMapping mapping)
           
private  Point2D.Double computeLengthIncreaseDelta(int[] basesInHelixArray, RNATemplate.RNATemplateHelix helix)
          Compute (actual helix vector - helix vector in template).
private  double computeLengthIncreaseFactor(int[] basesInHelixArray, RNATemplate.RNATemplateHelix helix)
          Compute (actual helix length / helix length in template).
private  void computeTemplateHelixVectors(RNATemplate.RNATemplateHelix helix, Point2D.Double o, Point2D.Double i, Point2D.Double j)
          Compute helix interesting vectors from template helix.
private  int[] correctReciprocity(int[] str)
           
 double determineRadius(int nbHel, int nbUnpaired, double startRadius)
           
static double determineRadius(int nbHel, int nbUnpaired, double startRadius, double bpdist, double multidist)
           
private  void drawAlongCurve(int firstBase, int lastBase, Point2D.Double P0, Point2D.Double P1, Point2D.Double P2, Point2D.Double P3, Point2D.Double[] coords, Point2D.Double[] centers)
          This functions draws the RNA sequence between (including) firstBase and lastBase along a curve.
private  void drawBasePair(SecStrDrawingProducer out, Point2D.Double orig, Point2D.Double dest, ModeleBP style, VARNAConfig conf)
           
private  void drawChemProbAnnotation(SecStrDrawingProducer out, ChemProbAnnotation cpa, Point2D.Double anchor, double minX, double minY)
           
private  void drawColorMap(VARNAConfig _conf, SecStrDrawingProducer out)
           
private  double drawHelixLikeTemplateHelix(int[] basesInHelixArray, RNATemplate.RNATemplateHelix helix, Point2D.Double[] coords, Point2D.Double[] centers, double scaleHelixOrigin, Map<RNATemplate.RNATemplateHelix,Point2D.Double> translateVectors)
          Draw the given helix (given as a *SORTED* array of indexes) like defined in the given template helix.
private  void drawHelixLikeTemplateHelixOLD(int[] basesInHelixArray, RNATemplate.RNATemplateHelix helix, Point2D.Double[] coords, Point2D.Double[] centers, double scaleHelixOrigin, Map<RNATemplate.RNATemplateHelix,Point2D.Double> translateVectors)
           
private  void drawLoop(int i, int j, double x, double y, double dirAngle, Point2D.Double[] coords, Point2D.Double[] centers)
           
 void drawMOTIFView()
           
private  void drawOnBezierCurve(int[] basesInSequence, Point2D.Double P0, Point2D.Double P1, Point2D.Double P2, Point2D.Double P3, Point2D.Double[] coords, Point2D.Double[] centers)
          A Bezier curve can be defined by four points, see http://en.wikipedia.org/wiki/Bezier_curve#Cubic_B.C3.A9zier_curves Here we give this four points and an array of bases indexes (which must be indexes in this RNA sequence) which will be moved to be on the Bezier curve.
private  void drawOnStraightLine(int[] basesInSequence, Point2D.Double P0, Point2D.Double P3, Point2D.Double[] coords, Point2D.Double[] centers)
          Like drawOnBezierCurve(), but on a straight line.
 void drawRNA(int mode, VARNAConfig conf)
           
 void drawRNA(VARNAConfig conf)
           
 void drawRNACircle()
           
 void drawRNALine()
           
 void drawRNANAView()
           
 void drawRNARadiate(double dirAngle, boolean flatExteriorLoop)
           
 void drawRNARadiate(VARNAConfig conf)
           
 RNATemplateMapping drawRNATemplate(RNATemplate template)
          Same as below, with default helixLengthAdjustmentMethod.
 RNATemplateMapping drawRNATemplate(RNATemplate template, int helixLengthAdjustmentMethod)
          Draw this RNA like the given template.
 void drawRNAVARNAView()
           
private  void drawSymbol(SecStrDrawingProducer out, double posx, double posy, double normx, double normy, double radius, boolean isCIS, ModeleBP.Edge e, double thickness)
           
 void eraseSequence()
           
private  double estimateBulgeArcLength(int firstBase, int lastBase)
          Estimate bulge arc length.
private  double estimateBulgeWidth(int firstBase, int lastBase)
          Estimate bulge width, the given first and last bases must be those in the helix.
private  double estimateBulgeWidthOLD(int firstBase, int lastBase)
          Estimate bulge width, the given first and last bases must be those in the helix.
static ArrayList<String> explodeSequence(String seq)
           
 ArrayList<Integer> find3Prime(int indice)
           
 ArrayList<Integer> find5Prime(int indice)
           
 ArrayList<Integer> findAll()
           
 ArrayList<Integer> findBulge(int index)
           
 ArrayList<Integer> findHelix(int indice)
           
 ArrayList<Integer> findLoop(int indice)
           
 ArrayList<Integer> findLoopBackward(int indice)
           
 ArrayList<Integer> findLoopForward(int indice)
           
 ArrayList<Integer> findNonPairedBaseGroup(Integer get_nearestBase)
           
 ArrayList<Integer> findPair(int indice)
           
 ArrayList<Integer> findStem(int index)
           
 int get_drawMode()
           
 ArrayList<ModeleBase> get_listeBases()
           
 Double get_spaceBetweenBases()
           
 ArrayList<ModeleBP> getAllBPs()
           
 ArrayList<ModeleBase> getAllPartners(int indice)
           
 TextAnnotation getAnnotation(int type, ModeleBase base)
           
 ArrayList<TextAnnotation> getAnnotations()
           
 ArrayList<ModeleBP> getAuxBPs()
           
 ArrayList<ModeleBP> getAuxBPs(int i)
           
 ModeleBase getBaseAt(int index)
           
 String getBaseContent(int i)
           
 Color getBaseInnerColor(int i, VARNAConfig conf)
           
 Color getBaseNameColor(int i, VARNAConfig conf)
           
 int getBaseNumber(int i)
           
 Color getBaseOuterColor(int i, VARNAConfig conf)
           
 Color getBasePairColor(ModeleBP bp, VARNAConfig conf)
           
 double getBasePairThickness(ModeleBP bp, VARNAConfig conf)
           
 ArrayList<ModeleBase> getBasesAt(Collection<? extends Integer> indices)
           
 ArrayList<ModeleBase> getBasesBetween(int from, int to)
           
 Rectangle2D.Double getBBox()
           
 double getBPHeightIncrement()
           
 ArrayList<ModeleBP> getBPsAt(int i)
           
 ModeleBP getBPStyle(int i, int j)
           
 Point2D.Double getCenter(int i)
           
 ArrayList<ChemProbAnnotation> getChemProbAnnotations()
           
 Double[] getColorMapValues()
           
 Point2D.Double getCoords(int i)
           
 int getDrawMode()
           
 boolean getDrawn()
           
 ArrayList<Integer> getHelix(int index)
           
 int getHelixCountOnLoop(int indice)
           
 Point getHelixInterval(int index)
           
 ArrayList<HighlightRegionAnnotation> getHighlightRegion()
           
 int getIndexFromBaseNumber(int num)
           
 String getListeBasesToString()
           
 Vector<Integer> getLoopBases(int startIndex)
           
 Point getMultiLoop(int index)
           
 String getName()
           
 int[] getNonCrossingStruct()
           
 int[] getNonOverlappingStruct()
           
 double getOrientation()
           
 ArrayList<ModeleBP> getSecStrBPs()
           
 String getSeq()
          Returns the raw nucleotides sequence for the displayed RNA
 int getSize()
           
 String getStructBPSEQ()
           
 String getStructCT()
           
 String getStructDBN()
          Returns the RNA secondary structure displayed by this panel as a well-parenthesized word, accordingly to the DBN format
 String getStructDBN(boolean includeMostPKs)
           
 String getStructDBN(int[] str)
           
 ArrayList<ModeleBP> getStructureAux()
           
 void globalRotation(Double angleDegres)
          Rotates the RNA coordinates by a certain angle
static int guessFileTypeFromExtension(String path)
           
 boolean hasVirtualLoops()
           
 void init()
           
 boolean isNumberDrawn(ModeleBase mb, int numPeriod)
           
 void loadSecStr(Reader r)
           
 void loadSecStr(Reader r, int fileType)
           
 void loadSecStr(String path)
           
private  boolean loadSecStrBPSEQ(Reader r)
           
private  boolean loadSecStrCT(Reader r)
           
private  boolean loadSecStrDBN(Reader r)
           
private  boolean loadSecStrRNAML(Reader r)
           
private static double objFun(int n1, int n2, double r, double bpdist, double multidist)
           
 ArrayList<int[]> paginateStructure()
           
 int[] parseStruct(String str)
           
 void readValues(Reader r, ModeleColorMap cm)
           
 void removeAnnotation(String filter)
           
 boolean removeAnnotation(TextAnnotation t)
           
 void removeBP(ModeleBP ms)
           
 void removeChemProbAnnotation(ChemProbAnnotation a)
           
 void removeHighlightRegion(HighlightRegionAnnotation n)
           
private  void renderAnnotations(SecStrDrawingProducer out, double minX, double minY, VARNAConfig conf)
           
private  void renderRegionHighlights(SecStrDrawingProducer out, Point2D.Double[] realCoords, Point2D.Double[] realCenters)
           
 void rescaleColorMap(ModeleColorMap cm)
           
 void saveAsBPSEQ(String path, String title)
           
 void saveAsCT(String path, String title)
           
 void saveAsDBN(String path, String title)
           
private  void saveRNA(String path, VARNAConfig conf, double scale, SecStrDrawingProducer out)
           
 void saveRNADBN(String path, String title)
           
 void saveRNAEPS(String path, VARNAConfig conf)
           
 void saveRNASVG(String path, VARNAConfig conf)
           
 void saveRNAXFIG(String path, VARNAConfig conf)
           
 void set_listeBases(ArrayList<ModeleBase> _liste)
           
 void set_spaceBetweenBases(Double betweenBases)
           
 void setBaseInnerColor(Color c)
           
 void setBaseNameColor(Color c)
           
 void setBaseNumbersColor(Color c)
           
 void setBaseOutlineColor(Color c)
           
 void setBPHeightIncrement(double d)
           
 void setCenter(int i, double x, double y)
           
 void setCenter(int i, Point2D.Double p)
           
 void setColorMapValues(Double[] values, ModeleColorMap cm)
           
 void setColorMapValues(Double[] values, ModeleColorMap cm, boolean rescaleColorMap)
           
 void setCoord(int index, double x, double y)
           
 void setCoord(int index, Point2D.Double p)
           
 void setDrawMode(int drawMode)
           
 void setName(String n)
           
 void setRNA(List<String> seq, int[] str)
           
 void setRNA(List<String> seq, int[] str, int baseIndex)
           
 void setRNA(List<String> seq, String dbnStr)
           
 void setRNA(String[] seq, int[] str)
           
 void setRNA(String[] seq, int[] str, int baseIndex)
           
 void setRNA(String seq, String str)
           
 void setRNA(String seq, String struct, ArrayList<Integer> basesOwn)
          Sets the RNA to be drawn.
 void setSequence(List<String> s)
           
 void setSequence(String s)
           
private static void symmetric(Point2D.Double p, Point2D.Double v, Point2D.Double[] points)
          Compute the symmetric of all the points in the points array relative to the line that goes through p and has director vector v.
 boolean testDirectionality(int i, int j, int k)
           
static boolean testDirectionality(Point2D.Double pi, Point2D.Double pj, Point2D.Double pk)
           
 String toString()
           
 void warningEmition(String warningMessage)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

FILE_TYPE_BPSEQ

public static final int FILE_TYPE_BPSEQ
See Also:
Constant Field Values

FILE_TYPE_CT

public static final int FILE_TYPE_CT
See Also:
Constant Field Values

FILE_TYPE_DBN

public static final int FILE_TYPE_DBN
See Also:
Constant Field Values

FILE_TYPE_RNAML

public static final int FILE_TYPE_RNAML
See Also:
Constant Field Values

FILE_TYPE_UNKNOWN

public static final int FILE_TYPE_UNKNOWN
See Also:
Constant Field Values

DRAW_MODE_CIRCULAR

public static final int DRAW_MODE_CIRCULAR
Selects the "Feynman diagram" drawing algorithm that places the bases on a circle and draws the base-pairings as chords of the circle graph.

See Also:
Constant Field Values

DRAW_MODE_RADIATE

public static final int DRAW_MODE_RADIATE
Selects the "tree drawing" algorithm. Draws each loop on a circle whose radius depends on the number of bases involved in the loop. As some helices can be overlapping in the result, basic interaction is provided so that the user can "disentangle" the drawing by spinning the helices around the axis defined by their multiloop (bulge or internal loop) origin. This is roughly the initial placement strategy of RNAViz.

See Also:
RNAViz, Constant Field Values

DRAW_MODE_NAVIEW

public static final int DRAW_MODE_NAVIEW
Selects the NAView algorithm.

See Also:
Constant Field Values

DRAW_MODE_LINEAR

public static final int DRAW_MODE_LINEAR
Selects the linear algorithm.

See Also:
Constant Field Values

DRAW_MODE_VARNA_VIEW

public static final int DRAW_MODE_VARNA_VIEW
See Also:
Constant Field Values

DRAW_MODE_MOTIFVIEW

public static final int DRAW_MODE_MOTIFVIEW
Selects the RNAView algorithm.

See Also:
Constant Field Values

DRAW_MODE_TEMPLATE

public static final int DRAW_MODE_TEMPLATE
See Also:
Constant Field Values

DEFAULT_DRAW_MODE

public static final int DEFAULT_DRAW_MODE
See Also:
Constant Field Values

_spaceBetweenBases

private Double _spaceBetweenBases

_drawMode

private int _drawMode
The draw algorithm mode


BASE_RADIUS

public int BASE_RADIUS

LOOP_DISTANCE

public static final double LOOP_DISTANCE
See Also:
Constant Field Values

BASE_PAIR_DISTANCE

public static final double BASE_PAIR_DISTANCE
See Also:
Constant Field Values

MULTILOOP_DISTANCE

public static final double MULTILOOP_DISTANCE
See Also:
Constant Field Values

VIRTUAL_LOOP_RADIUS

public static final double VIRTUAL_LOOP_RADIUS
See Also:
Constant Field Values

CHEM_PROB_DIST

public double CHEM_PROB_DIST

CHEM_PROB_BASE_LENGTH

public double CHEM_PROB_BASE_LENGTH

CHEM_PROB_ARROW_HEIGHT

public double CHEM_PROB_ARROW_HEIGHT

CHEM_PROB_ARROW_WIDTH

public double CHEM_PROB_ARROW_WIDTH

CHEM_PROB_TRIANGLE_WIDTH

public double CHEM_PROB_TRIANGLE_WIDTH

CHEM_PROB_PIN_SEMIDIAG

public double CHEM_PROB_PIN_SEMIDIAG

CHEM_PROB_DOT_RADIUS

public double CHEM_PROB_DOT_RADIUS

_debugShape

public GeneralPath _debugShape

_drawn

private boolean _drawn

_bpHeightIncrement

public double _bpHeightIncrement

_listeBases

protected ArrayList<ModeleBase> _listeBases
the base list


_listStrands

StructureTemp _listStrands
the strand list


_structureAux

private ArrayList<ModeleBP> _structureAux
Additional bonds and info can be specified here.


_listeVARNAListener

private transient ArrayList<InterfaceVARNAListener> _listeVARNAListener

_normalBases

static ArrayList<String> _normalBases

_listeAnnotations

private ArrayList<TextAnnotation> _listeAnnotations

_listeRegionHighlights

private ArrayList<HighlightRegionAnnotation> _listeRegionHighlights

_name

private String _name

CHEM_PROB_ARROW_THICKNESS

public static double CHEM_PROB_ARROW_THICKNESS

_strandEndsAnnotated

private boolean _strandEndsAnnotated

_ChemProbAnnotations

private ArrayList<ChemProbAnnotation> _ChemProbAnnotations
Constructor Detail

RNA

public RNA()

RNA

public RNA(String n)

RNA

public RNA(RNA r)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

init

public void init()

saveRNADBN

public void saveRNADBN(String path,
                       String title)
                throws fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden
Throws:
fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden

getBaseInnerColor

public Color getBaseInnerColor(int i,
                               VARNAConfig conf)

getBaseOuterColor

public Color getBaseOuterColor(int i,
                               VARNAConfig conf)

getBaseNameColor

public Color getBaseNameColor(int i,
                              VARNAConfig conf)

getBasePairColor

public Color getBasePairColor(ModeleBP bp,
                              VARNAConfig conf)

getBasePairThickness

public double getBasePairThickness(ModeleBP bp,
                                   VARNAConfig conf)

drawSymbol

private void drawSymbol(SecStrDrawingProducer out,
                        double posx,
                        double posy,
                        double normx,
                        double normy,
                        double radius,
                        boolean isCIS,
                        ModeleBP.Edge e,
                        double thickness)

drawBasePair

private void drawBasePair(SecStrDrawingProducer out,
                          Point2D.Double orig,
                          Point2D.Double dest,
                          ModeleBP style,
                          VARNAConfig conf)

drawColorMap

private void drawColorMap(VARNAConfig _conf,
                          SecStrDrawingProducer out)

renderRegionHighlights

private void renderRegionHighlights(SecStrDrawingProducer out,
                                    Point2D.Double[] realCoords,
                                    Point2D.Double[] realCenters)

saveRNA

private void saveRNA(String path,
                     VARNAConfig conf,
                     double scale,
                     SecStrDrawingProducer out)
              throws fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden
Throws:
fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden

buildCaptionPosition

Point2D.Double buildCaptionPosition(ModeleBase mb,
                                    double heightEstimate,
                                    VARNAConfig conf)

getBPHeightIncrement

public double getBPHeightIncrement()

setBPHeightIncrement

public void setBPHeightIncrement(double d)

drawChemProbAnnotation

private void drawChemProbAnnotation(SecStrDrawingProducer out,
                                    ChemProbAnnotation cpa,
                                    Point2D.Double anchor,
                                    double minX,
                                    double minY)

renderAnnotations

private void renderAnnotations(SecStrDrawingProducer out,
                               double minX,
                               double minY,
                               VARNAConfig conf)

isNumberDrawn

public boolean isNumberDrawn(ModeleBase mb,
                             int numPeriod)

saveRNAEPS

public void saveRNAEPS(String path,
                       VARNAConfig conf)
                throws fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden
Throws:
fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden

saveRNAXFIG

public void saveRNAXFIG(String path,
                        VARNAConfig conf)
                 throws fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden
Throws:
fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden

saveRNASVG

public void saveRNASVG(String path,
                       VARNAConfig conf)
                throws fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden
Throws:
fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden

getBBox

public Rectangle2D.Double getBBox()

setCoord

public void setCoord(int index,
                     Point2D.Double p)

setCoord

public void setCoord(int index,
                     double x,
                     double y)

getCoords

public Point2D.Double getCoords(int i)

getBaseContent

public String getBaseContent(int i)

getBaseNumber

public int getBaseNumber(int i)

getCenter

public Point2D.Double getCenter(int i)

setCenter

public void setCenter(int i,
                      double x,
                      double y)

setCenter

public void setCenter(int i,
                      Point2D.Double p)

drawRNACircle

public void drawRNACircle()

drawRNAVARNAView

public void drawRNAVARNAView()

drawRNALine

public void drawRNALine()

computeHelixEndPointDirections

private void computeHelixEndPointDirections(RNATemplate.RNATemplateElement.EdgeEndPoint helixEndPoint,
                                            Point2D.Double i,
                                            Point2D.Double j)
IN: Argument helixEndPoint is an IN argument (will be read), and must contain an helix edge endpoint. The other arguments are OUT arguments (must be existing objects, content will be overwritten). OUT: The i argument will contain a vector colinear to the vector from the helix startPosition to endPosition or the opposite depending on there the endpoint is (the endpoint will be on the destination side of the vector). ||i|| = 1 OUT: The j vector will contain an vector that is colinear to the last/first base pair connection on the side of this endpoint. The vector will be oriented to the side of the given endpoint. ||j|| = 1


computeBezierTangentVectorTarget

private void computeBezierTangentVectorTarget(RNATemplate.RNATemplateElement.EdgeEndPoint endPoint,
                                              Point2D.Double curveEndPoint,
                                              Point2D.Double curveVectorOtherPoint)
                                       throws RNATemplateDrawingAlgorithmException
A cubic Bezier curve can be defined by 4 points, see http://en.wikipedia.org/wiki/Bezier_curve#Cubic_B.C3.A9zier_curves For each of the curve end points, there is the last/first point of the curve and a point which gives the direction and length of the tangent vector on that side. This two points are respectively curveEndPoint and curveVectorOtherPoint. IN: Argument helixVector is the vector formed by the helix, in the right direction for our sequence. IN: Argument curveEndPoint is the position of the endpoint on the helix. OUT: Argument curveVectorOtherPoint must be allocated and the values will be modified.

Throws:
RNATemplateDrawingAlgorithmException

angleFromVector

private static double angleFromVector(Point2D.Double v)
Compute the angle made by a vector.


angleFromVector

private static double angleFromVector(double x,
                                      double y)

computeLengthIncreaseFactor

private double computeLengthIncreaseFactor(int[] basesInHelixArray,
                                           RNATemplate.RNATemplateHelix helix)
Compute (actual helix length / helix length in template).


computeLengthIncreaseDelta

private Point2D.Double computeLengthIncreaseDelta(int[] basesInHelixArray,
                                                  RNATemplate.RNATemplateHelix helix)
Compute (actual helix vector - helix vector in template).


computeTemplateHelixVectors

private void computeTemplateHelixVectors(RNATemplate.RNATemplateHelix helix,
                                         Point2D.Double o,
                                         Point2D.Double i,
                                         Point2D.Double j)
Compute helix interesting vectors from template helix.

Parameters:
helix - The template helix you want to compute the vectors from.
o - This point coordinates will be set the origin of the helix (or not if null), ie. the point in the middle of the base pair with the two most extreme bases.
i - Will be set to the normalized helix vector. (nothing done if null)
j - Will be set to the normalized helix base pair vector (5' -> 3'). (nothing done if null)

estimateBulgeArcLength

private double estimateBulgeArcLength(int firstBase,
                                      int lastBase)
Estimate bulge arc length.


estimateBulgeWidth

private double estimateBulgeWidth(int firstBase,
                                  int lastBase)
Estimate bulge width, the given first and last bases must be those in the helix.


estimateBulgeWidthOLD

private double estimateBulgeWidthOLD(int firstBase,
                                     int lastBase)
Estimate bulge width, the given first and last bases must be those in the helix.


computeHelixTemplateLength

private double computeHelixTemplateLength(RNATemplate.RNATemplateHelix helix)
Get helix length in template.


computeHelixRealLength

private double computeHelixRealLength(int[] basesInHelixArray)
Compute helix actual length (as drawHelixLikeTemplateHelix() would draw it).


drawHelixLikeTemplateHelix

private double drawHelixLikeTemplateHelix(int[] basesInHelixArray,
                                          RNATemplate.RNATemplateHelix helix,
                                          Point2D.Double[] coords,
                                          Point2D.Double[] centers,
                                          double scaleHelixOrigin,
                                          Map<RNATemplate.RNATemplateHelix,Point2D.Double> translateVectors)
Draw the given helix (given as a *SORTED* array of indexes) like defined in the given template helix. OUT: The bases positions are not changed in fact, instead the coords and centers arrays are modified. IN: The helix origin position is multiplied by scaleHelixOrigin and translateVectors.get(helix) is added. RETURN VALUE: The length of the drawn helix.


drawHelixLikeTemplateHelixOLD

private void drawHelixLikeTemplateHelixOLD(int[] basesInHelixArray,
                                           RNATemplate.RNATemplateHelix helix,
                                           Point2D.Double[] coords,
                                           Point2D.Double[] centers,
                                           double scaleHelixOrigin,
                                           Map<RNATemplate.RNATemplateHelix,Point2D.Double> translateVectors)

drawOnBezierCurve

private void drawOnBezierCurve(int[] basesInSequence,
                               Point2D.Double P0,
                               Point2D.Double P1,
                               Point2D.Double P2,
                               Point2D.Double P3,
                               Point2D.Double[] coords,
                               Point2D.Double[] centers)
A Bezier curve can be defined by four points, see http://en.wikipedia.org/wiki/Bezier_curve#Cubic_B.C3.A9zier_curves Here we give this four points and an array of bases indexes (which must be indexes in this RNA sequence) which will be moved to be on the Bezier curve. The bases positions are not changed in fact, instead the coords and centers arrays are modified.


drawOnStraightLine

private void drawOnStraightLine(int[] basesInSequence,
                                Point2D.Double P0,
                                Point2D.Double P3,
                                Point2D.Double[] coords,
                                Point2D.Double[] centers)
Like drawOnBezierCurve(), but on a straight line.


drawAlongCurve

private void drawAlongCurve(int firstBase,
                            int lastBase,
                            Point2D.Double P0,
                            Point2D.Double P1,
                            Point2D.Double P2,
                            Point2D.Double P3,
                            Point2D.Double[] coords,
                            Point2D.Double[] centers)
This functions draws the RNA sequence between (including) firstBase and lastBase along a curve. The sequence may contain helices. Bezier curve: A Bezier curve can be defined by four points, see http://en.wikipedia.org/wiki/Bezier_curve#Cubic_B.C3.A9zier_curves Straight line: If P1 and P2 are null, the bases are drawn on a straight line. OUT: The bases positions are not changed in fact, instead the coords and centers arrays are modified.


symmetric

private static void symmetric(Point2D.Double p,
                              Point2D.Double v,
                              Point2D.Double[] points)
Compute the symmetric of all the points in the points array relative to the line that goes through p and has director vector v. The array is modified in-place.


computeHelixTranslations

private void computeHelixTranslations(Tree<RNANodeValueTemplate> tree,
                                      Map<RNATemplate.RNATemplateHelix,Point2D.Double> translateVectors,
                                      RNATemplateMapping mapping,
                                      Point2D.Double parentDeltaVector)

computeHelixTranslations

private Map<RNATemplate.RNATemplateHelix,Point2D.Double> computeHelixTranslations(Tree<RNANodeValueTemplate> tree,
                                                                                  RNATemplateMapping mapping)

drawRNATemplate

public RNATemplateMapping drawRNATemplate(RNATemplate template)
                                   throws RNATemplateDrawingAlgorithmException
Same as below, with default helixLengthAdjustmentMethod.

Throws:
RNATemplateDrawingAlgorithmException

drawRNATemplate

public RNATemplateMapping drawRNATemplate(RNATemplate template,
                                          int helixLengthAdjustmentMethod)
                                   throws RNATemplateDrawingAlgorithmException
Draw this RNA like the given template. The helixLengthAdjustmentMethod argument tells what to do in case some helices are of a different length in the template and the actual helix. See class DrawRNATemplateMethod above for possible values.

Throws:
RNATemplateDrawingAlgorithmException

objFun

private static double objFun(int n1,
                             int n2,
                             double r,
                             double bpdist,
                             double multidist)

determineRadius

public double determineRadius(int nbHel,
                              int nbUnpaired,
                              double startRadius)

determineRadius

public static double determineRadius(int nbHel,
                                     int nbUnpaired,
                                     double startRadius,
                                     double bpdist,
                                     double multidist)

drawRNA

public void drawRNA(VARNAConfig conf)
             throws fr.orsay.lri.varna.exceptions.ExceptionNAViewAlgorithm
Throws:
fr.orsay.lri.varna.exceptions.ExceptionNAViewAlgorithm

drawRNA

public void drawRNA(int mode,
                    VARNAConfig conf)
             throws fr.orsay.lri.varna.exceptions.ExceptionNAViewAlgorithm
Throws:
fr.orsay.lri.varna.exceptions.ExceptionNAViewAlgorithm

getDrawMode

public int getDrawMode()

drawLoop

private void drawLoop(int i,
                      int j,
                      double x,
                      double y,
                      double dirAngle,
                      Point2D.Double[] coords,
                      Point2D.Double[] centers)

drawRNARadiate

public void drawRNARadiate(VARNAConfig conf)

drawRNARadiate

public void drawRNARadiate(double dirAngle,
                           boolean flatExteriorLoop)

drawRNANAView

public void drawRNANAView()
                   throws fr.orsay.lri.varna.exceptions.ExceptionNAViewAlgorithm
Throws:
fr.orsay.lri.varna.exceptions.ExceptionNAViewAlgorithm

drawMOTIFView

public void drawMOTIFView()

getAllPartners

public ArrayList<ModeleBase> getAllPartners(int indice)

get_drawMode

public int get_drawMode()

setDrawMode

public void setDrawMode(int drawMode)

setRNA

public void setRNA(String seq,
                   String str)
            throws fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax,
                   fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses
Throws:
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses

setRNA

public void setRNA(String[] seq,
                   int[] str)
            throws fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
Throws:
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax

setRNA

public void setRNA(List<String> seq,
                   int[] str)
            throws fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
Throws:
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax

setRNA

public void setRNA(List<String> seq,
                   int[] str,
                   int baseIndex)
            throws fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
Throws:
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax

setRNA

public void setRNA(String[] seq,
                   int[] str,
                   int baseIndex)
            throws fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
Throws:
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax

setRNA

public void setRNA(String seq,
                   String struct,
                   ArrayList<Integer> basesOwn)
            throws fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses,
                   fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
Sets the RNA to be drawn. Uses when comparison mode is on. Will draw the super-structure passed in parameters and apply specials styles to the bases owning by each RNA alignment and both.

Parameters:
seq - - The sequence of the super-structure This sequence shall be designed like this: firstRNA1stBaseSecondRNA1stBaseFirstRNA2ndBaseSecondRNA2ndBase [...]
Example: AAC-GUAGA--UGG
struct - - The super-structure
basesOwn - - The RNA owning bases array (each index will be:0 when common base, 1 when first RNA alignment base, 2 when second RNA alignment base)
Throws:
fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax

setRNA

public void setRNA(List<String> seq,
                   String dbnStr)
            throws fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses,
                   fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
Throws:
fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax

explodeSequence

public static ArrayList<String> explodeSequence(String seq)

parseStruct

public int[] parseStruct(String str)
                  throws fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses,
                         fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
Throws:
fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax

getHelixInterval

public Point getHelixInterval(int index)

getHelix

public ArrayList<Integer> getHelix(int index)

getMultiLoop

public Point getMultiLoop(int index)

getLoopBases

public Vector<Integer> getLoopBases(int startIndex)

getStructDBN

public String getStructDBN()
Returns the RNA secondary structure displayed by this panel as a well-parenthesized word, accordingly to the DBN format

Returns:
This panel's secondary structure

paginateStructure

public ArrayList<int[]> paginateStructure()

getStructDBN

public String getStructDBN(boolean includeMostPKs)

getStructDBN

public String getStructDBN(int[] str)

getSeq

public String getSeq()
Returns the raw nucleotides sequence for the displayed RNA

Returns:
The RNA sequence

getStructBPSEQ

public String getStructBPSEQ()

getNonCrossingStruct

public int[] getNonCrossingStruct()

getNonOverlappingStruct

public int[] getNonOverlappingStruct()

getStructCT

public String getStructCT()

saveAsBPSEQ

public void saveAsBPSEQ(String path,
                        String title)
                 throws fr.orsay.lri.varna.exceptions.ExceptionExportFailed,
                        fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied
Throws:
fr.orsay.lri.varna.exceptions.ExceptionExportFailed
fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied

saveAsCT

public void saveAsCT(String path,
                     String title)
              throws fr.orsay.lri.varna.exceptions.ExceptionExportFailed,
                     fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied
Throws:
fr.orsay.lri.varna.exceptions.ExceptionExportFailed
fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied

saveAsDBN

public void saveAsDBN(String path,
                      String title)
               throws fr.orsay.lri.varna.exceptions.ExceptionExportFailed,
                      fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied
Throws:
fr.orsay.lri.varna.exceptions.ExceptionExportFailed
fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied

getListeBasesToString

public String getListeBasesToString()

loadSecStrBPSEQ

private boolean loadSecStrBPSEQ(Reader r)
                         throws fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied,
                                fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed,
                                fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
Throws:
fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied
fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax

loadSecStrCT

private boolean loadSecStrCT(Reader r)
                      throws fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied,
                             fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed,
                             fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
Throws:
fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied
fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax

applyBPs

private void applyBPs(ArrayList<ModeleBP> allbps)

loadSecStrRNAML

private boolean loadSecStrRNAML(Reader r)
                         throws fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied,
                                fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed,
                                fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
Throws:
fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied
fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax

loadSecStrDBN

private boolean loadSecStrDBN(Reader r)
                       throws fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed,
                              fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied,
                              fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses,
                              fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
Throws:
fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed
fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied
fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax

loadSecStr

public void loadSecStr(Reader r)
                throws fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
Throws:
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax

loadSecStr

public void loadSecStr(Reader r,
                       int fileType)
                throws fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
Throws:
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax

guessFileTypeFromExtension

public static int guessFileTypeFromExtension(String path)

loadSecStr

public void loadSecStr(String path)
                throws fr.orsay.lri.varna.exceptions.ExceptionExportFailed,
                       fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied,
                       fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed,
                       fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax,
                       fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses,
                       FileNotFoundException
Throws:
fr.orsay.lri.varna.exceptions.ExceptionExportFailed
fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied
fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses
FileNotFoundException

set_listeBases

public void set_listeBases(ArrayList<ModeleBase> _liste)

addVARNAListener

public void addVARNAListener(InterfaceVARNAListener rl)
Specified by:
addVARNAListener in class InterfaceVARNAObservable

warningEmition

public void warningEmition(String warningMessage)

applyStyleOnBases

public void applyStyleOnBases(ArrayList<Integer> basesList,
                              ModeleStyleBase style)

correctReciprocity

private int[] correctReciprocity(int[] str)

applyStruct

private void applyStruct(int[] str)
                  throws fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
Throws:
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax

get_listeBases

public ArrayList<ModeleBase> get_listeBases()

getSize

public int getSize()

findAll

public ArrayList<Integer> findAll()

findBulge

public ArrayList<Integer> findBulge(int index)

findStem

public ArrayList<Integer> findStem(int index)

getHelixCountOnLoop

public int getHelixCountOnLoop(int indice)

findLoop

public ArrayList<Integer> findLoop(int indice)

findLoopForward

public ArrayList<Integer> findLoopForward(int indice)

findPair

public ArrayList<Integer> findPair(int indice)

findLoopBackward

public ArrayList<Integer> findLoopBackward(int indice)

findHelix

public ArrayList<Integer> findHelix(int indice)

find3Prime

public ArrayList<Integer> find3Prime(int indice)

find5Prime

public ArrayList<Integer> find5Prime(int indice)

get_spaceBetweenBases

public Double get_spaceBetweenBases()

set_spaceBetweenBases

public void set_spaceBetweenBases(Double betweenBases)

angle

public static Double angle(Point2D.Double p1,
                           Point2D.Double p2,
                           Point2D.Double p3)

findNonPairedBaseGroup

public ArrayList<Integer> findNonPairedBaseGroup(Integer get_nearestBase)

getDrawn

public boolean getDrawn()

getStructureAux

public ArrayList<ModeleBP> getStructureAux()

getIndexFromBaseNumber

public int getIndexFromBaseNumber(int num)

addBPToStructureUsingNumbers

public void addBPToStructureUsingNumbers(int baseNumber5,
                                         int baseNumber3)
Adds a base pair to this RNA's structure. Tries to add it to the secondary structure first, eventually adding it to the 'tertiary' interactions if it clashes with the current secondary structure.

Parameters:
baseNumber5 - - Base number of the origin of this base pair
baseNumber3 - - Base number of the destination of this base pair

addBPToStructureUsingNumbers

public void addBPToStructureUsingNumbers(int number5,
                                         int number3,
                                         ModeleBP msbp)
Adds a base pair to this RNA's structure. Tries to add it to the secondary structure first, possibly adding it to the 'tertiary' interactions if it clashes with the current secondary structure.

Parameters:
number5 - - Base number of the origin of this base pair
number3 - - Base number of the destination of this base pair

addBPToStructure

public void addBPToStructure(int index5,
                             int index3)

addBPToStructure

public void addBPToStructure(int index5,
                             int index3,
                             ModeleBP msbp)

removeBP

public void removeBP(ModeleBP ms)

addBP

public void addBP(int i,
                  int j)

addBP

public void addBP(int i,
                  int j,
                  ModeleBP msbp)

addBPAux

public void addBPAux(int i,
                     int j)

addBPAux

public void addBPAux(int i,
                     int j,
                     ModeleBP msbp)

getBPsAt

public ArrayList<ModeleBP> getBPsAt(int i)

getBPStyle

public ModeleBP getBPStyle(int i,
                           int j)

getSecStrBPs

public ArrayList<ModeleBP> getSecStrBPs()

getAuxBPs

public ArrayList<ModeleBP> getAuxBPs()

getAllBPs

public ArrayList<ModeleBP> getAllBPs()

getAuxBPs

public ArrayList<ModeleBP> getAuxBPs(int i)

setBaseInnerColor

public void setBaseInnerColor(Color c)

setBaseNumbersColor

public void setBaseNumbersColor(Color c)

setBaseNameColor

public void setBaseNameColor(Color c)

setBaseOutlineColor

public void setBaseOutlineColor(Color c)

getName

public String getName()

setName

public void setName(String n)

getAnnotations

public ArrayList<TextAnnotation> getAnnotations()

removeAnnotation

public boolean removeAnnotation(TextAnnotation t)

addAnnotation

public void addAnnotation(TextAnnotation t)

removeAnnotation

public void removeAnnotation(String filter)

clearAnnotations

public void clearAnnotations()

autoAnnotateStrandEnds

public void autoAnnotateStrandEnds()

autoAnnotateHelices

public void autoAnnotateHelices()

autoAnnotateTerminalLoops

public void autoAnnotateTerminalLoops()

autoAnnotateInteriorLoops

public void autoAnnotateInteriorLoops()

getAnnotation

public TextAnnotation getAnnotation(int type,
                                    ModeleBase base)

addChemProbAnnotation

public void addChemProbAnnotation(ChemProbAnnotation cpa)

getChemProbAnnotations

public ArrayList<ChemProbAnnotation> getChemProbAnnotations()

setColorMapValues

public void setColorMapValues(Double[] values,
                              ModeleColorMap cm)

adaptColorMapToValues

public void adaptColorMapToValues(ModeleColorMap cm)

readValues

public void readValues(Reader r,
                       ModeleColorMap cm)

setColorMapValues

public void setColorMapValues(Double[] values,
                              ModeleColorMap cm,
                              boolean rescaleColorMap)

getColorMapValues

public Double[] getColorMapValues()

rescaleColorMap

public void rescaleColorMap(ModeleColorMap cm)

setSequence

public void setSequence(String s)

setSequence

public void setSequence(List<String> s)

eraseSequence

public void eraseSequence()

clone

public RNA clone()
Overrides:
clone in class Object

getBaseAt

public ModeleBase getBaseAt(int index)

getBasesAt

public ArrayList<ModeleBase> getBasesAt(Collection<? extends Integer> indices)

getBasesBetween

public ArrayList<ModeleBase> getBasesBetween(int from,
                                             int to)

addHighlightRegion

public void addHighlightRegion(HighlightRegionAnnotation n)

removeHighlightRegion

public void removeHighlightRegion(HighlightRegionAnnotation n)

removeChemProbAnnotation

public void removeChemProbAnnotation(ChemProbAnnotation a)

addHighlightRegion

public void addHighlightRegion(int from,
                               int to,
                               Color fill,
                               Color outline,
                               double radius)

addHighlightRegion

public void addHighlightRegion(int from,
                               int to)

getHighlightRegion

public ArrayList<HighlightRegionAnnotation> getHighlightRegion()

globalRotation

public void globalRotation(Double angleDegres)
Rotates the RNA coordinates by a certain angle

Parameters:
angleDegres - Rotation angle, in degrees

testDirectionality

public boolean testDirectionality(int i,
                                  int j,
                                  int k)

testDirectionality

public static boolean testDirectionality(Point2D.Double pi,
                                         Point2D.Double pj,
                                         Point2D.Double pk)

getOrientation

public double getOrientation()

hasVirtualLoops

public boolean hasVirtualLoops()