Skip to content
gijsschot edited this page Nov 8, 2021 · 2 revisions

Interfacing PyTom and Relion

Converting particle lists

PyTom's stores the information of the orientation, shift and pick-position of subtomograms in xml-based files called particle lists. Particle lists can easily be converted to relion star files using one of the following commands.
  1. if you have a single file:
convert.py -f [PATH/TO/PARTICLE_LIST.XML] --outname [OUTNAME.star] -o star --pixelSize [PIXELSIZE] --binPyTom [BINNING_FACTOR_PYTOM_SUBTOMOS] --binWarpM [BINNING_FACTOR_WARPM]
  • -f, --file Filename will convert this single file to the target format. Not to be used in combination with --directory
  • -o, --outputFormat The format of the output file, will keep the same name but only change the extension.
  • --outname Filename output file. This name with replace the default filename.
  • --pixelSize Pixelsize in angstrom of the original nanographs.
  • --binPyTom Linear binning factor of the pytom tomogram.
  • --binWarpM Linear binning factor of the warp/m volumes.
  1. if you have a folder with xml files:
convert.py -d [/PATH/TO/FOLDER] --outname [OUTNAME.star] -o star --pixelSize [PIXELSIZE] --binPyTom [BINNING_FACTOR_PYTOM_SUBTOMOS] --binWarpM [BINNING_FACTOR_WARPM]
  • -d, --directory A directory of files, will convert all possible files to the outputFormat specified, not te be used in combination with --file
  • -o, --outputFormat The format of the output file, will keep the same name but only change the extension.
  • --outname Filename output file. This name with replace the default filename.
  • --pixelSize Pixelsize in angstrom of the original nanographs.
  • --binPyTom (Linear) Binning factor of the pytom tomogram.
  • --binWarpM (Linear) Binning factor of the warp/m volumes.
  1. If you would want to convert relion star files to PyTom particle lists:
convert.py -f [PATH/TO/STARFILE] -o xml --outname [OUTNAME.XML] --pixelSize [PIXELSIZE] --binPyTom [LINEAR_BINNING_FACTOR_PYTOM_SUBTOMOS] --binWarpM [LINEAR_BINNING_FACTOR_WARPM] --wedgeAngles 30,30
  • -f, --file Filename will convert this single file to the target format. Not to be used in combination with --directory
  • -o, --outputFormat The format of the output file, will keep the same name but only change the extension.
  • --outname Filename output file. This name with replace the default filename.
  • -w, --wedgeAngles Data needed for the conversion from coordinates to a particlelist. Missing wedge angle(s) [counter-clock, clock] or single angle
  • --pixelSize Pixelsize in angstrom of the original nanographs.
  • --binPyTom (Linear) Binning factor of the pytom tomogram.
  • --binWarpM (Linear) Binning factor of the warp/m volumes.