Module 9

Multiple FASTA sequences

Handling more than one record.

Many records

A FASTA file often contains many records. You can split the file on > to separate them.

Python
fasta = ">Tv01\nATGC\n>Tv02\nGGGG"
records = fasta.split(">")[1:]
for rec in records:
    print(rec.strip())
Tv01 ATGC Tv02 GGGG
Your task

Parse multiple FASTA

  • Split a multi-FASTA string on > and print each record.