Till KTH:s startsida Till KTH:s startsida

Translate DNA

Use BioPython to write a program that reads a Fasta file containing genes and writes their translations to stdout.

You may not re-use any code from lab 1. Input, output, and translation must be done using BioPython.

Test data

This file contains interesting tests.

Here is an empty file.

Requirements

  • Your program must handle all test files gracefully.

Example session:


./gene2prot translationtest.dna
>stopcodons
***************************
>alphabet_gene
ARNDCQEGHILKMFPSTWYV
>alphabet_gene2
ARNDCQEGHILKMFPSTWYV