loadCt: Loads a CT file into an R data frame

Description Usage Arguments Value Author(s) See Also Examples

Description

A variety of RNA secondary structure prediction programs produce CT files. You can load these CT files into R using the loadCT function.

Usage

1

Arguments

file

The name of the CT file being loaded

Value

Returns at data frame containing the CT file data

Author(s)

JP Bida

See Also

RNAPlot aptPlotCT

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
### Create a CT file with PseudoKnots ###
pk=makeCt("((((...(((((((.........)))))))...((((.........))))...))))",
          "AAAAAAAACCCCCCCCAAAGGGGGGGAUUACCCCUCCUUUAAAAGGGUUUUCCCCCCC"
         )
pk$bound[pk$pos==20]=42
pk$bound[pk$pos==19]=43
pk$bound[pk$pos==43]=19
pk$bound[pk$pos==42]=20

### Create a CT file for testing ###
write.table(pk[,c(1,4,2,3,6,5)],file="test.ct",
            row.names=FALSE,col.names=TRUE)

ctfile=loadCt("test.ct")

### Before using ct2coord you need to remove the pseudo knots ###

l=pseudoKnot(ctfile)
dat=l[[2]]
cd=ct2coord(dat)
RNAPlot(cd)

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