This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Converting A Dna Sequence To Abi Or Scf Format

I have a DNA sequence from macrogen and file. How can i convert this data to SCF or ABI format

format conversion

Which format (file extension) do you have?

1 answer

Assuming you have BioPerl with the iolib modules compiled in:

 my $seq_in = Bio::SeqIO->new('-file' => "<$infile",
                              '-format' => 'fasta');
 my $seq_out = Bio::SeqIO->new('-file' => ">$outfile",
                               '-format' => 'scf'); ## or 'abi'
 # write each entry in the input file to the output file
 while (my $inseq = $seq_in->next_seq) {
    $seq_out->write_seq($inseq);
 }
 exit;

The above does not work... I get the following error:

Reference found where even-sized list expected at /usr/share/perl5/Bio/SeqIO/scf.pm line 610, <GEN0> line 5.

------------- EXCEPTION: Bio::Root::Exception -------------
MSG: You must pass a Bio::Seq::Quality or a Bio::Seq::SequenceTrace object to write_seq as a parameter named "target"
STACK: Error::throw
STACK: Bio::Root::Root::throw /usr/share/perl5/Bio/Root/Root.pm:486
STACK: Bio::SeqIO::scf::write_seq /usr/share/perl5/Bio/SeqIO/scf.pm:625
STACK: fastq2scf.pl:14
-----------------------------------------------------------

You did not provide the quality measures (the fasta does not have them, only the sequence), therefore, how is it going to get a chromatogram from those?

Log in to answer this question.