[Bioperl-l] trying to save blast hit sequences to fasta file
Alicia Amadoz
Alicia.Amadoz at uv.es
Wed Aug 1 07:13:11 UTC 2007
Hi, I would like to save my hit sequences from a blast result in a fasta
file. I am trying some things but I have problems using Bio::SearchIO
and Bio::SeqIO. Hope anyone could help me with this. Here is my current
code:
# my $seq_out = Bio::SeqIO->new("-file" => ">$fasfilename", "-format" =>
"fasta");
my $seq_out = Bio::SearchIO->new("-file" => ">$fasfilename", "-format"
=> "fasta");
while(my $result = $blast_report->next_result()) {
while(my $hit = $result->next_hit()) {
while(my $hsp = $hit->next_hsp()) {
my $hseq = $hsp->hit_string();
# $seq_out->write_seq($hseq);
$seq_out->write_result($hseq);
}
}
}
Here the error is,
------------- EXCEPTION: Bio::Root::Exception -------------
MSG: ResultWriter not defined.
I couldn't find any kind of documentation about ResultWriter.
Thanks in advance,
Alicia
More information about the Bioperl-l
mailing list