[Bioperl-l] Re: Added Phil Green's Smith-Waterman to my module
Yee Man
ymc at paxil.stanford.edu
Wed Mar 5 08:54:51 EST 2003
On Wed, 5 Mar 2003, Aaron J Mackey wrote:
>
> 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).
I also noticed it is pretty slow in my machine, too...
>
> 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?
Sorry about the do_work. I was thinking it is needed to locate the
alignment and then pass it to do_walign to do the global alignment... I
guess do_walign does both?
I didn't change anything in do_walign. You can do a diff to it and check.
The only difference is I defined LFASTA so that calcon won't display
sequence strings that are outside of the alignment. I am not sure if it
will trigger other stuff.
Regards,
Yee Man
>
> -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