alignCoord: Alignment of secondary structure folds to 2 nucleotides.

Description Usage Arguments Value Author(s) See Also Examples

Description

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

Usage

1
alignCoord(data, n1, n2, x, y)

Arguments

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

Value

Returns a data frame containing fold coordinates.

Author(s)

JP Bida

See Also

RNAPlot

Examples

 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)

RRNA documentation built on May 2, 2019, 1:06 p.m.