[Bioperl-l] two sequences alignment question

yanfeng yanfeng at csit.fsu.edu
Mon Apr 4 01:05:31 EDT 2005

Hi, bioperl experts,
I am a bioper and perl beginner. I have two sequences. One  is very long( say 16000) and the other is short( say 100) . The short one is very similar to some part of the long sequence.
I want to locate the position like from 1200 to 1300 is the very similar sequence part. 
I tried to use bl2seq module.But failed. It maybe a simple question but I just don't know how to do it.
#Get 2 sequences
$str = Bio::SeqIO->new(-file=>'t/amino.fa' , '-format' => 'Fasta', );
my $seq3 = $str->next_seq();
my $seq4 = $str->next_seq();

# Run bl2seq on them
$factory = Bio::Tools::StandAloneBlast->new('program' => 'blastp', 
'outfile' => 'bl2seq.out');
my $bl2seq_report = $factory->bl2seq($seq3, $seq4);
# Note that report is a Bio::SearchIO object

# Use AlignIO.pm to create a SimpleAlign object from the bl2seq report
$str = Bio::AlignIO->new(-file=> 'bl2seq.out','-format' => 'bl2seq');
$aln = $str->next_aln();

the complain imformation is "can't write to bl2seq.out.

More information about the Bioperl-l mailing list