Sanger to fastq

Sometimes we find ourselves with some Sanger data that we would like to use to prototype an NGS workflow. Here’s a script to turn a list of ab1 files into a single fastq file suitable for that.

from Bio import SeqIO

# list of ab1 files
files = ["1.ab1", "2.ab1"]

records = []

for file in files:
    record = next(SeqIO.parse(file, "abi"))

SeqIO.write(records, "all_out.fastq", "fastq")



Enjoy Reading This Article?

Here are some more articles you might like to read next:

  • Google Gemini updates: Flash 1.5, Gemma 2 and Project Astra
  • Displaying External Posts on Your al-folio Blog
  • Chain renaming in PyMOL
  • De-spaghettification
  • PyMOL mapping notes