Skip to content

v3.3.1: fixes to backprojection and tilt with indices; per tomo star filtering

Compare
Choose a tag to compare
@michal-g michal-g released this 09 May 16:54
· 35 commits to main since this release

This is a patch release to address several bugs and issues that have come to our attention:

  • adding --micrograph-files argument to filter_star to create separate output files for each _rlnMicroGraphName encountered in the file
  • --ind with --encode-mode=tilt wasn’t working in the case where all particles had the same number of tilts due to dtype=object patch introduced earlier
    • fixed by storing particle→tilt index produced by TiltSeriesData.parse_particle_tilt() as a list instead of an array; this is more robust in general and all downstream cases are agnostic (see tests below)
  • backproject_voxel was producing errors when trying to calculate threshold FSC values due to deprecated code used to parse FSC matrix (#371)
    • fixed by copying over code already used in commands/fsc
  • train_nn and train_vae would error out if inputs were not divisible by 8 when using AMP optimization (e.g. #353)
    • a warning here suffices as AMP optimization is the default and this is frustrating for many users
  • better error message when CTF file is missing from write_star inputs
  • better error message when backproject_voxel output is not .mrc
  • bug in ET_viz notebook when --ind not specified caused by inconsistent definition of ind0
  • bug in filtering notebook caused by using ind=ind_orig when loading dataset and then trying to filter again (#363)
  • ZeroDivisionError bugs in all notebooks when using small training datasets
  • updating template analysis notebooks to use the given kmeans value in the copied-over notebook, similarly to out auto-updating of notebook epoch numbers

In addition to making the required fixes, we have expanded and improved our deployment tests to cover these cases and close some gaps in our testing coverage:

  • adding a stand-alone test of backprojection under test_reconstruct applying both .mrcs and .star inputs
  • more testing of train_nn cases with different --amp, --batch-size, --poses values
  • fixing check=True issue in utils.run_command() that was allowing tests of backprojection to fail silently
  • new deployment task schedule
    • the main deployment task has been split into tests and style for tests of code integrity and code linting respectively
    • run tests and style along with beta-release any time a patch version tag [0-9]+\.[0-9]+\.[0-9]+-* is pushed to any branch to trigger a verified upload to TestPyPI
      • also run tests and style for any push to develop branch to allow for testing before beta release
    • update release to only run when a stable version tag (^[0-9]+\.[0-9]+\.[0-9]+$) is pushed to main
      • tests and style run on any push to main to allow for testing prior to release

Other changes include:

  • applying tmpdir_factory to improve the train_dir and AbinitioDir fixtures used in tests with more robust setup and teardowns
  • CodeFactor badge and nicer TestPyPI installation command in README
  • dynamic update of plotted point sizes in cryoDRGN_filtering.ipynb interactive filtering widget, useful for smaller datasets for which the default is too small for points to be seen
  • using plt.close() after analyze plotting for better memory management