> Suppose I have 2 groups of sequences. A has 10 and B has 5.
> I could make a.fa and b.fa to do the alignment respectively.
>> 1. What I want is to do the alignment of each sequence in B to A.
> In other words, I want to find out the score of each bi to each ai.
>> How do I do in CLUSTALW (in LINUX command line mode based).
>>> 2. How could I do this by other program, like Perl script?
>> 3. Could I conver the output in other formats? I fail to do so by just
> seting -ouput=fasta, ...
for automating your work.
Basically you can do this to align the sequence in seq.fa to the profile
t.aln. See the documentation for the
Bio::Tools::Run::Alignment::Clustalw for more information.
my $seqtoaln = 'seq.fa';
my $seqio = new Bio::SeqIO(-file => $seqtoaln, -format => 'fasta');
my $seq = $seqio->next_aln;
my @params = ('ktuple' => 2, 'matrix' => 'BLOSUM');
my $factory = new Bio::Tools::Run::Alignment::Clustalw(@params);
my $alnment = new Bio::AlignIO(-file => 't.aln', -format => 'clustalw');
my $aln = $alnment->next_aln;
my $out = new Bio::AlignIO(-file => "profilealn.aln",
-format => 'clustalw');
my $profilealn = $factory->profile_align($aln, $seq);