IUBio

Some questions in execution in command line mode in CLUSTALW

Jason Stajich jason.stajich at NOSPAMBOTS-duke.edu
Mon Jun 30 07:20:32 EST 2003


ABC wrote:
> 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, ...
> 
> Thanks!


Consider Bioperl
www.bioperl.org
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.


use Bio::Tools::Run::Alignment::Clustalw;
use Bio::AlignIO;
use Bio::SeqIO;


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);
$out->write_aln($profilealn);





More information about the Bio-soft mailing list

Send comments to us at biosci-help [At] net.bio.net