cryodrgn 0.20.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. cryodrgn-0.20.0/.flake8 +4 -0
  2. cryodrgn-0.20.0/.github/CODEOWNERS +1 -0
  3. cryodrgn-0.20.0/.github/ISSUE_TEMPLATE/bug_report.md +20 -0
  4. cryodrgn-0.20.0/.github/workflows/beta_release.yml +35 -0
  5. cryodrgn-0.20.0/.github/workflows/docs.yml +40 -0
  6. cryodrgn-0.20.0/.github/workflows/release.yml +36 -0
  7. cryodrgn-0.20.0/.github/workflows/style.yml +36 -0
  8. cryodrgn-0.20.0/.github/workflows/tests.yml +37 -0
  9. cryodrgn-0.20.0/.gitignore +107 -0
  10. cryodrgn-0.20.0/.pre-commit-config.yaml +27 -0
  11. cryodrgn-0.20.0/LICENSE.txt +674 -0
  12. cryodrgn-0.20.0/MANIFEST.in +1 -0
  13. cryodrgn-0.20.0/PKG-INFO +730 -0
  14. cryodrgn-0.20.0/README.md +694 -0
  15. cryodrgn-0.20.0/analysis_scripts/kmeans.py +93 -0
  16. cryodrgn-0.20.0/analysis_scripts/plot_loss.py +40 -0
  17. cryodrgn-0.20.0/analysis_scripts/plot_z1.py +84 -0
  18. cryodrgn-0.20.0/analysis_scripts/plot_z2.py +114 -0
  19. cryodrgn-0.20.0/analysis_scripts/plot_z_pca.py +117 -0
  20. cryodrgn-0.20.0/analysis_scripts/run_umap.py +39 -0
  21. cryodrgn-0.20.0/analysis_scripts/tsne.py +30 -0
  22. cryodrgn-0.20.0/cryodrgn/__init__.py +34 -0
  23. cryodrgn-0.20.0/cryodrgn/_version.py +16 -0
  24. cryodrgn-0.20.0/cryodrgn/analysis.py +655 -0
  25. cryodrgn-0.20.0/cryodrgn/beta_schedule.py +38 -0
  26. cryodrgn-0.20.0/cryodrgn/command_line.py +76 -0
  27. cryodrgn-0.20.0/cryodrgn/commands/__init__.py +0 -0
  28. cryodrgn-0.20.0/cryodrgn/commands/abinit_het.py +1109 -0
  29. cryodrgn-0.20.0/cryodrgn/commands/abinit_homo.py +804 -0
  30. cryodrgn-0.20.0/cryodrgn/commands/analyze.py +523 -0
  31. cryodrgn-0.20.0/cryodrgn/commands/analyze_landscape.py +559 -0
  32. cryodrgn-0.20.0/cryodrgn/commands/analyze_landscape_full.py +358 -0
  33. cryodrgn-0.20.0/cryodrgn/commands/backproject_voxel.py +331 -0
  34. cryodrgn-0.20.0/cryodrgn/commands/direct_traversal.py +106 -0
  35. cryodrgn-0.20.0/cryodrgn/commands/downsample.py +180 -0
  36. cryodrgn-0.20.0/cryodrgn/commands/eval_images.py +421 -0
  37. cryodrgn-0.20.0/cryodrgn/commands/eval_vol.py +250 -0
  38. cryodrgn-0.20.0/cryodrgn/commands/filter.py +407 -0
  39. cryodrgn-0.20.0/cryodrgn/commands/graph_traversal.py +221 -0
  40. cryodrgn-0.20.0/cryodrgn/commands/parse_ctf_csparc.py +77 -0
  41. cryodrgn-0.20.0/cryodrgn/commands/parse_ctf_star.py +111 -0
  42. cryodrgn-0.20.0/cryodrgn/commands/parse_pose_csparc.py +80 -0
  43. cryodrgn-0.20.0/cryodrgn/commands/parse_pose_star.py +93 -0
  44. cryodrgn-0.20.0/cryodrgn/commands/pc_traversal.py +90 -0
  45. cryodrgn-0.20.0/cryodrgn/commands/preprocess.py +167 -0
  46. cryodrgn-0.20.0/cryodrgn/commands/train_nn.py +586 -0
  47. cryodrgn-0.20.0/cryodrgn/commands/train_vae.py +1031 -0
  48. cryodrgn-0.20.0/cryodrgn/commands/view_config.py +52 -0
  49. cryodrgn-0.20.0/cryodrgn/commands_utils/__init__.py +0 -0
  50. cryodrgn-0.20.0/cryodrgn/commands_utils/add_psize.py +35 -0
  51. cryodrgn-0.20.0/cryodrgn/commands_utils/clean.py +223 -0
  52. cryodrgn-0.20.0/cryodrgn/commands_utils/concat_pkls.py +38 -0
  53. cryodrgn-0.20.0/cryodrgn/commands_utils/filter_mrcs.py +29 -0
  54. cryodrgn-0.20.0/cryodrgn/commands_utils/filter_pkl.py +55 -0
  55. cryodrgn-0.20.0/cryodrgn/commands_utils/filter_star.py +76 -0
  56. cryodrgn-0.20.0/cryodrgn/commands_utils/flip_hand.py +52 -0
  57. cryodrgn-0.20.0/cryodrgn/commands_utils/fsc.py +129 -0
  58. cryodrgn-0.20.0/cryodrgn/commands_utils/gen_mask.py +85 -0
  59. cryodrgn-0.20.0/cryodrgn/commands_utils/invert_contrast.py +45 -0
  60. cryodrgn-0.20.0/cryodrgn/commands_utils/phase_flip.py +72 -0
  61. cryodrgn-0.20.0/cryodrgn/commands_utils/plot_fsc.py +116 -0
  62. cryodrgn-0.20.0/cryodrgn/commands_utils/select_clusters.py +48 -0
  63. cryodrgn-0.20.0/cryodrgn/commands_utils/select_random.py +47 -0
  64. cryodrgn-0.20.0/cryodrgn/commands_utils/translate_mrcs.py +82 -0
  65. cryodrgn-0.20.0/cryodrgn/commands_utils/view_cs_header.py +24 -0
  66. cryodrgn-0.20.0/cryodrgn/commands_utils/view_header.py +27 -0
  67. cryodrgn-0.20.0/cryodrgn/commands_utils/view_mrcs.py +55 -0
  68. cryodrgn-0.20.0/cryodrgn/commands_utils/write_cs.py +85 -0
  69. cryodrgn-0.20.0/cryodrgn/commands_utils/write_star.py +172 -0
  70. cryodrgn-0.20.0/cryodrgn/config.py +93 -0
  71. cryodrgn-0.20.0/cryodrgn/ctf.py +154 -0
  72. cryodrgn-0.20.0/cryodrgn/dataset.py +479 -0
  73. cryodrgn-0.20.0/cryodrgn/fft.py +79 -0
  74. cryodrgn-0.20.0/cryodrgn/healpy_grid.json +1 -0
  75. cryodrgn-0.20.0/cryodrgn/lattice.py +204 -0
  76. cryodrgn-0.20.0/cryodrgn/lie_tools.py +277 -0
  77. cryodrgn-0.20.0/cryodrgn/losses.py +34 -0
  78. cryodrgn-0.20.0/cryodrgn/make_healpy.py +14 -0
  79. cryodrgn-0.20.0/cryodrgn/models.py +1180 -0
  80. cryodrgn-0.20.0/cryodrgn/mrc.py +315 -0
  81. cryodrgn-0.20.0/cryodrgn/pose.py +152 -0
  82. cryodrgn-0.20.0/cryodrgn/pose_search.py +446 -0
  83. cryodrgn-0.20.0/cryodrgn/shift_grid.py +51 -0
  84. cryodrgn-0.20.0/cryodrgn/shift_grid3.py +51 -0
  85. cryodrgn-0.20.0/cryodrgn/so3_grid.py +142 -0
  86. cryodrgn-0.20.0/cryodrgn/source.py +460 -0
  87. cryodrgn-0.20.0/cryodrgn/starfile.py +144 -0
  88. cryodrgn-0.20.0/cryodrgn/templates/cryoDRGN_ET_viz_template.ipynb +771 -0
  89. cryodrgn-0.20.0/cryodrgn/templates/cryoDRGN_analyze_landscape_template.ipynb +446 -0
  90. cryodrgn-0.20.0/cryodrgn/templates/cryoDRGN_figures_template.ipynb +519 -0
  91. cryodrgn-0.20.0/cryodrgn/templates/cryoDRGN_filtering_template.ipynb +1102 -0
  92. cryodrgn-0.20.0/cryodrgn/templates/cryoDRGN_viz_template.ipynb +745 -0
  93. cryodrgn-0.20.0/cryodrgn/utils.py +244 -0
  94. cryodrgn-0.20.0/cryodrgn.egg-info/PKG-INFO +730 -0
  95. cryodrgn-0.20.0/cryodrgn.egg-info/SOURCES.txt +294 -0
  96. cryodrgn-0.20.0/cryodrgn.egg-info/dependency_links.txt +1 -0
  97. cryodrgn-0.20.0/cryodrgn.egg-info/entry_points.txt +3 -0
  98. cryodrgn-0.20.0/cryodrgn.egg-info/not-zip-safe +1 -0
  99. cryodrgn-0.20.0/cryodrgn.egg-info/requires.txt +24 -0
  100. cryodrgn-0.20.0/cryodrgn.egg-info/top_level.txt +1 -0
  101. cryodrgn-0.20.0/docs/Makefile +24 -0
  102. cryodrgn-0.20.0/docs/api.rst +10 -0
  103. cryodrgn-0.20.0/docs/conf.py +39 -0
  104. cryodrgn-0.20.0/docs/index.rst +46 -0
  105. cryodrgn-0.20.0/docs/make.bat +35 -0
  106. cryodrgn-0.20.0/docs/pages/assets/Untitled.png +0 -0
  107. cryodrgn-0.20.0/docs/pages/assets/Untitled_1.png +0 -0
  108. cryodrgn-0.20.0/docs/pages/assets/Untitled_10.png +0 -0
  109. cryodrgn-0.20.0/docs/pages/assets/Untitled_11.png +0 -0
  110. cryodrgn-0.20.0/docs/pages/assets/Untitled_12.png +0 -0
  111. cryodrgn-0.20.0/docs/pages/assets/Untitled_13.png +0 -0
  112. cryodrgn-0.20.0/docs/pages/assets/Untitled_14.png +0 -0
  113. cryodrgn-0.20.0/docs/pages/assets/Untitled_15.png +0 -0
  114. cryodrgn-0.20.0/docs/pages/assets/Untitled_16.png +0 -0
  115. cryodrgn-0.20.0/docs/pages/assets/Untitled_17.png +0 -0
  116. cryodrgn-0.20.0/docs/pages/assets/Untitled_18.png +0 -0
  117. cryodrgn-0.20.0/docs/pages/assets/Untitled_19.png +0 -0
  118. cryodrgn-0.20.0/docs/pages/assets/Untitled_2.png +0 -0
  119. cryodrgn-0.20.0/docs/pages/assets/Untitled_20.png +0 -0
  120. cryodrgn-0.20.0/docs/pages/assets/Untitled_21.png +0 -0
  121. cryodrgn-0.20.0/docs/pages/assets/Untitled_22.png +0 -0
  122. cryodrgn-0.20.0/docs/pages/assets/Untitled_23.png +0 -0
  123. cryodrgn-0.20.0/docs/pages/assets/Untitled_24.png +0 -0
  124. cryodrgn-0.20.0/docs/pages/assets/Untitled_25.png +0 -0
  125. cryodrgn-0.20.0/docs/pages/assets/Untitled_26.png +0 -0
  126. cryodrgn-0.20.0/docs/pages/assets/Untitled_27.png +0 -0
  127. cryodrgn-0.20.0/docs/pages/assets/Untitled_28.png +0 -0
  128. cryodrgn-0.20.0/docs/pages/assets/Untitled_29.png +0 -0
  129. cryodrgn-0.20.0/docs/pages/assets/Untitled_3.png +0 -0
  130. cryodrgn-0.20.0/docs/pages/assets/Untitled_30.png +0 -0
  131. cryodrgn-0.20.0/docs/pages/assets/Untitled_31.png +0 -0
  132. cryodrgn-0.20.0/docs/pages/assets/Untitled_32.png +0 -0
  133. cryodrgn-0.20.0/docs/pages/assets/Untitled_33.png +0 -0
  134. cryodrgn-0.20.0/docs/pages/assets/Untitled_34.png +0 -0
  135. cryodrgn-0.20.0/docs/pages/assets/Untitled_35.png +0 -0
  136. cryodrgn-0.20.0/docs/pages/assets/Untitled_36.png +0 -0
  137. cryodrgn-0.20.0/docs/pages/assets/Untitled_37.png +0 -0
  138. cryodrgn-0.20.0/docs/pages/assets/Untitled_38.png +0 -0
  139. cryodrgn-0.20.0/docs/pages/assets/Untitled_39.png +0 -0
  140. cryodrgn-0.20.0/docs/pages/assets/Untitled_4.png +0 -0
  141. cryodrgn-0.20.0/docs/pages/assets/Untitled_40.png +0 -0
  142. cryodrgn-0.20.0/docs/pages/assets/Untitled_41.png +0 -0
  143. cryodrgn-0.20.0/docs/pages/assets/Untitled_42.png +0 -0
  144. cryodrgn-0.20.0/docs/pages/assets/Untitled_43.png +0 -0
  145. cryodrgn-0.20.0/docs/pages/assets/Untitled_44.png +0 -0
  146. cryodrgn-0.20.0/docs/pages/assets/Untitled_45.png +0 -0
  147. cryodrgn-0.20.0/docs/pages/assets/Untitled_46.png +0 -0
  148. cryodrgn-0.20.0/docs/pages/assets/Untitled_47.png +0 -0
  149. cryodrgn-0.20.0/docs/pages/assets/Untitled_48.png +0 -0
  150. cryodrgn-0.20.0/docs/pages/assets/Untitled_49.png +0 -0
  151. cryodrgn-0.20.0/docs/pages/assets/Untitled_5.png +0 -0
  152. cryodrgn-0.20.0/docs/pages/assets/Untitled_50.png +0 -0
  153. cryodrgn-0.20.0/docs/pages/assets/Untitled_51.png +0 -0
  154. cryodrgn-0.20.0/docs/pages/assets/Untitled_52.png +0 -0
  155. cryodrgn-0.20.0/docs/pages/assets/Untitled_53.png +0 -0
  156. cryodrgn-0.20.0/docs/pages/assets/Untitled_54.png +0 -0
  157. cryodrgn-0.20.0/docs/pages/assets/Untitled_55.png +0 -0
  158. cryodrgn-0.20.0/docs/pages/assets/Untitled_56.png +0 -0
  159. cryodrgn-0.20.0/docs/pages/assets/Untitled_57.png +0 -0
  160. cryodrgn-0.20.0/docs/pages/assets/Untitled_58.png +0 -0
  161. cryodrgn-0.20.0/docs/pages/assets/Untitled_59.png +0 -0
  162. cryodrgn-0.20.0/docs/pages/assets/Untitled_6.png +0 -0
  163. cryodrgn-0.20.0/docs/pages/assets/Untitled_60.png +0 -0
  164. cryodrgn-0.20.0/docs/pages/assets/Untitled_61.png +0 -0
  165. cryodrgn-0.20.0/docs/pages/assets/Untitled_62.png +0 -0
  166. cryodrgn-0.20.0/docs/pages/assets/Untitled_63.png +0 -0
  167. cryodrgn-0.20.0/docs/pages/assets/Untitled_64.png +0 -0
  168. cryodrgn-0.20.0/docs/pages/assets/Untitled_65.png +0 -0
  169. cryodrgn-0.20.0/docs/pages/assets/Untitled_66.png +0 -0
  170. cryodrgn-0.20.0/docs/pages/assets/Untitled_67.png +0 -0
  171. cryodrgn-0.20.0/docs/pages/assets/Untitled_68.png +0 -0
  172. cryodrgn-0.20.0/docs/pages/assets/Untitled_7.png +0 -0
  173. cryodrgn-0.20.0/docs/pages/assets/Untitled_8.png +0 -0
  174. cryodrgn-0.20.0/docs/pages/assets/Untitled_9.png +0 -0
  175. cryodrgn-0.20.0/docs/pages/assets/landscape_analysis_clustering_results1.png +0 -0
  176. cryodrgn-0.20.0/docs/pages/assets/landscape_analysis_clustering_results2.png +0 -0
  177. cryodrgn-0.20.0/docs/pages/assets/landscape_analysis_clustering_results3.png +0 -0
  178. cryodrgn-0.20.0/docs/pages/assets/landscape_analysis_feature_space.png +0 -0
  179. cryodrgn-0.20.0/docs/pages/assets/landscape_analysis_latent_space.png +0 -0
  180. cryodrgn-0.20.0/docs/pages/assets/landscape_analysis_overview.png +0 -0
  181. cryodrgn-0.20.0/docs/pages/assets/landscape_analysis_user_defined_mask.png +0 -0
  182. cryodrgn-0.20.0/docs/pages/assets/preprocess1.png +0 -0
  183. cryodrgn-0.20.0/docs/pages/assets/preprocess2.png +0 -0
  184. cryodrgn-0.20.0/docs/pages/cryodrgn2.md +118 -0
  185. cryodrgn-0.20.0/docs/pages/empiar_tutorial.md +1900 -0
  186. cryodrgn-0.20.0/docs/pages/faq.md +52 -0
  187. cryodrgn-0.20.0/docs/pages/installation.md +264 -0
  188. cryodrgn-0.20.0/docs/pages/intro.md +75 -0
  189. cryodrgn-0.20.0/docs/pages/landscape_analysis.md +220 -0
  190. cryodrgn-0.20.0/docs/pages/large_datasets.md +72 -0
  191. cryodrgn-0.20.0/pyproject.toml +74 -0
  192. cryodrgn-0.20.0/setup.cfg +4 -0
  193. cryodrgn-0.20.0/sweep.sh +56 -0
  194. cryodrgn-0.20.0/testing/data/50S-vol.mrc +0 -0
  195. cryodrgn-0.20.0/testing/data/FinalRefinement-OriginalParticles-PfCRT.star +33 -0
  196. cryodrgn-0.20.0/testing/data/ay19102021_L3_position6_ribo_it09_bin8_1.82A.mrcs +0 -0
  197. cryodrgn-0.20.0/testing/data/cryosparc_P12_J24_001_particles.cs +0 -0
  198. cryodrgn-0.20.0/testing/data/ctf1.pkl +0 -0
  199. cryodrgn-0.20.0/testing/data/ctf2.pkl +0 -0
  200. cryodrgn-0.20.0/testing/data/empiar_10076_7.cs +0 -0
  201. cryodrgn-0.20.0/testing/data/empiar_10076_7.mrc +0 -0
  202. cryodrgn-0.20.0/testing/data/empiar_10076_7.star +20 -0
  203. cryodrgn-0.20.0/testing/data/hand-vol.mrc +0 -0
  204. cryodrgn-0.20.0/testing/data/hand.5.mrcs +0 -0
  205. cryodrgn-0.20.0/testing/data/hand.mrcs +0 -0
  206. cryodrgn-0.20.0/testing/data/hand_11_particles.npy +0 -0
  207. cryodrgn-0.20.0/testing/data/hand_rot.pkl +0 -0
  208. cryodrgn-0.20.0/testing/data/hand_rot_trans.pkl +0 -0
  209. cryodrgn-0.20.0/testing/data/hand_tilt.mrcs +0 -0
  210. cryodrgn-0.20.0/testing/data/het_config.pkl +0 -0
  211. cryodrgn-0.20.0/testing/data/het_weights.pkl +0 -0
  212. cryodrgn-0.20.0/testing/data/im_shifted.npy +0 -0
  213. cryodrgn-0.20.0/testing/data/ind100-rand.pkl +0 -0
  214. cryodrgn-0.20.0/testing/data/ind100.pkl +0 -0
  215. cryodrgn-0.20.0/testing/data/ind4.pkl +0 -0
  216. cryodrgn-0.20.0/testing/data/ind5.pkl +0 -0
  217. cryodrgn-0.20.0/testing/data/ind_39_sta_testing_bin8.pkl +0 -0
  218. cryodrgn-0.20.0/testing/data/pose.cs.pkl +0 -0
  219. cryodrgn-0.20.0/testing/data/pose.star.pkl +0 -0
  220. cryodrgn-0.20.0/testing/data/relion31.mrcs +0 -0
  221. cryodrgn-0.20.0/testing/data/relion31.star +54 -0
  222. cryodrgn-0.20.0/testing/data/relion31.v2.star +55 -0
  223. cryodrgn-0.20.0/testing/data/spike-vol.mrc +0 -0
  224. cryodrgn-0.20.0/testing/data/sta_ctf.pkl +0 -0
  225. cryodrgn-0.20.0/testing/data/sta_pose.pkl +0 -0
  226. cryodrgn-0.20.0/testing/data/sta_testing.star +243 -0
  227. cryodrgn-0.20.0/testing/data/sta_testing_bin8.star +243 -0
  228. cryodrgn-0.20.0/testing/data/test_ctf.pkl +0 -0
  229. cryodrgn-0.20.0/testing/data/toy.star +1011 -0
  230. cryodrgn-0.20.0/testing/data/toy_angles.pkl +0 -0
  231. cryodrgn-0.20.0/testing/data/toy_projections.mrc +0 -0
  232. cryodrgn-0.20.0/testing/data/toy_projections.mrcs +0 -0
  233. cryodrgn-0.20.0/testing/data/toy_projections.star +1012 -0
  234. cryodrgn-0.20.0/testing/data/toy_projections.txt +1 -0
  235. cryodrgn-0.20.0/testing/data/toy_projections_0-999.mrcs +0 -0
  236. cryodrgn-0.20.0/testing/data/toy_projections_13.star +39 -0
  237. cryodrgn-0.20.0/testing/data/toy_projections_2.txt +2 -0
  238. cryodrgn-0.20.0/testing/data/toy_rot_trans.pkl +0 -0
  239. cryodrgn-0.20.0/testing/data/toy_rot_zerotrans.pkl +0 -0
  240. cryodrgn-0.20.0/testing/data/toy_trans.pkl +0 -0
  241. cryodrgn-0.20.0/testing/data/toy_trans.zero.pkl +0 -0
  242. cryodrgn-0.20.0/testing/data/toymodel_small_nocenter.mrc +0 -0
  243. cryodrgn-0.20.0/testing/data/zvals_het-2_1k.pkl +0 -0
  244. cryodrgn-0.20.0/testing/data/zvals_het-8_4k.pkl +0 -0
  245. cryodrgn-0.20.0/testing/diff_cryodrgn_pkl.py +17 -0
  246. cryodrgn-0.20.0/testing/quicktest.sh +4 -0
  247. cryodrgn-0.20.0/testing/test_abinit.sh +11 -0
  248. cryodrgn-0.20.0/testing/test_entropy.py +33 -0
  249. cryodrgn-0.20.0/testing/test_mrc.py +19 -0
  250. cryodrgn-0.20.0/testing/test_parse.sh +25 -0
  251. cryodrgn-0.20.0/testing/test_pose_search_rag12_128.py +199 -0
  252. cryodrgn-0.20.0/testing/test_pose_search_real_128.py +189 -0
  253. cryodrgn-0.20.0/testing/test_pose_search_syn_64.py +122 -0
  254. cryodrgn-0.20.0/testing/test_relion31.sh +10 -0
  255. cryodrgn-0.20.0/testing/test_sta.sh +6 -0
  256. cryodrgn-0.20.0/testing/test_translate.py +33 -0
  257. cryodrgn-0.20.0/testing/test_utils.py +43 -0
  258. cryodrgn-0.20.0/testing/test_utils.sh +21 -0
  259. cryodrgn-0.20.0/testing/unittest.sh +45 -0
  260. cryodrgn-0.20.0/tests/conftest.py +428 -0
  261. cryodrgn-0.20.0/tests/test_add_psize.py +29 -0
  262. cryodrgn-0.20.0/tests/test_clean.py +100 -0
  263. cryodrgn-0.20.0/tests/test_dataset.py +105 -0
  264. cryodrgn-0.20.0/tests/test_direct_traversal.py +41 -0
  265. cryodrgn-0.20.0/tests/test_downsample.py +79 -0
  266. cryodrgn-0.20.0/tests/test_entropy.py +15 -0
  267. cryodrgn-0.20.0/tests/test_eval_images.py +33 -0
  268. cryodrgn-0.20.0/tests/test_fft.py +36 -0
  269. cryodrgn-0.20.0/tests/test_filter_mrcs.py +38 -0
  270. cryodrgn-0.20.0/tests/test_filter_pkl.py +35 -0
  271. cryodrgn-0.20.0/tests/test_flip_hand.py +66 -0
  272. cryodrgn-0.20.0/tests/test_fsc.py +136 -0
  273. cryodrgn-0.20.0/tests/test_gen_mask.py +148 -0
  274. cryodrgn-0.20.0/tests/test_graph_traversal.py +98 -0
  275. cryodrgn-0.20.0/tests/test_integration.py +651 -0
  276. cryodrgn-0.20.0/tests/test_invert_contrast.py +67 -0
  277. cryodrgn-0.20.0/tests/test_mrc.py +33 -0
  278. cryodrgn-0.20.0/tests/test_parse.py +87 -0
  279. cryodrgn-0.20.0/tests/test_pc_traversal.py +44 -0
  280. cryodrgn-0.20.0/tests/test_phase_flip.py +24 -0
  281. cryodrgn-0.20.0/tests/test_pipeline.py +173 -0
  282. cryodrgn-0.20.0/tests/test_preprocess.py +62 -0
  283. cryodrgn-0.20.0/tests/test_read_filter_write.py +268 -0
  284. cryodrgn-0.20.0/tests/test_reconstruct.py +102 -0
  285. cryodrgn-0.20.0/tests/test_relion31.py +79 -0
  286. cryodrgn-0.20.0/tests/test_select_clusters.py +65 -0
  287. cryodrgn-0.20.0/tests/test_select_random.py +51 -0
  288. cryodrgn-0.20.0/tests/test_source.py +199 -0
  289. cryodrgn-0.20.0/tests/test_translate.py +30 -0
  290. cryodrgn-0.20.0/tests/test_utils.py +33 -0
  291. cryodrgn-0.20.0/tests/test_view_cs_header.py +18 -0
  292. cryodrgn-0.20.0/tests/test_view_header.py +14 -0
  293. cryodrgn-0.20.0/tests/test_view_mrcs.py +14 -0
  294. cryodrgn-0.20.0/tests/test_writestarfile.py +46 -0
  295. cryodrgn-0.20.0/utils/analyze_convergence.py +1251 -0
  296. cryodrgn-0.20.0/versions.txt +15 -0
