Genomics Basics01/02
Starting sandbox…
Beginner·3 graded tests

DNA to mRNA: Transcription

The Central Dogma, in one function

The central dogma of molecular biology describes the flow of genetic information from DNA to RNA to functional protein. This exercise implements the first transformation: transcription.

Given a coding-strand DNA sequence, produce the corresponding mRNA sequence by swapping every T for a U. Biopython's Bio.Seq.Seq class provides a dedicated .transcribe() method that performs this base conversion directly on the coding strand without sequence reversal or complementation.

[1]python
out1ms
Seq('GAUGGAACUUGACUACGUAAAUU')

Your task

Fill in transcribe_dna so it:

  1. Wraps the input string in a Seq.
  2. Calls .transcribe().
  3. Returns the result as a plain str (the test harness compares strings, not Seq objects).

Your function will be run once per test case with the DNA sequence piped in on stdin, and your printed output is compared line-for-line against the expected mRNA.

Stretch goal

Nucleotide composition is often reported as %GC content:

%GC=G+CA+T+G+C×100\%GC = \frac{G + C}{A + T + G + C} \times 100

Upon completing the primary exercise, consider implementing a gc_content(dna: str) -> float helper to calculate nucleotide composition metrics for downstream analysis.

exerciseEvery submission runs independently in a fresh namespace.

Test cases · 3

#viainputexpected stdout
1stdinGATGGAACTTGACTACGTAAATTGAUGGAACUUGACUACGUAAAUU
2stdinATGCAUGC
3stdinTTTTAAAACCCCGGGGUUUUAAAACCCCGGGG