-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added peakfinding utility #8
Conversation
Here is the documentation for this program from ArgParse:
|
Here's an example of the output from search a time-resolved difference map for peaks int he vicinity of a photoactive yellow protein structure: $ efxtools.findpeaks -d -f "DeltaF" -p "PhiFoff" -z 4. ~/opt/careless-examples/pyp/difference.mtz ~/opt/careless-examples
/pyp/reference_data/off.pdb
,chain,seqid,residue,atom,dist,peak,peakz,score,scorez,cenx,ceny,cenz,coordx,coordy,coordz
0,A,126,HC4,C1',1.2493168828617782,0.0013570099836215377,5.57138723710649,0.00048139700120323315,1.9764402188353645,50.99162808199085,0.14171747032899862,50.99162808199085,14.87,0.383,-18.885
0,A,126,HC4,O4',0.17460930882807968,-0.0014174100942909718,-5.81936802555327,-0.0008162189510563102,-3.3510968244874473,49.12977049929481,1.6215186512756787,49.12977049929481,17.939,-1.579,-17.197
1,A,69,CYS,SG,0.28868905398404665,-0.0014208063948899508,-5.833311995042771,-0.0004891447823862661,-2.0082497778773467,2.1446618366752164,11.735229937338932,2.1446618366752164,11.068,3.807,-18.673 |
here's an example of finding peaks in a sulfur SAD data set:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me -- I think adding support for a weights column will be useful for how we commonly work with difference maps. Other than that, this seems good as is.
@JBGreisman i added a parameter for weights:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome -- thanks. The weight key was the only missing feature that seemed useful to me.
Great stuff! Just ran it successfully. A couple of user-friendliness things:
|
I keep going back and forth on column names here. As much as the keystrokes annoy me, I do think requiring explicit specification of column names for amplitudes and phases is the right call. I think where it becomes a user-friendliness thing is that this forces me to answer the question, "what are the columns called in this particular dataset?" In practice, I just do this with |
|
Maybe I'm being sloppy with my nomenclature here; my implication was that one is far more likely to use this code on an FoFc map than a 2FoFc map. In the FoFc case, you certainly want negative peaks. And even if someone did run this code on a 2FoFc map and forgot to turn off the negative peak functionality, I don't think that would cause any issues - there are no negative peaks in a 2FoFc map. |
I am perhaps being selfish here, but I will personally use this on anomalous difference maps much more frequently than isomorphous difference maps. In that case, any negative peaks are meaningless artifacts. I can make separate entry points
It doesn't really save keystrokes but it would tab complete and you wouldn't have to remember the |
I support that. An alternative option to clarify behavior might be to only include However, I do also support your proposal to split it into two commandline tools. |
Seconded (thirded?) that splitting into two separate tab-completable command line tools makes sense and will minimize confusion. |
I
can you both have another look? |
Looks great, thanks Kevin! |
efxtools/realspace/find_peaks.py
Outdated
|
||
if __name__=="__main__": | ||
main() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be worth removing this since it no longer works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well I guess it works because you have default values... feel free to leave it if you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i removed it. we're providing a CLI entry point. no reason to leave it there imo.
Left a small comment that you can feel free to ignore, but otherwise this looks good to me |
This adds a command line script that finds peaks in maps and matches them to atoms. I think this works fine but might benefit from some reviewers.