findPairedBases: Determines paired bases from secondary structure string

Description Usage Arguments Value Examples

View source: R/ncRNAtools_secondaryStructurePredictionFunctions.R

Description

Determines bases that form pairs in a given RNA sequence from the secondary structure string of the RNA sequence.

Usage

1
findPairedBases(secondaryStructureString, sequence)

Arguments

secondaryStructureString

A string representing the secondary structure of the RNA sequence in the Dot-Bracket format.

sequence

string with the RNA sequence corresponding to the provided secondary structure string. Should contain only standard RNA symbols (i.e., "A", "U", "G" and "C").

Value

A dataframe where each row denotes a base pair. The dataframe comprises the following 4 columns:

Position1

position in the sequence of the nucleotide involved in the base pair closest to the 5' end of the RNA.

Position2

position in the sequence of the nucleotide involved in the base pair closest to the 3' end of the RNA.

Nucleotide1

nucleotide type of the base in Position1.

Nucleotide2

nucleotide type of the base in Position2.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# 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)

ncRNAtools documentation built on Nov. 8, 2020, 8:14 p.m.