Description Usage Arguments Value Author(s) See Also Examples
Given a coordinate file with multiple RNA secondary structures, it aligns all folds such that n1 is at position (x,y) and n2 has its y coordinate equal to y
1 | alignCoord(data, n1, n2, x, y)
|
data |
R data frame containing the coordinates for plotting a given secondary structure |
n1 |
Nucleotide position that will be translated to (x,y) |
n2 |
Nucleotide position that will have its y coordinate equal to y |
x |
x coordinate that n1 will be translated to |
y |
y coordinate that n1 will be translated to |
Returns a data frame containing fold coordinates.
JP Bida
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ### Create two RNA secondary structures ####
ct1=makeCt(
"((((...(((((((....)))))))...((((...))))...))))",
"CCCCAAAGGGGGGGAUUACCCCUCCUUUAAAAGGGUUUUCCCCCCC"
)
ct2=makeCt(
"((((...(((((((....))))))).((..((...))))...))))",
"CCCCAAAGGGGGGGAUUACCCCUCCUUUAAAAGGGUUUUCCCCCCC"
)
### Create a coordinate file ####
dat1=ct2coord(ct1)
### Each RNA fold needs its own id ###
dat1$id=1
#### Create a coordinate file ####
dat2=ct2coord(ct2)
### Each RNA fold needs its own id ###
dat2$id=2
dat=rbind(dat1,dat2)
adat=alignCoord(dat,1,46,0,0)
### Plot the aligned RNA folds ####
RNAPlot(adat[adat$id==1,])
l=length(adat$seq[adat$id==2])
RNAPlot(adat[adat$id==2,],modspec=TRUE,modp=c(1:l),modcol=rep(4,l),mod=rep(16,l),add=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.