How to Run e2boxer.py using python, without using GUI.

4 views
Skip to first unread message

Aniruth Sundararajan

unread,
Aug 19, 2024, 11:37:48 AMAug 19
to EMAN2
I want to do  Particle picking using a reference template, but i want to automate the process,
without having to upload the reference template via GUI, each time.

My Code
subprocess.run(['e2boxer.py', mrc_path, '--boxsize', str(box_size), '--apix', str(pixel_spacing), '--voltage', str(voltage), '--cs', str(cs), '--ptclsize', str(particle_size), '--write_ptcls', '--all' ],check=True)

What should i do, to link the reference template to this.


Steve Ludtke

unread,
Aug 20, 2024, 8:26:24 AMAug 20
to em...@googlegroups.com
I’m not sure what you mean by “each time”? The GUI is designed to load all of the micrographs in the project at once, adjust the settings interactively so it works well for the project, then autobox the entire set of micrographs with one button press, so not sure what repetition you are trying to avoid.

If you want to run the autopicking via your own Python script, you may be able to make it work with the --autopick option (see --help for command line parameters), but it isn’t a widely used method so, not clear what issues you may have. The available modes are auto_local, auto_ref, auto_gauss and auto_convnet. Look at “aboxmodes” in e2boxer.py for more details.

Alternatively, you could import e2boxer, then call do_autobox_all() yourself from Python, since you’re using Python anyway. The command-line interface will always be more limited than what you can do directly from Python. 

--
--
----------------------------------------------------------------------------------------------
You received this message because you are subscribed to the Google
Groups "EMAN2" group.
To post to this group, send email to em...@googlegroups.com
To unsubscribe from this group, send email to eman2+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/eman2

---
You received this message because you are subscribed to the Google Groups "EMAN2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eman2+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eman2/ed74ca06-7e67-48a6-abbe-6f74835ca176n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages