[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> </DIV>
<DIV><FONT size=1>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:</FONT></DIV>
<DIV><FONT size=1></FONT> </DIV>
<DIV>#!/usr/bin/perl</DIV>
<DIV> </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> </DIV>
<DIV>use Bio::Tools::pSW;</DIV>
<DIV> </DIV>
<DIV><BR>use Bio::Seq; <BR>use Bio::SimpleAlign;<BR>use Bio::AlignIO;</DIV>
<DIV> </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> </DIV>
<DIV>$tseq =~ s/[^A-Z]//g;</DIV>
<DIV> </DIV>
<DIV>$seq1 = Bio::Seq->new(-id=>'roa1_human',-seq=>$tseq);</DIV>
<DIV> </DIV>
<DIV>$tseq =
'GAACGCTGGCGGCAGGCCTAACACATGCAAGTCGAACGGTAACAGGAANCAGCTTGCTGNTTNGCTGACGA<BR>GTGGCGGACGGGTGAGTAATGTCTGGGAAACTGCCTGA';</DIV>
<DIV> </DIV>
<DIV>$tseq =~ s/[^A-Z]//g;</DIV>
<DIV> </DIV>
<DIV>$seq2 = Bio::Seq->new(-id=>'roa1_drome',-seq=>$tseq);</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV># Now make an Alignment Factory with blosum62 as a matrix<BR># gap -12 and
ext -2<BR>#<BR>$fac = Bio::Tools::pSW->new(-matrix => 'blosum62.bla',-gap
=> 12, -ext => 2);</DIV>
<DIV> </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> </DIV>
<DIV><BR>$fac->align_and_show($seq1,$seq2,STDOUT);<BR>print "Next
alignment\n";<BR></DIV>
<DIV> </DIV>
<DIV>##################################</DIV>
<DIV> </DIV>
<DIV>Unfortunately, it did not work. Here is the error message.</DIV>
<DIV> </DIV>
<DIV>Now let stop</DIV>
<DIV> </DIV>
<DIV>Warning Error<BR> Sequence
roa1_human is not typed as protein... ignoring!</DIV>
<DIV> </DIV>
<DIV>Warning Error<BR> Sequence
roa1_drome is not typed as protein... ignoring!</DIV>
<DIV> </DIV>
<DIV>Warning Error<BR> Could not
evaluate these sequences Sequence type [66][Dna] Evaluation<BR>type
[65][Protein]<BR>------------- EXCEPTION -------------<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> </DIV>
<DIV><FONT size=1></FONT> </DIV>
<DIV><FONT size=1>So what is going on? Anyone can help?</FONT></DIV>
<DIV><FONT size=1></FONT> </DIV>
<DIV><FONT size=1>Stephen G</FONT></DIV>
<DIV><FONT size=1></FONT> </DIV></BODY></HTML>
--=_104C7051.EF8EE872--