|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.orsay.lri.varna.interfaces.InterfaceVARNAObservable
fr.orsay.lri.varna.models.rna.RNA
public class RNA
The RNA model which contain the base list and the draw algorithm mode
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 |
---|
private static final long serialVersionUID
public static final int FILE_TYPE_BPSEQ
public static final int FILE_TYPE_CT
public static final int FILE_TYPE_DBN
public static final int FILE_TYPE_RNAML
public static final int FILE_TYPE_UNKNOWN
public static final int DRAW_MODE_CIRCULAR
public static final int DRAW_MODE_RADIATE
public static final int DRAW_MODE_NAVIEW
public static final int DRAW_MODE_LINEAR
public static final int DRAW_MODE_VARNA_VIEW
public static final int DRAW_MODE_MOTIFVIEW
public static final int DRAW_MODE_TEMPLATE
public static final int DEFAULT_DRAW_MODE
private Double _spaceBetweenBases
private int _drawMode
public int BASE_RADIUS
public static final double LOOP_DISTANCE
public static final double BASE_PAIR_DISTANCE
public static final double MULTILOOP_DISTANCE
public static final double VIRTUAL_LOOP_RADIUS
public double CHEM_PROB_DIST
public double CHEM_PROB_BASE_LENGTH
public double CHEM_PROB_ARROW_HEIGHT
public double CHEM_PROB_ARROW_WIDTH
public double CHEM_PROB_TRIANGLE_WIDTH
public double CHEM_PROB_PIN_SEMIDIAG
public double CHEM_PROB_DOT_RADIUS
public GeneralPath _debugShape
private boolean _drawn
public double _bpHeightIncrement
protected ArrayList<ModeleBase> _listeBases
StructureTemp _listStrands
private ArrayList<ModeleBP> _structureAux
private transient ArrayList<InterfaceVARNAListener> _listeVARNAListener
static ArrayList<String> _normalBases
private ArrayList<TextAnnotation> _listeAnnotations
private ArrayList<HighlightRegionAnnotation> _listeRegionHighlights
private String _name
public static double CHEM_PROB_ARROW_THICKNESS
private boolean _strandEndsAnnotated
private ArrayList<ChemProbAnnotation> _ChemProbAnnotations
Constructor Detail |
---|
public RNA()
public RNA(String n)
public RNA(RNA r)
Method Detail |
---|
public String toString()
toString
in class Object
public void init()
public void saveRNADBN(String path, String title) throws fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden
fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden
public Color getBaseInnerColor(int i, VARNAConfig conf)
public Color getBaseOuterColor(int i, VARNAConfig conf)
public Color getBaseNameColor(int i, VARNAConfig conf)
public Color getBasePairColor(ModeleBP bp, VARNAConfig conf)
public double getBasePairThickness(ModeleBP bp, VARNAConfig conf)
private void drawSymbol(SecStrDrawingProducer out, double posx, double posy, double normx, double normy, double radius, boolean isCIS, ModeleBP.Edge e, double thickness)
private void drawBasePair(SecStrDrawingProducer out, Point2D.Double orig, Point2D.Double dest, ModeleBP style, VARNAConfig conf)
private void drawColorMap(VARNAConfig _conf, SecStrDrawingProducer out)
private void renderRegionHighlights(SecStrDrawingProducer out, Point2D.Double[] realCoords, Point2D.Double[] realCenters)
private void saveRNA(String path, VARNAConfig conf, double scale, SecStrDrawingProducer out) throws fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden
fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden
Point2D.Double buildCaptionPosition(ModeleBase mb, double heightEstimate, VARNAConfig conf)
public double getBPHeightIncrement()
public void setBPHeightIncrement(double d)
private void drawChemProbAnnotation(SecStrDrawingProducer out, ChemProbAnnotation cpa, Point2D.Double anchor, double minX, double minY)
private void renderAnnotations(SecStrDrawingProducer out, double minX, double minY, VARNAConfig conf)
public boolean isNumberDrawn(ModeleBase mb, int numPeriod)
public void saveRNAEPS(String path, VARNAConfig conf) throws fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden
fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden
public void saveRNAXFIG(String path, VARNAConfig conf) throws fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden
fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden
public void saveRNASVG(String path, VARNAConfig conf) throws fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden
fr.orsay.lri.varna.exceptions.ExceptionWritingForbidden
public Rectangle2D.Double getBBox()
public void setCoord(int index, Point2D.Double p)
public void setCoord(int index, double x, double y)
public Point2D.Double getCoords(int i)
public String getBaseContent(int i)
public int getBaseNumber(int i)
public Point2D.Double getCenter(int i)
public void setCenter(int i, double x, double y)
public void setCenter(int i, Point2D.Double p)
public void drawRNACircle()
public void drawRNAVARNAView()
public void drawRNALine()
private void computeHelixEndPointDirections(RNATemplate.RNATemplateElement.EdgeEndPoint helixEndPoint, Point2D.Double i, Point2D.Double j)
private void computeBezierTangentVectorTarget(RNATemplate.RNATemplateElement.EdgeEndPoint endPoint, Point2D.Double curveEndPoint, Point2D.Double curveVectorOtherPoint) throws RNATemplateDrawingAlgorithmException
RNATemplateDrawingAlgorithmException
private static double angleFromVector(Point2D.Double v)
private static double angleFromVector(double x, double y)
private double computeLengthIncreaseFactor(int[] basesInHelixArray, RNATemplate.RNATemplateHelix helix)
private Point2D.Double computeLengthIncreaseDelta(int[] basesInHelixArray, RNATemplate.RNATemplateHelix helix)
private void computeTemplateHelixVectors(RNATemplate.RNATemplateHelix helix, Point2D.Double o, Point2D.Double i, Point2D.Double j)
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)private double estimateBulgeArcLength(int firstBase, int lastBase)
private double estimateBulgeWidth(int firstBase, int lastBase)
private double estimateBulgeWidthOLD(int firstBase, int lastBase)
private double computeHelixTemplateLength(RNATemplate.RNATemplateHelix helix)
private double computeHelixRealLength(int[] basesInHelixArray)
private double drawHelixLikeTemplateHelix(int[] basesInHelixArray, RNATemplate.RNATemplateHelix helix, Point2D.Double[] coords, Point2D.Double[] centers, double scaleHelixOrigin, Map<RNATemplate.RNATemplateHelix,Point2D.Double> translateVectors)
private void drawHelixLikeTemplateHelixOLD(int[] basesInHelixArray, RNATemplate.RNATemplateHelix helix, Point2D.Double[] coords, Point2D.Double[] centers, double scaleHelixOrigin, Map<RNATemplate.RNATemplateHelix,Point2D.Double> translateVectors)
private void drawOnBezierCurve(int[] basesInSequence, Point2D.Double P0, Point2D.Double P1, Point2D.Double P2, Point2D.Double P3, Point2D.Double[] coords, Point2D.Double[] centers)
private void drawOnStraightLine(int[] basesInSequence, Point2D.Double P0, Point2D.Double P3, Point2D.Double[] coords, Point2D.Double[] centers)
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)
private static void symmetric(Point2D.Double p, Point2D.Double v, Point2D.Double[] points)
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)
public RNATemplateMapping drawRNATemplate(RNATemplate template) throws RNATemplateDrawingAlgorithmException
RNATemplateDrawingAlgorithmException
public RNATemplateMapping drawRNATemplate(RNATemplate template, int helixLengthAdjustmentMethod) throws RNATemplateDrawingAlgorithmException
RNATemplateDrawingAlgorithmException
private static double objFun(int n1, int n2, double r, double bpdist, double multidist)
public double determineRadius(int nbHel, int nbUnpaired, double startRadius)
public static double determineRadius(int nbHel, int nbUnpaired, double startRadius, double bpdist, double multidist)
public void drawRNA(VARNAConfig conf) throws fr.orsay.lri.varna.exceptions.ExceptionNAViewAlgorithm
fr.orsay.lri.varna.exceptions.ExceptionNAViewAlgorithm
public void drawRNA(int mode, VARNAConfig conf) throws fr.orsay.lri.varna.exceptions.ExceptionNAViewAlgorithm
fr.orsay.lri.varna.exceptions.ExceptionNAViewAlgorithm
public int getDrawMode()
private void drawLoop(int i, int j, double x, double y, double dirAngle, Point2D.Double[] coords, Point2D.Double[] centers)
public void drawRNARadiate(VARNAConfig conf)
public void drawRNARadiate(double dirAngle, boolean flatExteriorLoop)
public void drawRNANAView() throws fr.orsay.lri.varna.exceptions.ExceptionNAViewAlgorithm
fr.orsay.lri.varna.exceptions.ExceptionNAViewAlgorithm
public void drawMOTIFView()
public ArrayList<ModeleBase> getAllPartners(int indice)
public int get_drawMode()
public void setDrawMode(int drawMode)
public void setRNA(String seq, String str) throws fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax, fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses
public void setRNA(String[] seq, int[] str) throws fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
public void setRNA(List<String> seq, int[] str) throws fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
public void setRNA(List<String> seq, int[] str, int baseIndex) throws fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
public void setRNA(String[] seq, int[] str, int baseIndex) throws fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
public void setRNA(String seq, String struct, ArrayList<Integer> basesOwn) throws fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses, fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
seq
- - The sequence of the super-structure This sequence shall be
designed like this:
firstRNA1stBaseSecondRNA1stBaseFirstRNA2ndBaseSecondRNA2ndBase [...]
AAC-GUAGA--UGG
struct
- - The super-structurebasesOwn
- - 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)
fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
public void setRNA(List<String> seq, String dbnStr) throws fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses, fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
public static ArrayList<String> explodeSequence(String seq)
public int[] parseStruct(String str) throws fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses, fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
public Point getHelixInterval(int index)
public ArrayList<Integer> getHelix(int index)
public Point getMultiLoop(int index)
public Vector<Integer> getLoopBases(int startIndex)
public String getStructDBN()
public ArrayList<int[]> paginateStructure()
public String getStructDBN(boolean includeMostPKs)
public String getStructDBN(int[] str)
public String getSeq()
public String getStructBPSEQ()
public int[] getNonCrossingStruct()
public int[] getNonOverlappingStruct()
public String getStructCT()
public void saveAsBPSEQ(String path, String title) throws fr.orsay.lri.varna.exceptions.ExceptionExportFailed, fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied
fr.orsay.lri.varna.exceptions.ExceptionExportFailed
fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied
public void saveAsCT(String path, String title) throws fr.orsay.lri.varna.exceptions.ExceptionExportFailed, fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied
fr.orsay.lri.varna.exceptions.ExceptionExportFailed
fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied
public void saveAsDBN(String path, String title) throws fr.orsay.lri.varna.exceptions.ExceptionExportFailed, fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied
fr.orsay.lri.varna.exceptions.ExceptionExportFailed
fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied
public String getListeBasesToString()
private boolean loadSecStrBPSEQ(Reader r) throws fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied, fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed, fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied
fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
private boolean loadSecStrCT(Reader r) throws fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied, fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed, fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied
fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
private void applyBPs(ArrayList<ModeleBP> allbps)
private boolean loadSecStrRNAML(Reader r) throws fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied, fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed, fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied
fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
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
fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed
fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied
fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
public void loadSecStr(Reader r) throws fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
public void loadSecStr(Reader r, int fileType) throws fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
public static int guessFileTypeFromExtension(String path)
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
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
public void set_listeBases(ArrayList<ModeleBase> _liste)
public void addVARNAListener(InterfaceVARNAListener rl)
addVARNAListener
in class InterfaceVARNAObservable
public void warningEmition(String warningMessage)
public void applyStyleOnBases(ArrayList<Integer> basesList, ModeleStyleBase style)
private int[] correctReciprocity(int[] str)
private void applyStruct(int[] str) throws fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax
public ArrayList<ModeleBase> get_listeBases()
public int getSize()
public ArrayList<Integer> findAll()
public ArrayList<Integer> findBulge(int index)
public ArrayList<Integer> findStem(int index)
public int getHelixCountOnLoop(int indice)
public ArrayList<Integer> findLoop(int indice)
public ArrayList<Integer> findLoopForward(int indice)
public ArrayList<Integer> findPair(int indice)
public ArrayList<Integer> findLoopBackward(int indice)
public ArrayList<Integer> findHelix(int indice)
public ArrayList<Integer> find3Prime(int indice)
public ArrayList<Integer> find5Prime(int indice)
public Double get_spaceBetweenBases()
public void set_spaceBetweenBases(Double betweenBases)
public static Double angle(Point2D.Double p1, Point2D.Double p2, Point2D.Double p3)
public ArrayList<Integer> findNonPairedBaseGroup(Integer get_nearestBase)
public boolean getDrawn()
public ArrayList<ModeleBP> getStructureAux()
public int getIndexFromBaseNumber(int num)
public void addBPToStructureUsingNumbers(int baseNumber5, int baseNumber3)
baseNumber5
- - Base number of the origin of this base pairbaseNumber3
- - Base number of the destination of this base pairpublic void addBPToStructureUsingNumbers(int number5, int number3, ModeleBP msbp)
number5
- - Base number of the origin of this base pairnumber3
- - Base number of the destination of this base pairpublic void addBPToStructure(int index5, int index3)
public void addBPToStructure(int index5, int index3, ModeleBP msbp)
public void removeBP(ModeleBP ms)
public void addBP(int i, int j)
public void addBP(int i, int j, ModeleBP msbp)
public void addBPAux(int i, int j)
public void addBPAux(int i, int j, ModeleBP msbp)
public ArrayList<ModeleBP> getBPsAt(int i)
public ModeleBP getBPStyle(int i, int j)
public ArrayList<ModeleBP> getSecStrBPs()
public ArrayList<ModeleBP> getAuxBPs()
public ArrayList<ModeleBP> getAllBPs()
public ArrayList<ModeleBP> getAuxBPs(int i)
public void setBaseInnerColor(Color c)
public void setBaseNumbersColor(Color c)
public void setBaseNameColor(Color c)
public void setBaseOutlineColor(Color c)
public String getName()
public void setName(String n)
public ArrayList<TextAnnotation> getAnnotations()
public boolean removeAnnotation(TextAnnotation t)
public void addAnnotation(TextAnnotation t)
public void removeAnnotation(String filter)
public void clearAnnotations()
public void autoAnnotateStrandEnds()
public void autoAnnotateHelices()
public void autoAnnotateTerminalLoops()
public void autoAnnotateInteriorLoops()
public TextAnnotation getAnnotation(int type, ModeleBase base)
public void addChemProbAnnotation(ChemProbAnnotation cpa)
public ArrayList<ChemProbAnnotation> getChemProbAnnotations()
public void setColorMapValues(Double[] values, ModeleColorMap cm)
public void adaptColorMapToValues(ModeleColorMap cm)
public void readValues(Reader r, ModeleColorMap cm)
public void setColorMapValues(Double[] values, ModeleColorMap cm, boolean rescaleColorMap)
public Double[] getColorMapValues()
public void rescaleColorMap(ModeleColorMap cm)
public void setSequence(String s)
public void setSequence(List<String> s)
public void eraseSequence()
public RNA clone()
clone
in class Object
public ModeleBase getBaseAt(int index)
public ArrayList<ModeleBase> getBasesAt(Collection<? extends Integer> indices)
public ArrayList<ModeleBase> getBasesBetween(int from, int to)
public void addHighlightRegion(HighlightRegionAnnotation n)
public void removeHighlightRegion(HighlightRegionAnnotation n)
public void removeChemProbAnnotation(ChemProbAnnotation a)
public void addHighlightRegion(int from, int to, Color fill, Color outline, double radius)
public void addHighlightRegion(int from, int to)
public ArrayList<HighlightRegionAnnotation> getHighlightRegion()
public void globalRotation(Double angleDegres)
angleDegres
- Rotation angle, in degreespublic boolean testDirectionality(int i, int j, int k)
public static boolean testDirectionality(Point2D.Double pi, Point2D.Double pj, Point2D.Double pk)
public double getOrientation()
public boolean hasVirtualLoops()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |