### 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 ###
f = tempfile()
write.table(pk[,c(1,4,2,3,6,5)],file=f,
row.names=FALSE,col.names=TRUE)
ctfile=loadCt(f)
### Before using ct2coord you need to remove the pseudo knots ###
l=pseudoKnot(ctfile)
dat=l[[2]]
cd=ct2coord(dat)
RNAPlot(cd)
Run the code above in your browser using DataLab