[Bioperl-l] Re: Added Phil Green's Smith-Waterman to my module

Yee Man ymc at paxil.stanford.edu
Wed Mar 5 09:29:41 EST 2003



> 
> On the same machine, compiled with the same flags (and no AltiVec tricks),
> `ssearch34 -q -H -d 0 -3 -f 3 -g 1 -r "3/-1" -m9c t1.fa t2.fa` takes about
> 7 seconds to calculate the same alignment (although your end coordinates
> for the alignment have an off-by-one error).  Here's the alignment ssearch
> calculated: =51-1=2067-1=25-1=1711+1=5872 (= match, - query gap, + lib
> gap).

Hey Aaron

	I think I figured out why it is so slow. The one you got is with
-d 0 which calculates score only. The default behavior of my code is
like:
 ssearch34 -3 -n -q -H -d 1 -b 1 -m 0 -f 3 -g 1 -r +3/-1 t1.fa t2.fa

	This gives me exactly the same time as I run ssearch34. So I
believe my implementation is correct after I removed call to do_work.

Regards,
Yee Man

PS Updated code with do_work removed is at
www.stanford.edu/~yeeman/dsw.tgz

> 
> Where is the 7-fold difference in speed coming from?  Your code did run
> with 8 Mb of memory, whereas ssearch34 ran with about 16 Mb.  Are you sure
> you're actually running the dropgsw.c code?  Ahh yes, you are; I commented
> out do_work() in pgreen.c and now you only take 41 seconds (do_work() only
> calculates a score; do_walign doesn't actually require do_work to have
> happened).  So now we're down to 6-fold slower.  What else?  When I wrap
> you call to do_walign in pgreen.c with clock() calls, I see your do_walign
> does take 40 seconds.  Did you need to change anything in do_walign to
> make it work?
> 
> -Aaron
> 
> On Tue, 4 Mar 2003, Yee Man wrote:
> 
> >
> > Hi, Aaron,
> >
> > 	After some hacking, I added the code in dropgsw.c in the FASTA
> > release to my DNA Smith-Waterman module. You can download it and try it
> > out at http://www.stanford.edu/~yeeman/dsw.tgz. There are two files called
> > t1.fa, t2.fa for your testing.
> >
> > 	This implementation doesn't do frame shift or reverse complement,
> > it is just a plain alignment.
> >
> > 	I also discovered that the performance result I reported
> > for FASTA's Phil Green didn't say that you have to use the cc compiler and
> > the compiler options in the makefile. If I use gcc and then only use -g
> > option, it finishes alignment with t1.fa, t2.fa with -3 option will go
> > from 6sec to 12sec. My vanilla implementation of SW gives us about 50sec
> > with gcc and -g option.
> >
> > Regards,
> > Yee Man
> >
> 
> -- 
>  Aaron J Mackey
>  Pearson Laboratory
>  University of Virginia
>  (434) 924-2821
>  amackey at virginia.edu
> 
> 
> 




More information about the Bioperl-l mailing list