Contenido principal

rnaconvert

Convert secondary structure of RNA sequence between bracket and matrix notations

    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).

    example

    Examples

    collapse all

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

    Bracket = "(((..((((.......)))).((.....)).))).";

    Convert the secondary structure to a connectivity matrix representation.

    Matrix = rnaconvert(Bracket);

    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;

    Convert the secondary structure to bracket notation.

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

    Input Arguments

    collapse all

    Input secondary structure of an RNA sequence, specified as a character vector or string (bracket notation) or a binary, upper-triangular matrix (matrix notation).

    • Bracket notation is a bracket of dots and brackets indicating the bracket notation. In the bracket notation, each dot represents an unpaired base, while a pair of equally nested, opening and closing brackets represents a base pair.

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

    Use the rnafold function to create RNAStruct.

    Data Types: double | char | string

    Output Arguments

    collapse all

    Output secondary structure of an RNA sequence, returned as a character vector (bracket notation) or a binary, upper-triangular matrix (matrix notation).

    Version History

    Introduced in R2007b

    See Also

    |