[Bioperl-l] Does pWS work with DNA sequence?

Jason Stajich jason@cgt.mc.duke.edu
Wed, 7 Aug 2002 11:44:04 -0400 (EDT)


You can't use psw (Protein Smith-Waterman) for DNA alignments.
See the FAQ for suggestions.

-jason
On Tue, 6 Aug 2002, Shukui Guan wrote:

> Hi there,
>
> I am new to this exciting area.  I am trying to align two DNA sequence,
> so I installed BioPerl at my home directory and modified one of the
> sample scripts (psw.pl) as follow:
>
> #!/usr/bin/perl
>
> use lib "/users/u/4/sguan/bioperl/blib/arch";
> use lib "/users/u/4/sguan/bioperl/blib/lib";
> use lib "/nfs/disk100/pubseq/wise/PerlMod/";
>
> use Bio::Tools::pSW;
>
>
> use Bio::Seq;
> use Bio::SimpleAlign;
> use Bio::AlignIO;
>
> # for legibility - write with newlines and then strip them!
> print "\nNow let stop\n\n";
> $tseq =
> 'GGAAACTGCCTGATGGAGGGGGATAACTACTGGAAACGGTAGCTAATACCGCATAACGTCGCAAGA
> AGAATTCCAGGTGTAGCGGTGAAAT';
>
> $tseq =~ s/[^A-Z]//g;
>
> $seq1 = Bio::Seq->new(-id=>'roa1_human',-seq=>$tseq);
>
> $tseq =
> 'GAACGCTGGCGGCAGGCCTAACACATGCAAGTCGAACGGTAACAGGAANCAGCTTGCTGNTTNGCTGACGA
> GTGGCGGACGGGTGAGTAATGTCTGGGAAACTGCCTGA';
>
> $tseq =~ s/[^A-Z]//g;
>
> $seq2 = Bio::Seq->new(-id=>'roa1_drome',-seq=>$tseq);
>
>
>
> # Now make an Alignment Factory with blosum62 as a matrix
> # gap -12 and ext -2
> #
> $fac = Bio::Tools::pSW->new(-matrix => 'blosum62.bla',-gap => 12, -ext
> => 2);
>
>
> #
> # run seq1 vs seq2 and seq1 vs seq3 and write the output direct
> # to stdout using the 'pretty' method
> #
>
>
> $fac->align_and_show($seq1,$seq2,STDOUT);
> print "Next alignment\n";
>
>
> ##################################
>
> Unfortunately, it did not work.  Here is the error message.
>
> Now let stop
>
> Warning Error
>         Sequence roa1_human is not typed as protein... ignoring!
>
> Warning Error
>         Sequence roa1_drome is not typed as protein... ignoring!
>
> Warning Error
>         Could not evaluate these sequences Sequence type [66][Dna]
> Evaluation
> type [65][Protein]
> ------------- EXCEPTION  -------------
> MSG: Unable to build an alignment
> STACK Bio::Tools::pSW::align_and_show
> /users/u/4/sguan/bioperl/blib/lib/Bio/Tool
> s/pSW.pm:339
> STACK toplevel psw.pl:44
>
>
> So what is going on?  Anyone can help?
>
> Stephen G
>

-- 
Jason Stajich
Duke University
jason at cgt.mc.duke.edu