Transcribe and mirror
THE BRIEF
The first step of the central dogma is transcription: the cell copies a gene into messenger RNA. In RNA the base thymine (T) is replaced by uracil (U). DNA is also double stranded, and the other strand is the reverse complement of the one you were given, so genes can be read from either strand.
Your task. For the DNA fragment you are given, print two lines:
- The RNA transcript of the given strand (replace every
TwithU). - The reverse complement of the given strand: swap every base for its partner (
A/T,C/G) and then reverse the whole string.
Input. One line: the DNA fragment (letters A, C, G, T only).
Output. Two lines.
GIVEN INPUT
Your code reads this from standard input (input() or sys.stdin), both here and when it is graded.
ATGGCCATGGCGCCCAGAACTGAGATCAATAGTACCCGTATTAACGGGTGA
EXPECTED OUTPUT FOR THIS INPUT
AUGGCCAUGGCGCCCAGAACUGAGAUCAAUAGUACCCGUAUUAACGGGUGA TCACCCGTTAATACGGGTACTATTGATCTCAGTTCTGGGCGCCATGGCCAT
SKILLS YOU'LL USE
Stuck? These bank problems practise the same techniques.
Write your code
Check your understanding
A quick self-check, marked right here in your browser. It is not graded or saved.
What is the reverse complement of the strand 5'-ATGC-3'?
Complement gives TACG, and reversing it gives GCAT.
During transcription, which RNA base takes the place of thymine?
RNA uses uracil (U) where DNA uses thymine (T).
Explain and submit
Describe how you built the reverse complement and why you need to reverse the string as well as swap the bases.
Your submissions (0)
You can look ahead; come back to finish this stage.