Dear All,
Could you please share on how to convert AB1 files to FASTQ file format standalone? Thanks much.
Dear All,
Could you please share on how to convert AB1 files to FASTQ file format standalone? Thanks much.
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.
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")
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:
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.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
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.