[Bioperl-l] alignment

Ewan Birney birney@ebi.ac.uk
Tue, 19 Feb 2002 16:59:02 +0000 (GMT)


On Tue, 19 Feb 2002, Guoneng Zhong wrote:

> Hi,
> Has anyone done a simple pairwise alignment on DNA strands?  The 
> examples in the docs and tutorial are about protein alignment using the 
> Smith-Waterman algorithm.  I tried to assign a dna matrix to the 
> "-matrix" parameter and it kept telling me that my sequences are not 
> proteins.  Here is the code snippet:
> 
> $seq1 = Bio::Seq->new
> (-id=>"seq1",-seq=>"AATTATATAATATATCTCTCCTCTTGCTCTC");
> $seq2 = Bio::Seq->new
> (-id=>"seq2",-seq=>"AATTATATAATATATGCCTCCCCCTTACTCTC");
> #$factory = new Bio::Tools::pSW('-matrix'=>'NUC4X4HB.MNT');
> $factory = new Bio::Tools::pSW('-matrix'=>'nu.bla');
> $aln = $factory->pairwise_alignment($seq1,$seq2);
> foreach $seq ($aln->eachSeq()){
>      print "$seq\n";
> }
> 
> Any idea why?  Or does this module work only for proteins?

it (stupidly) only works for proteins. This is fixable, but requires
someone to get into the extension layer and build the right hooks.


Try setting the type explicitly to "protein" to fox it ;)


> 
> Thanks,
> G
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
> 

-----------------------------------------------------------------
Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420
<birney@ebi.ac.uk>. 
-----------------------------------------------------------------