Need for Speed ppps

Beynon, Rob R.Beynon at
Tue Jul 17 03:03:26 EDT 2007

Two questions came up:
1. Did I set write up for append? (Jacqueline)
2. What is the size of the output file? (Mark)

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

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

This email was sent on Tue, 17 Jul, 2007 at 8:03 AM.

More information about the Use-livecode mailing list