@@ -0,0 +1,4 @@
1
+ [flake8]
2
+ extend-ignore = E203,E501
3
+ max-complexity = 99
4
+ max-line-length = 88
@@ -0,0 +1 @@
1
+ * @michal-g @zhonge
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ What is the command you used?
15
+
16
+ **Expected behavior**
17
+ A clear and concise description of what you expected to happen.
18
+
19
+ **Additional context**
20
+ Add any other context about the problem here.
@@ -0,0 +1,35 @@
1
+ name: Beta Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - '[0-9]+\.[0-9]+\.[0-9]+-*'
7
+
8
+ jobs:
9
+ beta-release:
10
+
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - name: Upgrade setuptools/build
17
+ run: |
18
+ pip3 install wheel --upgrade
19
+ pip3 install setuptools --upgrade
20
+
21
+ - name: Setup Python
22
+ uses: actions/setup-python@v5
23
+ with:
24
+ python-version: '3.9'
25
+
26
+ - name: Release to TestPyPI
27
+ env:
28
+ TWINE_USERNAME: __token__
29
+ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
30
+
31
+ run: |
32
+ python -m pip install --upgrade build
33
+ python -m build .
34
+ python -m pip install --upgrade twine
35
+ twine upload --repository testpypi dist/*
@@ -0,0 +1,40 @@
1
+ name: Docs
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+
7
+ jobs:
8
+
9
+ build_docs:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - name: Setup Python
14
+ uses: actions/setup-python@v5
15
+ with:
16
+ python-version: '3.9'
17
+
18
+ - name: Checkout repository
19
+ uses: actions/checkout@v4
20
+
21
+ - name: Install Python dependencies
22
+ run: |
23
+ python -m pip install --upgrade pip
24
+ pip install sphinx myst-parser sphinx-rtd-theme /home/runner/work/cryodrgn/cryodrgn/
25
+
26
+ - name: Setup Envvars
27
+ run: |
28
+ if [[ $GITHUB_REF = "refs/tags/"* ]] ; then echo "CRYODRGN_VERSION=${GITHUB_REF/refs\/tags\//}" ; else echo "CRYODRGN_VERSION=" ; fi >> $GITHUB_ENV
29
+
30
+ - name: Build docs
31
+ run: |
32
+ # Unless we add a .nojekyll to the base of the deployment folder, the underscores in foldernames
33
+ # like _static/ etc. pose problems on GH Pages.
34
+ cd docs && make html && touch _build/html/.nojekyll
35
+
36
+ - name: Deploy
37
+ uses: JamesIves/github-pages-deploy-action@v4
38
+ with:
39
+ folder: docs/_build/html
40
+ branch: gh-pages
@@ -0,0 +1,36 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - '[0-9]+.[0-9]+.[0-9]+'
7
+ - '!*-[a-z]+[0-9]+'
8
+
9
+ jobs:
10
+ release:
11
+
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Upgrade setuptools/build
18
+ run: |
19
+ pip3 install wheel --upgrade
20
+ pip3 install setuptools --upgrade
21
+
22
+ - name: Setup Python
23
+ uses: actions/setup-python@v5
24
+ with:
25
+ python-version: '3.9'
26
+
27
+ - name: Release to pypi
28
+ env:
29
+ TWINE_USERNAME: __token__
30
+ TWINE_PASSWORD: ${{ secrets.PYPI_MAIN_TOKEN }}
31
+
32
+ run: |
33
+ python -m pip install --upgrade build
34
+ python -m build .
35
+ python -m pip install --upgrade twine
36
+ twine upload dist/*
@@ -0,0 +1,36 @@
1
+ name: Code Linting
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, develop ]
6
+ tags:
7
+ - '[0-9]+\.[0-9]+\.[0-9]+'
8
+ - '[0-9]+\.[0-9]+\.[0-9]+-*'
9
+ pull_request:
10
+ branches: [ main, develop ]
11
+
12
+ jobs:
13
+ run_tests:
14
+
15
+ runs-on: ubuntu-latest
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Setup Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: '3.10'
24
+
25
+ - name: Install cryoDRGN with dev dependencies
26
+ run: |
27
+ python3 -m pip install .[dev]
28
+
29
+ - name: Run pre-commit checks
30
+ run: |
31
+ pre-commit run --all-files --show-diff-on-failure
32
+
33
+ - name: Run Pyright
34
+ run: |
35
+ pyright --version
36
+ #pyright
@@ -0,0 +1,37 @@
1
+ name: CI Testing
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, develop ]
6
+ tags:
7
+ - '[0-9]+\.[0-9]+\.[0-9]+'
8
+ - '[0-9]+\.[0-9]+\.[0-9]+-*'
9
+ pull_request:
10
+ branches: [ main, develop ]
11
+
12
+ jobs:
13
+ run_tests:
14
+
15
+ runs-on: ${{ matrix.os }}
16
+ strategy:
17
+ matrix:
18
+ os: [ubuntu-latest, macos-latest]
19
+ python: ['3.9', '3.10']
20
+ fail-fast: false
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+
25
+ - name: Setup Python
26
+ uses: actions/setup-python@v5
27
+ with:
28
+ python-version: ${{ matrix.python }}
29
+
30
+ - name: Install cryoDRGN with pytest dependencies
31
+ run: |
32
+ python3 -m pip install pytest-xdist
33
+ python3 -m pip install .
34
+
35
+ - name: Pytest
36
+ run: |
37
+ pytest -v -n auto --dist=loadscope
@@ -0,0 +1,107 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ .DS_Store
12
+ env/
13
+ build/
14
+ develop-eggs/
15
+ docs/generated/
16
+ dist/
17
+ downloads/
18
+ eggs/
19
+ .eggs/
20
+ .idea/
21
+ lib/
22
+ lib64/
23
+ parts/
24
+ sdist/
25
+ var/
26
+ wheels/
27
+ *.egg-info/
28
+ .installed.cfg
29
+ *.egg
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ .hypothesis/
51
+
52
+ testing/output
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+
62
+ # Flask stuff:
63
+ instance/
64
+ .webassets-cache
65
+
66
+ # Scrapy stuff:
67
+ .scrapy
68
+
69
+ # Sphinx documentation
70
+ docs/_build/
71
+
72
+ # PyBuilder
73
+ target/
74
+
75
+ # Jupyter Notebook
76
+ .ipynb_checkpoints
77
+
78
+ # pyenv
79
+ .python-version
80
+ cryodrgn/_version.py
81
+
82
+ # celery beat schedule file
83
+ celerybeat-schedule
84
+
85
+ # SageMath parsed files
86
+ *.sage.py
87
+
88
+ # dotenv
89
+ .env
90
+
91
+ # virtualenv
92
+ .venv
93
+ venv/
94
+ ENV/
95
+
96
+ # Spyder project settings
97
+ .spyderproject
98
+ .spyproject
99
+
100
+ # Rope project settings
101
+ .ropeproject
102
+
103
+ # mkdocs documentation
104
+ /site
105
+
106
+ # mypy
107
+ .mypy_cache/
@@ -0,0 +1,27 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+
4
+ exclude: '.cs$|.star$'
5
+
6
+ repos:
7
+ - repo: https://github.com/pre-commit/pre-commit-hooks
8
+ rev: v3.2.0
9
+ hooks:
10
+ - id: trailing-whitespace
11
+ - id: end-of-file-fixer
12
+
13
+ - repo: https://github.com/pycqa/flake8
14
+ rev: '4.0.1'
15
+ hooks:
16
+ - id: flake8
17
+
18
+ - repo: https://github.com/psf/black
19
+ rev: 22.10.0
20
+ hooks:
21
+ - id: black
22
+ language_version: python3
23
+
24
+ - repo: https://github.com/MarcoGorelli/absolufy-imports
25
+ rev: v0.3.1
26
+ hooks:
27
+ - id: absolufy-imports