RNA: Counting DNA Nucleotides | Ben Cunningham

RNA: Counting DNA Nucleotides

Problem by Rosalind · on July 1, 2012

An RNA string is a string formed from the alphabet containing ‘A’, ‘C’, ‘G’, and ‘U’.

Given a DNA string corresponding to a coding strand, its transcribed RNA string is formed by replacing all occurrences of ‘T’ in with ‘U’ in .

Given: A DNA string having length at most 1000 nt.

Return: The transcribed RNA string of .

Sample Dataset

GATGGAACTTGACTACGTAAATT

Sample Output

GAUGGAACUUGACUACGUAAAUU

R

f <- "rna.txt"

cat(gsub("T", "U", readLines(f)))
GAUGGAACUUGACUACGUAAAUU