Description Usage Arguments Value Examples
View source: R/ncRNAtools_secondaryStructurePredictionFunctions.R
Generates a string with the secondary structure of an RNA sequence from a table of paired bases.
1 | pairsToSecondaryStructure(pairedBases, sequence)
|
pairedBases |
A dataframe where each row contains the information of two bases that form a pair. The dataframe should contain columns named "Position1" and "Position2" indicating respectively the positions of the 5' and 3' bases involved in the base pair. |
sequence |
string with the RNA sequence corresponding to the provided table of paired bases. Should contain only standard RNA symbols (i.e., "A", "U", "G" and "C"), and no spaces or newlines. |
A string representing the secondary structure of the provided RNA in the Dot-Bracket format.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # Read a Dot Bracket file with the secondary structure of an RNA sequence:
exampleDotBracketFile <- system.file("extdata", "exampleDotBracket.dot",
package="ncRNAtools")
exampleDotBracket <- readDotBracket(exampleDotBracketFile)
# Generate a dataframe of paired bases from the returned secondary structure
# string:
pairedBasesTable <- findPairedBases(secondaryStructureString=exampleDotBracket$secondaryStructure,
sequence=exampleDotBracket$sequence)
# Generate a secondary structure string from the table of paired bases:
secondaryStructureString <- pairsToSecondaryStructure(pairedBasesTable,
exampleDotBracket$sequence)
# Verify that the resulting secondary structure string is equal to the original
# prediction:
secondaryStructureString == exampleDotBracket$secondaryStructure
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.