Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

rnaconvert

Convert secondary structure of RNA sequence between bracket and matrix notations

Syntax

RNAStruct2 = rnaconvert(RNAStruct)

Input Arguments

RNAStructSecondary structure of an RNA sequence represented by either:
  • Bracket notation

  • Connectivity matrix

    Tip   Use the rnafold function to create RNAStruct.

Output Arguments

RNAStruct2Secondary structure of an RNA sequence represented by either:
  • Bracket notation — Character vector of dots and brackets, where each dot represents an unpaired base, while a pair of equally nested, opening and closing brackets represents a base pair.

  • Connectivity matrix — Binary, upper-triangular matrix, where RNAmatrix(i, j) = 1 if and only if the ith residue in the RNA sequence Seq is paired with the jth residue of Seq.

Description

RNAStruct2 = rnaconvert(RNAStruct) returns RNAStruct2, the secondary structure of an RNA sequence, in matrix notation (if RNAStruct is in bracket notation), or in bracket notation (if RNAStruct is in matrix notation).

Examples

Converting from Bracket to Matrix Notation

  1. Create a character vector representing a secondary structure of an RNA sequence in bracket notation.

    Bracket = '(((..((((.......)))).((.....)).))).';
  2. Convert the secondary structure to a connectivity matrix representation.

    Matrix = rnaconvert(Bracket);

Converting from Matrix to Bracket Notation

  1. Create a connectivity matrix representing a secondary structure of an RNA sequence.

        Matrix2 = zeros(12);
        Matrix2(1,12) = 1;
        Matrix2(2,11) = 1;
        Matrix2(3,10) = 1;
        Matrix2(4,9) = 1;
  2. Convert the secondary structure to bracket notation.

    Bracket2 = rnaconvert(Matrix2)
    
    Bracket2 =
    
    ((((....))))

See Also

|

Introduced in R2007b

Was this topic helpful?