[Bioperl-l] dpAlign - pairwise sequence alignment - en masse

manni122 manni122 at hotmail.com
Wed Feb 4 14:47:27 UTC 2009


Hope I am right here.
I need help in coding the right routine. I have two files with a lot of
sequences in. I want to pairwise align any Sequence in file A with any
sequence in file B. My first loop is not working even the next command is
given. This loop reads just the first sequence in file A and aligns with all
sequences in file B which means the second loop is working. I appreciate any
help out of this...

At the moment I have:

  use Bio::Tools::dpAlign;
  use Bio::SeqIO;
  use Bio::SimpleAlign;
  use Bio::AlignIO;
  use Bio::PrimarySeqI;
  
  $factory = new Bio::Tools::dpAlign(-match => 3,
                     -mismatch => -1,
                     -gap => 3,
                     -ext => 1,
                     -alg =>
Bio::Tools::dpAlign::DPALIGN_LOCAL_MILLER_MYERS);

  
  $seqA = Bio::SeqIO->new(-file => "A.fas", -format => "fasta");
  $seqB = Bio::SeqIO->new(-file => "B.fas", -format => "fasta");
  my $alnout = Bio::AlignIO->new(-format => "clustalw",

                                 -file => ">out.fas");

#reads the first file in and should go through all sequences
     while( my $seq1 = $seqA->next_seq ) {

#reads the second file in and goes through all sequences
        while (my $seq2 = $seqB->next_seq) {

 $factory = Bio::Tools::dpAlign->new(-alg => 1);  

       $out = $factory->pairwise_alignment($seq1,$seq2);

       $alnout->write_aln($out);       

            }
next;
         }

-- 
View this message in context: http://www.nabble.com/dpAlign---pairwise-sequence-alignment---en-masse-tp21831861p21831861.html
Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.




More information about the Bioperl-l mailing list