Question: AB1 to FASTQ
0
gravatar for DanielC
21 months ago by
DanielC100
Canada
DanielC100 wrote:

Dear All,

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

conversion ab1 fastq • 2.8k views
ADD COMMENTlink modified 4 days ago by renaegeier10 • written 21 months ago by DanielC100
1

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 REPLYlink modified 21 months ago by WouterDeCoster42k • written 21 months ago by genomax76k
1
gravatar for Chronos
17 months ago by
Chronos580
Germany
Chronos580 wrote:

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 COMMENTlink modified 17 months ago • written 17 months ago by Chronos580
1
gravatar for trausch
17 months ago by
trausch1.4k
Germany
trausch1.4k wrote:

Tracy can also convert to Fasta or Fastq:

tracy basecall -o out.fastq -f fastq input.ab1
ADD COMMENTlink written 17 months ago by trausch1.4k
1
gravatar for renaegeier
4 days ago by
renaegeier10
renaegeier10 wrote:

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 COMMENTlink modified 4 days ago by finswimmer13k • written 4 days ago by renaegeier10

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

ADD REPLYlink written 4 days ago by genomax76k

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 REPLYlink modified 3 days ago • written 3 days ago by Charles Warden7.5k

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 REPLYlink modified 3 days ago • written 3 days ago by Charles Warden7.5k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1383 users visited in the last hour