Artiatomi Processor

processors.artiatomi_processor.convert_slicer_to_motl(orientations)

Convert a set of Slicer angles to the reference-to-particle ZXZ, external Euler angles for Artiatomi :param orientations: The list of Slicer angles

Returns: The list of Euler angles

processors.artiatomi_processor.generate_extract_script(artia_root, artia_args)

Generate the MATLAB script for extracting new particles based on local refinement :param artia_root: Artiatomi project root directory :param artia_args: The Artiatomi processor arguments

Returns: None

processors.artiatomi_processor.generate_reconstructions_script(root, name, artia_args)

Generate a bash script to run the reconstructions. :param root: ETSimulations root (only used if coming from simulated data) :param name: Project/particle name (only used if coming from simulated data) :param artia_args: The Artiatomi processor arguments

Returns: None

processors.artiatomi_processor.generate_refinement_script(artia_root, info_file, artia_args)

Generate the MATLAB script for setting up the Artiatomi tilt refinement :param artia_root: Artiatomi project root directory :param info_file: The text file listing the tomograms, tomogram numbers, and their motivelists :param artia_args: The Artiatomi processor arguments

Returns: None

processors.artiatomi_processor.generate_sta_script(artia_root, info_file, artia_args)

Generate the MATLAB script for setting up the Artiatomi sub-tomogram averaging :param artia_root: Artiatomi project root directory :param info_file: The text file listing the tomograms, tomogram numbers, and their motivelists :param artia_args: The Artiatomi processor arguments

Returns: None

processors.artiatomi_processor.get_latest_motl(sta_dir)

Find the latest motl from an Artiatomi STA run :param sta_dir: The sub-tomogram averaging directory, where we expect to find a ref folder

Returns: The latest motl file path

processors.artiatomi_processor.get_latest_ref(sta_dir)

Find the latest reference from an Artiatomi STA run :param sta_dir: The sub-tomogram averaging directory, where we expect to find a ref folder

Returns: The latest reference file path

processors.artiatomi_processor.get_slicer_info(mod_file)

Open an IMOD .mod file and retrieve the Slicer information

Parameters

mod_file – The .mod file path

Returns: A list of Slicer point objects with keys {“angles”, “coords”}

processors.artiatomi_processor.imod_setup_sta(artia_root, dirs_start_with)

Write out the info file necessary to run the MATLAB set up script for sub-tomogram averaging in Artiatomi :param artia_root: The Artiatomi project directory :param dirs_start_with: A prefix for the data subdirectories within the Artiatomi project

Returns: Text filepath containing the parsed info

processors.artiatomi_processor.rotate_positions_around_z(positions)
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

Returns: None

processors.artiatomi_processor.setup_reconstructions_script(root, name, artia_args)

Function to generate the Artiatomi reconstruction setup script

Parameters
  • root – The ETSimulations project root (only used for coming from simulated data)

  • name – The project/particle name (only used for coming from simulated data)

  • artia_args – The Artiatomi Processor arguments

Returns: None

processors.artiatomi_processor.shift_coordinates_bottom_left(coords, size, binning=1)
Given an XYZ tuple of particle coordinates and the reconstruction they came from, shift the

coordinates so that the origin is at the bottom-left of the tomogram

Parameters
  • coords – the (x, y, z) coordinates for the particle

  • size – the reconstruction MRC half-dimensions in (nx/2, ny/2, nz/2) form

  • binning – the bin factor from the original stack to the final reconstruction, to be used if you are using coordinates based on the original unbinned coordinate system

Returns: the new coordinates as a (x, y, z) tuple

processors.artiatomi_processor.write_out_motl_files_real(artia_root, xyz_name, motl_name)
Iterate through Artiatomi files copied over from IMOD real data and set up text files for Artiatomi to read in for

its marker files based on slicer .mod files

Parameters
  • artia_root – The Artiatomi project root

  • xyz_name – The file name to give each XYZ coordinates file

  • motl_name – The file name to give each Euler angles file

Returns: None

processors.artiatomi_processor.write_out_motl_files_simulated(root, name, xyz_name, motl_name, size, binning)

Iterate through an IMOD Processor project and set up text files for Artiatomi to read in for its marker files

Parameters
  • root – The ETSimulations project root

  • name – The project/particle name

  • xyz_name – The file name to give each XYZ coordinates file

  • motl_name – The file name to give each Euler angles file

  • size – Final tomogram size (for shifting origin of coordinates)

  • binning – The binning to apply to the raw coordinates

Returns: None