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

Aaron J Mackey ajm6q at virginia.edu
Wed Mar 5 08:52:13 EST 2003


Hi Yee,

I downloaded your code, and compiled it using -O2 -Os (Mac OSX recommended
"fastest" code, i.e. no -g).  Using your align.pl on t1.fa and t2.fa on a
1GHz G4, it took about 50 seconds to calculate the alignment (I used the
Benchmark module to specifically time only your alignment algorithm, not
any of the other code).

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).

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