Learn R Programming

RRNA (version 1.2)

transformFold: Internal function to translate and rotate a secondary structure plot

Description

Given a coordinate file, a point, and an angle in radians transformFold rotates the fold around the given point the given number of radians.

Usage

transformFold(dat, x0, y0, ang)

Value

dat frame containing the rotated coordinates

Arguments

dat

Coordinate file containing multiple RNA folds

x0

x coordinate of center of rotation

y0

y coordinate of center of rotation

ang

angle of rotation in radians

Author

JP Bida

See Also

alignCoord

Examples

Run this code

ct=makeCt("((((...(((((((.........)))))))...((((.........))))...))))",
          "AAAAAAAACCCCCCCCAAAGGGGGGGAUUACCCCUCCUUUAAAAGGGUUUUCCCCCCC")

c1=ct2coord(ct)

RNAPlot(c1)

c2=transformFold(c1,0,0,pi/2)
c3=transformFold(c2,0,0,pi/2)
c4=transformFold(c3,0,0,pi/2)

RNAPlot(c2,add=TRUE)
RNAPlot(c3,add=TRUE)
RNAPlot(c4,add=TRUE)

Run the code above in your browser using DataLab