Need for Speed (postscript)

Beynon, Rob R.Beynon at liverpool.ac.uk
Sun Jul 15 15:58:32 EDT 2007


Thanks to everyone who responded (Mark Schonewille, Mark Smith, Viktoras Didziulis, Robert Brenstein, apologies if I forgot anyone) - a whole range of solutions, including arrays, databases and 'just' variables. Anyway, I coded up the brute force method without any finess... here's the business bit of the script with some frippery...

 

global seqDB

ON mouseUp

    put the number of lines in field "massList" into peptides

    put "Processing " & peptides & " masses, please wait..." into field "Output"

    put the long time into field "Start"

    put empty into outputData

    set the tabstops of field "Output" to 120, 390, 10,20

    put field "ppm" into ppm

    REPEAT for each line pepMass in field "massList"

        put "NEW SEARCH, MASS = " & pepMass & " at " & ppm & " ppm error" & return after outputData

        put  pepMass * ppm/1000000 into massError

        REPEAT for each line peptide in seqDB

            put the third word of peptide into dbMass

            IF abs(pepMass-dbMass) <= massError THEN put peptide & "K" & tab & dbMass-pepMass & return after outputData

        END REPEAT

        put "====================" & return after outputData

    END REPEAT

    put outputData into field "Output"

    put the long time into field "Stop"

END mouseUp

 

I ran a brutal test, of 45,000 lines in massList and 16,000 lines in seqDB

My crude attempt seems to be capable, even running within the Rev IDE, of completing the 720million comparisons in about 30minutes (OK, admittedly CoreDuo 2.66GHz, 2GB RAM). That's 24million a minute! (I deliberately put some searches that would match at the end of seqDB, to be sure I searched through most of the file each time). I am pretty happy with this, and I'd be looking for at least a 10-fold gain in speed to code up a harder solution. 

 

Do you experts thing a 10-fold gain is feasible? 100-fold?

Rob

________________________________

Prof R J Beynon[h]
Proteomics and Functional Genomics Group
Faculty of Veterinary Science
University of Liverpool
Crown Street, Liverpool L69 7ZJ

________________________________

Phone: +44 151 794 4312

Fax: +44 151 794 4243

Email: r.beynon at liv.ac.uk

http://www.liv.ac.uk/pfg

________________________________

 

This email was sent on Sun, 15 Jul, 2007 at 8:58 PM.






More information about the use-livecode mailing list