EMAN2 Processor Template Script

This script runs a series of EMAN2 processing steps in the order specified in the steps_to_run variable. The steps_to_run and other parameters for various steps will be filled in dynamically by the eman2_processor.py module based on the configurations file provided to ets_process_data.py by the user.

Note: Python3 is required to run this script.

eman2_process.estimate_ctf(get_command_without_running=False)

Run the e2spt_tomoctf.py program to estimate CTF for the tomograms

eman2_process.extract_particles(get_command_without_running=False)

Run the e2spt_extract.py program to extract subvolumes after writing out the particle coordinates to the EMAN2 info files

eman2_process.import_tiltseries(get_command_without_running=False)

Run the e2import.py program to import tilt stacks

eman2_process.invert_z_coordinates(positions)
Given a list of coordinates, invert the z coordinates. This is used when

converting particle coordinates from the raw tiltseries to the final reconstruction’s coordinate system for simulated data.

Parameters

positions – A list of [x, y, z] coordinates

Returns: A list of [x, y, z] coordinates

eman2_process.make_initial_model(get_command_without_running=False)

Run the e2spt_sgd program to automatically generate an initial reference for averaging

eman2_process.make_particle_set(get_command_without_running=False)

Run the e2spt_buildsets.py program to create a list of particles for averaging

eman2_process.reconstruct_tomograms(get_command_without_running=False)

Run the e2tomogram.py program to reconstruct tomograms

eman2_process.record_eman2_particle(particles_array, info_file, particle_name, boxsize)

Write out particle coordinates to a EMAN2 tomogram info JSON file

Parameters
  • particles_array – A list/numpy array of particle coordinates

  • info_file – The JSON file in the info directory of the EMAN2 project folder corresponding to the tomogram in question

  • particle_name – The name to assign to the particle within the EMAN2 project

  • boxsize – The EMAN2 box size (as seen in the EMAN2 box picker) to use for the particles.

Returns: None

eman2_process.rotate_positions_around_z(positions, sign)
Given a list of coordinates, rotate them all by 90 degrees around the z-axis. This is used to

convert particle coordinates from the raw tiltseries to the final reconstruction’s coordinate system for simulated data.

Parameters
  • positions – A list of [x, y, z] coordinates

  • sign – -1 or 1, determining whether the rotation is -90 or 90 degrees

Returns: A list of [x, y, z] coordinates

eman2_process.run_process_with_params(base_command, params_dict, get_command_without_running=False, get_output=False)

Helper function to run a given command line command, used to invoke various EMAN2 programs.

Command line arguments to the base command can be passed in as a dictionary of key, value pairs. Arguments that do not have a value (i.e –help for many programs) should instead be passed in with the special value of ‘enabled’ for that key.

Parameters
  • base_command – The base command to run, i.e. e2tomogram.py

  • params_dict – A dictionary of input arguments to the command

  • get_command_without_running – Option to return the assembled full command without actually running it

  • get_output – Return the first output line instead of the return code

eman2_process.run_refinement(get_command_without_running=False)

Run the e2spt_refine.py program to do sub-tomogram refinement