[Bioperl-l] dpAlign - pairwise sequence alignment - en masse
Mark A. Jensen
maj at fortinbras.us
Thu Feb 5 19:14:17 UTC 2009
Manni122-
You run out of sequences in $seqB on the first time through. I would do-
my @seqB;
while ( push @seqB, $seqB->next_seq ) { 1; } # or something
while ( my $seq1 = $seqA->next_seq ) {
foreach $seq2 (@seqB) {
....
}
}
I'd probably drop the
next;
statement, too.
cheers MAJ
----- Original Message -----
From: "manni122" <manni122 at hotmail.com>
To: <Bioperl-l at lists.open-bio.org>
Sent: Wednesday, February 04, 2009 9:47 AM
Subject: [Bioperl-l] dpAlign - pairwise sequence alignment - en masse
>
> 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.
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
>
More information about the Bioperl-l
mailing list