[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ccp4bb]: peak search



***  For details on how to be removed from this list visit the  ***
***          CCP4 home page http://www.ccp4.ac.uk         ***


> Question for the code-savvy:
> Given a 3d-map filled with e-density or Patterson values.
> What is the smart way (I discovered some of the others..) to
> code a peak search? 
> I would need this to update my web tutorial -  any code fragments,
> suggestions, etc. are welcome.

loop over all points in the map (except the ones on the edges),
check if the map value exceeds a cut-off, check if any of the
26 neighbours is greater than the current value (if so, jump
out of the loop immediately), if not you have a local maximum,
interpolate density to pinpoint the maximum more precisely,
set all neighbours to a low value (since they cannot possibly
be local maxima themselves), end do, end do, end do, output

i don't know if this is particularly smart or not (are there
really that many ways to pick local maxima ?), but this is
how i have been doing it since my NMR days [well, there the
problem is slightly more complicated since not every local
maximum is a peak, i.e. signal, but never mind that now;
see e.g. Kleywegt et al, Journal of Magnetic Resonance 88,
601-608 (1990) for a solution in the 2D case, later generalised
for 3D, and in a simpler form for 4D and 5D datasets ;-]

as for code, see xdlmapman.f and xdlmapman_subs.f in CCP4

--dvd

******************************************************************
                        Gerard J.  Kleywegt
    [Research Fellow of the Royal  Swedish Academy of Sciences]
Dept. of Cell & Molecular Biology  University of Uppsala
                Biomedical Centre  Box 596
                SE-751 24 Uppsala  SWEDEN

    http://xray.bmc.uu.se/gerard/  mailto:gerard@xray.bmc.uu.se
******************************************************************
   The opinions in this message are fictional.  Any similarity
   to actual opinions, living or dead, is purely coincidental.
******************************************************************