Hello everyone,
I want to use Phred and Phrap starting with a FASTQ file, as I posted in Phred/Phrap pipeline starting with FASTA file of paired-end reads and using a reference sequence which is still not solved.
I understand Phred needs a chromatogram file in SCF or ABI format as input. Hence, I need to convert my FASTQ file into SCF format, but I haven't found any converter around. Does anybody know any converter?
In the meantime, I am trying to convert the FASTQ file into SCF format using BioPerl, as suggested in Converting A Dna Sequence To Abi Or Scf Format
The BioPerl code provided in that thread does not work. I am on a Ubuntu machine and have already installed libstaden-read1 and staden-io-lib-utils (http://staden.sourceforge.net/), which support various DNA sequence read formats, in particular SCF, ABI, ALF, CTF, ZTR, SFF and SRF. Still cannot make it work.
After studying the following BioPerl documentation pages:
- http://doc.bioperl.org/bioperl-live/Bio/SeqIO/fastq.html
- http://doc.bioperl.org/bioperl-live/Bio/SeqIO/scf.html
- http://doc.bioperl.org/bioperl-live/Bio/Seq/Quality.html
- http://doc.bioperl.org/bioperl-live/Bio/Seq/SequenceTrace.html
I came up with this Minimal Example, but I think it is still not working. Though I specify an output file to get my stuff printed on, I get some weird stuff printed on screen; I know SCF is a binary file, but is it what I get on screen my output SCF file? Cause the output SCF file I specify (myfile.scf
) doesn't look good at all.
#!/usr/bin/perl -w
use warnings;
use strict;
use Bio::SeqIO;
#use Bio::Seq::Quality;
my $infile="myfile.fastq";
my $outfile="myfile.scf";
my $seqio_in=Bio::SeqIO->new(-file => $infile, -format => "fastq");# simple 'fastq' format defaults to 'sanger' variant
my $seqio_out=Bio::SeqIO->new(-file => ">$outfile", -format => "scf"); ## or 'abi'
# write each entry in the input file to the output file
# $seq_obj is a Bio::Seq::Quality object
while (my $seq_obj=$seqio_in->next_seq) {
#this does not work
#~ $seqio_out->write_seq($seq_obj);
#this prints binary on screen instead of the file... is that my scf file on screen?
$seqio_out->write_seq(
-target => $seq_obj,
-version => 2,
-CONV => "Bioperl-Chads Mighty SCF writer.");
#the documentation suggests to pass a SequenceTrace object to write_seq instead...
#this prints the same binary stuff on screen instead of the file... is that my scf file on screen?
#~ my $st = Bio::Seq::SequenceTrace->new(
#~ -swq => $seq_obj);
#~ $seqio_out->write_seq(
#~ -target => $st,
#~ -version => 2,
#~ -CONV => "Bioperl-Chads Mighty SCF writer.");
}
I really need some help here. Many many thanks!
Not working. Same problem I reported on Converting A Dna Sequence To Abi Or Scf Format and I tried to tackle with my code. I get the following error:
Is that working on your computer?
Please, the above solution DOES NOT WORK. Can anybody help with this?