Entering edit mode
4.1 years ago
omar.sayyouh
•
0
Assume you have the following DNA sequence ACAGTCGACTAGCTTGCACGTAC,how to write an R function script called “DNA_to_RNA.R” to convert this sequence to an RNA sequence, assuming perfect transcription process without any loss in the DNA sequence bases. You have to loop over the whole sequence and check each character in the DNA sequence separately before converting to an RNA sequence.
Just change T to U no ? Why would you do that ? Homework ?
yes but i think i need to do a loop
Please show some effort. What did you try?
i am trying with the "for loop" now
this does not work
That is not how for-loops work. Please spend some time on baic
R
.gsub
already operates on the entire DNA string. The string, orx
is a single element so you cannot loop through it.