Main Content

rna2dna

Convert RNA sequence to DNA sequence

Description

example

SeqDNA = rna2dna(SeqRNA) converts an RNA sequence to a DNA sequence by replacing uracil (U) nucleotides with thymine (T) nucleotides.

Examples

collapse all

Generate a random RNA sequence.

rna = randseq(100,Alphabet='rna')
rna = 
'UUAUGACGUUAUUCUACUUUGAUUGUGCGAGACAAUGCUACCUUACCGGUCGGAACUCGAUCGGUUGAACUCUAUCACGCCUGGUCUUCGAAGUUAGCAC'

Convert the RNA sequence to a DNA sequence.

dna = rna2dna(rna)
dna = 
'TTATGACGTTATTCTACTTTGATTGTGCGAGACAATGCTACCTTACCGGTCGGAACTCGATCGGTTGAACTCTATCACGCCTGGTCTTCGAAGTTAGCAC'

Input Arguments

collapse all

RNA sequence, specified as one of the following.

Example: SeqDNA = dna2rna("CGACUU") replaces the instances of U with T.

Data Types: double | char | string | struct

Output Arguments

collapse all

DNA sequence, returned as a character vector or a row vector of integers.

  • If SeqRNA is a character vector or string scalar, then the function returns a character vector.

  • If SeqRNA is a row vector of integers, then the function returns a row vector of integers.

  • If SeqRNA is a structure, then the function returns SeqDNA with the same data type as the Sequence field, either a character vector or a row vector of integers.

Version History

Introduced before R2006a

See Also

| | |