From 5f2825167976bb4b0fbd472534a8df76b69214fa Mon Sep 17 00:00:00 2001 From: birney Date: Wed, 6 Oct 1999 16:06:15 +0000 Subject: [PATCH] added bio::ext support svn path=/bioperl-live/branches/stable-0-05-new/; revision=1083 --- Bio/Tools/AlignFactory.pm | 6 +++--- Bio/Tools/pSW.pm | 27 ++++++++++++++------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Bio/Tools/AlignFactory.pm b/Bio/Tools/AlignFactory.pm index 73bd19054..e3368099d 100644 --- a/Bio/Tools/AlignFactory.pm +++ b/Bio/Tools/AlignFactory.pm @@ -47,10 +47,10 @@ use Bio::Root::Object; BEGIN { eval { - require bp_sw; + require Bio::Ext::Align; }; if ( $@ ) { - print STDERR ("\nThe C-compiled engine for Smith Waterman alignments (bp_sw) has not been installed.\n Please read the installation instructions for bioperl for using the compiled extensions\n\n"); + print STDERR ("\nThe C-compiled engine for Smith Waterman alignments (Bio::Ext::Align) has not been installed.\n Please install the bioperl-ext package\n\n"); exit(1); } } @@ -142,7 +142,7 @@ sub set_memory_and_report{ $self->throw("You can suggest aligning things with less than 5kb"); } - &bp_sw::change_max_BaseMatrix_kbytes($self->{'kbyte'}); + &Bio::Ext::Align::change_max_BaseMatrix_kbytes($self->{'kbyte'}); if( $self->{'report'} == 0 ) { &bp_sw::error_off(16); diff --git a/Bio/Tools/pSW.pm b/Bio/Tools/pSW.pm index f67480cea..cc0440588 100644 --- a/Bio/Tools/pSW.pm +++ b/Bio/Tools/pSW.pm @@ -43,14 +43,14 @@ Follow the installation instructions included in the README file. =head1 DESCRIPTION -pSW is an Alignment Factory. It builds pairwise alignments using the smith -waterman algorithm. The alignment algorithm is implemented in C and -added in using an XS extension. The XS extension basically comes from the -Wise2 package, but has been slimmed down to only be the alignment part -of that (this is a good thing!). The XS extension comes from the bp_sw -package which is found in Bio/Compile/SW in the bioperl distriubition. -I This package will not work if you have not compiled the -Bio/Compile/SW package. +pSW is an Alignment Factory. It builds pairwise alignments using the +smith waterman algorithm. The alignment algorithm is implemented in C +and added in using an XS extension. The XS extension basically comes +from the Wise2 package, but has been slimmed down to only be the +alignment part of that (this is a good thing!). The XS extension comes +from the bioperl-ext package which is distributed along with bioperl. +I This package will not work if you have not compiled the +bioperl-ext package. The mixture of C and Perl is ideal for this sort of problem. Here are some plus points for this strategy: @@ -126,10 +126,10 @@ use Bio::SimpleAlign; BEGIN { eval { - require bp_sw; + require Bio::Ext::Align; }; if ( $@ ) { - print STDERR ("\nThe C-compiled engine for Smith Waterman alignments (bp_sw) has not been installed.\n Please read the installation instructions for bioperl for using the compiled extensions\n\n"); + print STDERR ("\nThe C-compiled engine for Smith Waterman alignments (Bio::Ext::Align) has not been installed.\n Please read the install the bioperl-ext package\n\n"); exit(1); } } @@ -195,9 +195,9 @@ sub pairwise_alignment{ $self->set_memory_and_report(); # create engine objects - $t1 = &bp_sw::new_Sequence_from_strings($seq1->id(),$seq1->str()); - $t2 = &bp_sw::new_Sequence_from_strings($seq2->id(),$seq2->str()); - $aln = &bp_sw::Align_Sequences_ProteinSmithWaterman($t1,$t2,$self->{'matrix'},-$self->gap,-$self->ext); + $t1 = &Bio::Ext::Align::new_Sequence_from_strings($seq1->id(),$seq1->str()); + $t2 = &Bio::Ext::Align::new_Sequence_from_strings($seq2->id(),$seq2->str()); + $aln = &Bio::Ext::Align::Align_Sequences_ProteinSmithWaterman($t1,$t2,$self->{'matrix'},-$self->gap,-$self->ext); if( ! defined $aln || $aln == 0 ) { $self->throw("Unable to build an alignment"); } @@ -387,3 +387,4 @@ sub ext { } + -- 2.11.4.GIT