AB1 to FASTQ
3
0
Entering edit mode
6.0 years ago
DanielC ▴ 170

Dear All,

Could you please share on how to convert AB1 files to FASTQ file format standalone? Thanks much.

FASTQ AB1 CONVERSION • 12k views
ADD COMMENT
1
Entering edit mode

While it would be possible to do that by generating fasta from AB1 and then adding fake Q scores to make fake fastq, the question is why you would want to do this.

ADD REPLY
2
Entering edit mode
5.7 years ago
trausch ★ 1.9k

Tracy can also convert to Fasta or Fastq:

tracy basecall -o out.fastq -f fastq input.ab1
ADD COMMENT
1
Entering edit mode
5.7 years ago
Chronos ▴ 610

If you wish to batch-convert hundreds of AB1 files, and you are comfortable with command line and compiling tools, then you can use TraceTuner, see this thread on seqanswers on how to add .fastq support to it.

Another command-line solution would be to use seqret from the EMBOSS suite: seqret -sformat abi -osformat fastq -auto -stdout -sequence input.ab1 > output.fastq"

Otherwise, graphical molecular biology programs usually handle AB1 with ease, and will allow conversion.

ADD COMMENT
1
Entering edit mode
4.3 years ago

I realize this is late, but I found an additional way to do this using Biopython, which you have to install prior to the following:

$python3
$from Bio import SeqIO
$record = SeqIO.parse("file.ab1", "abi")
$count = SeqIO.write(record, "file.fastq", "fastq")
ADD COMMENT
0
Entering edit mode

Out of curiosity what Q score (fake) does biopython assign to these reads?

ADD REPLY
0
Entering edit mode

You can extract the quality scores in BioPython:

seqHandle = SeqIO.parse("file.ab1", "abi")

for seq in seqHandle:
    seqName = seq.id
    seqStr = str(seq.seq)
    seqQual = seq.letter_annotations["phred_quality"]

You probably also want to do some additional trimming, and I would definitely encourage you to go back and look at the original trace (if you think there might be a mutation).

However, this means that you would write each desired sequence manually. For simplicity, you could output a trimmed FASTA file. However, with the information above, you could still create a FASTQ file:

https://en.wikipedia.org/wiki/FASTQ_format#Format

ADD REPLY
0
Entering edit mode

The quality score was actually defined for Sanger reads before Illumina reads. However, Illumina has also changed the quality offset over time.

This may also be a bit like the quality score distribution looking noticeably different for Illumina versus PacBio CCS reads. So, you may need to use your own judgement about what quality scores correspond to nucleotides that should be trimmed.

ADD REPLY

Login before adding your answer.

Traffic: 1622 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6