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

Shukui Guan sguan@lsd.uoguelph.ca
Tue, 06 Aug 2002 17:48:13 -0400


This is a MIME message. If you are reading this text, you may want to 
consider changing to a mail reader or gateway that understands how to 
properly handle MIME multipart messages.

--=_104C7051.EF8EE872
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

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

--=_104C7051.EF8EE872
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Content-Description: HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2716.2200" name=GENERATOR></HEAD>
<BODY style="MARGIN-TOP: 2px; FONT: 8pt MS Sans Serif; MARGIN-LEFT: 2px">
<DIV><FONT size=1>Hi there,</FONT></DIV>
<DIV><FONT size=1></FONT>&nbsp;</DIV>
<DIV><FONT size=1>I am new to this exciting area.&nbsp; I am trying to align two 
DNA sequence, so I installed BioPerl at my home directory and modified one of 
the sample scripts&nbsp;(psw.pl) as follow:</FONT></DIV>
<DIV><FONT size=1></FONT>&nbsp;</DIV>
<DIV>#!/usr/bin/perl</DIV>
<DIV>&nbsp;</DIV>
<DIV>use lib "/users/u/4/sguan/bioperl/blib/arch";<BR>use lib 
"/users/u/4/sguan/bioperl/blib/lib";<BR>use lib 
"/nfs/disk100/pubseq/wise/PerlMod/";</DIV>
<DIV>&nbsp;</DIV>
<DIV>use Bio::Tools::pSW;</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>use Bio::Seq; <BR>use Bio::SimpleAlign;<BR>use Bio::AlignIO;</DIV>
<DIV>&nbsp;</DIV>
<DIV># for legibility - write with newlines and then strip them!<BR>print "\nNow 
let stop\n\n";<BR>$tseq = 
'GGAAACTGCCTGATGGAGGGGGATAACTACTGGAAACGGTAGCTAATACCGCATAACGTCGCAAGA<BR>AGAATTCCAGGTGTAGCGGTGAAAT';</DIV>
<DIV>&nbsp;</DIV>
<DIV>$tseq =~ s/[^A-Z]//g;</DIV>
<DIV>&nbsp;</DIV>
<DIV>$seq1 = Bio::Seq-&gt;new(-id=&gt;'roa1_human',-seq=&gt;$tseq);</DIV>
<DIV>&nbsp;</DIV>
<DIV>$tseq = 
'GAACGCTGGCGGCAGGCCTAACACATGCAAGTCGAACGGTAACAGGAANCAGCTTGCTGNTTNGCTGACGA<BR>GTGGCGGACGGGTGAGTAATGTCTGGGAAACTGCCTGA';</DIV>
<DIV>&nbsp;</DIV>
<DIV>$tseq =~ s/[^A-Z]//g;</DIV>
<DIV>&nbsp;</DIV>
<DIV>$seq2 = Bio::Seq-&gt;new(-id=&gt;'roa1_drome',-seq=&gt;$tseq);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV># Now make an Alignment Factory with blosum62 as a matrix<BR># gap -12 and 
ext -2<BR>#<BR>$fac = Bio::Tools::pSW-&gt;new(-matrix =&gt; 'blosum62.bla',-gap 
=&gt; 12, -ext =&gt; 2);</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>#<BR># run seq1 vs seq2 and seq1 vs seq3 and write the output direct 
<BR># to stdout using the 'pretty' method<BR>#</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>$fac-&gt;align_and_show($seq1,$seq2,STDOUT);<BR>print "Next 
alignment\n";<BR></DIV>
<DIV>&nbsp;</DIV>
<DIV>##################################</DIV>
<DIV>&nbsp;</DIV>
<DIV>Unfortunately, it did not work.&nbsp; Here is the error message.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Now let stop</DIV>
<DIV>&nbsp;</DIV>
<DIV>Warning Error<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sequence 
roa1_human is not typed as protein... ignoring!</DIV>
<DIV>&nbsp;</DIV>
<DIV>Warning Error<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sequence 
roa1_drome is not typed as protein... ignoring!</DIV>
<DIV>&nbsp;</DIV>
<DIV>Warning Error<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Could not 
evaluate these sequences Sequence type [66][Dna] Evaluation<BR>type 
[65][Protein]<BR>------------- EXCEPTION&nbsp; -------------<BR>MSG: Unable to 
build an alignment<BR>STACK Bio::Tools::pSW::align_and_show 
/users/u/4/sguan/bioperl/blib/lib/Bio/Tool<BR>s/pSW.pm:339<BR>STACK toplevel 
psw.pl:44 </DIV>
<DIV><FONT size=1></FONT>&nbsp;</DIV>
<DIV><FONT size=1></FONT>&nbsp;</DIV>
<DIV><FONT size=1>So what is going on?&nbsp; Anyone can help?</FONT></DIV>
<DIV><FONT size=1></FONT>&nbsp;</DIV>
<DIV><FONT size=1>Stephen G</FONT></DIV>
<DIV><FONT size=1></FONT>&nbsp;</DIV></BODY></HTML>

--=_104C7051.EF8EE872--