Learn R Programming

RRNA (version 1.2)

ct2knet: creates a knet file from a CT file

Description

Knet files are used as inputs for KnetFold secondary structure prediction program

Usage

ct2knet(file, ind = 0)

Value

Retuns a string containing the contains of the knet file

Arguments

file

Name of the CT file being converted to KnetFold file

ind

Index used to relabel sequence indexes

Author

JP Bida

Examples

Run this code
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

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

### Convert CT file to Knet ###
out=ct2knet(f,0)

Run the code above in your browser using DataLab