Need for Speed ppps

J. Landman Gay jacque at hyperactivesw.com
Tue Jul 17 12:11:08 EDT 2007


Beynon, Rob wrote:

> I *think* I set up append properly... and the output file 
> would be typically 1-2MB (quite small)
> I always think exposing my code in public is the equivalent
> of the dream where you're walking down a street naked, but here goes...

Heh. :) I know exactly what you mean. But you have nothing to be nervous 
about, your script looks fine, and you are opening the file correctly 
for appending. The only thing I can see is that you don't need to open, 
create, and close the file first; just the "open for append" command 
will create it at the same time it opens it. But that's a very minor 
thing and doesn't interfere with the speed issue at all.

I'm curious to know if Dick's array solution is any faster, if you get a 
chance to try it. His stuff is always genius.

> ON mouseUp
>     ask file "Save as..."
>     put it into outputFile
>     open file outputFile for write
>     close file outputFile -- create empty file if preexists
>     open file outputFile for append
>     
>     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 field "ppm" into ppm
>     
>     REPEAT for each line pepMass in field "massList"
>         write "NEW SEARCH, MASS = " & pepMass & " at " & ppm & " ppm error" & return to file outputFile
>         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 write peptide & "K" & tab & dbMass-pepMass & return to file outputFile
>         END REPEAT
>         write "====================" & return to file outputFile
>     END REPEAT
>     close file outputFile
>     
>     put the long time into field "Stop"
> END mouseUp
> 
> 
> ________________________________________
> 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 Tue, 17 Jul, 2007 at 8:03 AM.
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list