Converting Ab1 Trace Files Into Scf Trace Files
5
3
Entering edit mode
14.5 years ago
Will 4.6k

I've got a large collection of trace sequence files which are in .ab1 file format. I need to import the TRACE DATA (not just the base-calls) into Matlab. Matlab has an scf reader so I though it would be easy to find a little tool that could convert ab1 files to scf files, but alas.

  • I've tried SeqVerter (doesn't output in trace format only base-calls)
  • DNA Baser (doesn't install)
  • Staden (can't get to install)
  • Tried abiparser.py (error in file format)

Any suggestions,

Thanks
Will

sequence • 14k views
ADD COMMENT
0
Entering edit mode

re Staden: which version of Staden and which platform?

ADD REPLY
0
Entering edit mode

What was your problem with staden ?

ADD REPLY
0
Entering edit mode

What OS are you using/have access to ? That would help answer the question.

ADD REPLY
0
Entering edit mode

4 programs and none works? There must be something wrong with your computer :)

ADD REPLY
7
Entering edit mode
14.5 years ago

This works for me (5 minutes ago on OSX) :

  • Download the source for iolib
  • Extract
  • Compile (read README if you need help with that)
  • This gives me convert_trace in the progs subdirectory
  • Using the info at http://staden.sourceforge.net/manual/manpages_unix_1.html, I converted an abi file to scf, using this command line:

    /convert_trace -out_format scf < trace.ab1 > trace.scf
    
  • After conversion I viewed both in a trace viewer(FinchTV), and they looked the same.
ADD COMMENT
0
Entering edit mode

this is what I ended up doing ... I didn't notice until later that you can install just the "conversion" utilities. It was all of the graphics stuff that was having trouble compiling in the end.

ADD REPLY
0
Entering edit mode

this suggestion worked well for me. the bioperl solution didn't work out of the box for me, and whatever I did to "fix" it just resulted in the called base's trace showing up at a particular peak position (no secondary info). In any case, convert_trace does. This should be able to process directory-wide matching a wildcard/pattern

#!/bin/bash
#ab1toscf.bash
shopt -s extglob
while test $# -gt 0
do
    fn="$1"
    bn="$(basename $fn)"
    dn="$(dirname $fn)"
    bc="${bn%.*}"
    fe=".${bn##*.}"
    oe=".scf"
    out="${dn}/${bc}${oe}"
    `convert_trace -out_format scf &lt;$fn &gt;$out`
    shift
done
ADD REPLY
4
Entering edit mode
14.5 years ago

A bioperl solution extremely simple for a multi seq abi file, tested in every OS you can imagine:

use Bio::SeqIO;

$in = shift or die;
$out = shift or die;

$seq_in = Bio::SeqIO->new('-file' => "<$in", '-format' => "abi");
$seq_out = Bio::SeqIO->new('-file' => ">$out", '-format' => "scf");

while ($seq = $seq_in->next_seq) {
    $seq_out->write_seq($seq);
}

Of course, it's bioperl. So, check the consistency of your result.

ADD COMMENT
0
Entering edit mode

wow now that's a simple solution - hat is off to BioPerl

ADD REPLY
0
Entering edit mode

Under the hood, it uses Staden's io_lib, so you'll have to get that installed anyway.

ADD REPLY
0
Entering edit mode

That's absolutely right. bioperl-ext has a bunch of libs collected from other applications. And that's why it can handle such a large collection of file formats.

ADD REPLY
2
Entering edit mode
14.5 years ago
Phis ★ 1.1k

I think Bioperl should have this functionality. The Bio::SeqIO documentation states it can handle both ABI/AB1 and SCF trace file formats.

Also, if you have access to an ABI Sequencer, the current version of the Data Collection software can be made to write .scf files in addition to .ab1 files. And if you ever wish to do anything really funky with ABI raw files, ABI provides the full specification for the ABIF file format here.

ADD COMMENT
1
Entering edit mode
9.2 years ago
Michael G ▴ 80

The converter supplied in the package Staden works perfectly for such tasks. For example, from within your folder containing the .ab1 files, you can run:

for i in $(ls *.ab1); do convert_trace -out_format scf < $i > ${i%.ab1*}.scf; done
ADD COMMENT
0
Entering edit mode
6.0 years ago
BioApps ▴ 800

DNA Baser Assembler can convert between several formats including ABI to SCF.
If it doesn't install you have some kind of overzealous antivirus overreacting.

Here is a RAR package that you DON'T have to install: http://www.dnabaser.com/download/Biology-tools-package.rar
Just extract the files BEFORE you execute them.

Another program that will automatically convert ALL you ABI files to SCF is [Chromatogram Explorer][2].

ADD COMMENT

Login before adding your answer.

Traffic: 1751 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