[Bioperl-l] DBA & HSP -> write_aln (array)
francois fauteux
ffauteux at gmail.com
Sun Aug 20 01:02:08 UTC 2006
Say an array of High Scoring Pair elements (been generated with
Bio::Tools::Run::Alignment::DBA);
@hsps = $factory->align(\@files);
Output every alignment - push $aln into @aln;
foreach $hsps (@hsps)
{
my $aln = $hsps->get_aln;
push @aln, $aln;
}
my $alnIO = Bio::AlignIO->new(-format =>"fasta", -file =>">out.fasta");
$alnIO->write_aln(@aln);
If use msf format and write elements separately, works good:
my $alnIO = Bio::AlignIO->new(-format =>"msf", -file =>">out.msf");
$alnIO->write_aln($aln[0]);
If use msf format and the array:
my $alnIO = Bio::AlignIO->new(-format =>"msf", -file =>">out.msf");
$alnIO->write_aln(@aln);
The output is quite messy...
How to output everything (all alignments from @aln) in msf format in a
single file?
In fasta format, it not too bad, the only bug being the last element
(2nd seq) prints:
>DBA/start-stop instead of
>id/start-stop...
Thanks for hints;
François
More information about the Bioperl-l
mailing list