truecell 2.0.0__tar.gz → 2.1.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 (228) hide show
  1. {truecell-2.0.0 → truecell-2.1.0}/.claude/skills/truecell/reference/api-map.md +15 -8
  2. {truecell-2.0.0 → truecell-2.1.0}/CHANGELOG.md +237 -0
  3. {truecell-2.0.0 → truecell-2.1.0}/PKG-INFO +57 -25
  4. {truecell-2.0.0 → truecell-2.1.0}/README.md +35 -3
  5. {truecell-2.0.0 → truecell-2.1.0}/ROADMAP.md +64 -6
  6. {truecell-2.0.0 → truecell-2.1.0}/pyproject.toml +13 -13
  7. truecell-2.1.0/tests/test_anndata_compat.py +119 -0
  8. {truecell-2.0.0 → truecell-2.1.0}/tests/test_anndata_spatial.py +21 -6
  9. truecell-2.1.0/tests/test_composition_samples.py +167 -0
  10. truecell-2.1.0/tests/test_constraints.py +62 -0
  11. {truecell-2.0.0 → truecell-2.1.0}/tests/test_deseq2_seurat_parity.py +70 -1
  12. {truecell-2.0.0 → truecell-2.1.0}/tests/test_docs.py +3 -4
  13. truecell-2.1.0/tests/test_feature_plot_cutoffs.py +151 -0
  14. truecell-2.1.0/tests/test_generics.py +276 -0
  15. truecell-2.1.0/tests/test_layer_feature_alignment.py +128 -0
  16. {truecell-2.0.0 → truecell-2.1.0}/tests/test_multimodal_tutorial.py +114 -3
  17. truecell-2.1.0/tests/test_plot_group_order.py +251 -0
  18. {truecell-2.0.0 → truecell-2.1.0}/tests/test_plotting_layout.py +7 -3
  19. {truecell-2.0.0 → truecell-2.1.0}/tests/test_plotting_theme.py +4 -0
  20. {truecell-2.0.0 → truecell-2.1.0}/tests/test_tutorial_smoke.py +27 -0
  21. {truecell-2.0.0 → truecell-2.1.0}/truecell/_deseq2.py +41 -0
  22. {truecell-2.0.0 → truecell-2.1.0}/truecell/_show_versions.py +21 -1
  23. {truecell-2.0.0 → truecell-2.1.0}/truecell/compat/anndata.py +24 -0
  24. truecell-2.1.0/truecell/composition.py +200 -0
  25. {truecell-2.0.0 → truecell-2.1.0}/truecell/generics.py +111 -16
  26. {truecell-2.0.0 → truecell-2.1.0}/truecell/module_score.py +6 -8
  27. {truecell-2.0.0 → truecell-2.1.0}/truecell/plotting.py +121 -31
  28. truecell-2.0.0/tests/test_anndata_compat.py +0 -48
  29. truecell-2.0.0/tests/test_plot_group_order.py +0 -99
  30. truecell-2.0.0/truecell/composition.py +0 -100
  31. {truecell-2.0.0 → truecell-2.1.0}/.claude/skills/README.md +0 -0
  32. {truecell-2.0.0 → truecell-2.1.0}/.claude/skills/truecell/SKILL.md +0 -0
  33. {truecell-2.0.0 → truecell-2.1.0}/.claude/skills/truecell/reference/object-model.md +0 -0
  34. {truecell-2.0.0 → truecell-2.1.0}/.gitignore +0 -0
  35. {truecell-2.0.0 → truecell-2.1.0}/LICENSE +0 -0
  36. {truecell-2.0.0 → truecell-2.1.0}/docs/CHANGELOG.md +0 -0
  37. {truecell-2.0.0 → truecell-2.1.0}/docs/ROADMAP.md +0 -0
  38. {truecell-2.0.0 → truecell-2.1.0}/docs/assets/logo/README.md +0 -0
  39. {truecell-2.0.0 → truecell-2.1.0}/docs/tutorials/README.md +0 -0
  40. {truecell-2.0.0 → truecell-2.1.0}/docs/tutorials/benchmark/README.md +0 -0
  41. {truecell-2.0.0 → truecell-2.1.0}/tests/_layout.py +0 -0
  42. {truecell-2.0.0 → truecell-2.1.0}/tests/conftest.py +0 -0
  43. {truecell-2.0.0 → truecell-2.1.0}/tests/data/find_neighbors_r_reference.json +0 -0
  44. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loader_r_reference.json +0 -0
  45. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/cosmx/Run1-polygons.csv +0 -0
  46. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/cosmx/Run1_exprMat_file.csv +0 -0
  47. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/cosmx/Run1_metadata_file.csv +0 -0
  48. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/cosmx/Run1_tx_file.csv +0 -0
  49. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/merscope/cell_boundaries/feature_data_0.hdf5 +0 -0
  50. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/merscope/cell_boundaries/feature_data_1.hdf5 +0 -0
  51. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/merscope/cell_boundaries/feature_data_2.hdf5 +0 -0
  52. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/merscope/cell_by_gene.csv +0 -0
  53. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/merscope/cell_metadata.csv +0 -0
  54. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/xenium_csv/cell_feature_matrix/barcodes.tsv.gz +0 -0
  55. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/xenium_csv/cell_feature_matrix/features.tsv.gz +0 -0
  56. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/xenium_csv/cell_feature_matrix/matrix.mtx.gz +0 -0
  57. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/xenium_csv/cells.csv.gz +0 -0
  58. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/xenium_parquet/cell_feature_matrix/barcodes.tsv.gz +0 -0
  59. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/xenium_parquet/cell_feature_matrix/features.tsv.gz +0 -0
  60. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/xenium_parquet/cell_feature_matrix/matrix.mtx.gz +0 -0
  61. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/xenium_parquet/cells.parquet +0 -0
  62. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/xenium_parquet_binary/cell_feature_matrix/barcodes.tsv.gz +0 -0
  63. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/xenium_parquet_binary/cell_feature_matrix/features.tsv.gz +0 -0
  64. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/xenium_parquet_binary/cell_feature_matrix/matrix.mtx.gz +0 -0
  65. {truecell-2.0.0 → truecell-2.1.0}/tests/data/loaders/xenium_parquet_binary/cells.parquet +0 -0
  66. {truecell-2.0.0 → truecell-2.1.0}/tests/data/make_analysis_defaults_reference.R +0 -0
  67. {truecell-2.0.0 → truecell-2.1.0}/tests/data/make_deseq2_reference.R +0 -0
  68. {truecell-2.0.0 → truecell-2.1.0}/tests/data/make_loader_bundles.py +0 -0
  69. {truecell-2.0.0 → truecell-2.1.0}/tests/data/make_loader_r_reference.R +0 -0
  70. {truecell-2.0.0 → truecell-2.1.0}/tests/data/make_modularity_reference.R +0 -0
  71. {truecell-2.0.0 → truecell-2.1.0}/tests/data/make_negbinom_reference.R +0 -0
  72. {truecell-2.0.0 → truecell-2.1.0}/tests/data/make_segmentation_centroid_reference.R +0 -0
  73. {truecell-2.0.0 → truecell-2.1.0}/tests/data/make_select_integration_features_reference.R +0 -0
  74. {truecell-2.0.0 → truecell-2.1.0}/tests/data/negbinom_reference_counts.json +0 -0
  75. {truecell-2.0.0 → truecell-2.1.0}/tests/data/prep_sct_r_reference.json +0 -0
  76. {truecell-2.0.0 → truecell-2.1.0}/tests/data/r_analysis_defaults.json +0 -0
  77. {truecell-2.0.0 → truecell-2.1.0}/tests/data/r_deseq2_reference.json +0 -0
  78. {truecell-2.0.0 → truecell-2.1.0}/tests/data/r_modularity_reference.json +0 -0
  79. {truecell-2.0.0 → truecell-2.1.0}/tests/data/r_negbinom_reference.json +0 -0
  80. {truecell-2.0.0 → truecell-2.1.0}/tests/data/r_segmentation_centroids.json +0 -0
  81. {truecell-2.0.0 → truecell-2.1.0}/tests/data/r_select_integration_features.json +0 -0
  82. {truecell-2.0.0 → truecell-2.1.0}/tests/data/seurat_formals.json +0 -0
  83. {truecell-2.0.0 → truecell-2.1.0}/tests/test_advanced_tutorial.py +0 -0
  84. {truecell-2.0.0 → truecell-2.1.0}/tests/test_analysis.py +0 -0
  85. {truecell-2.0.0 → truecell-2.1.0}/tests/test_analysis_defaults.py +0 -0
  86. {truecell-2.0.0 → truecell-2.1.0}/tests/test_anchors_seurat_parity.py +0 -0
  87. {truecell-2.0.0 → truecell-2.1.0}/tests/test_annotations_resolve.py +0 -0
  88. {truecell-2.0.0 → truecell-2.1.0}/tests/test_api_map_signatures.py +0 -0
  89. {truecell-2.0.0 → truecell-2.1.0}/tests/test_assay.py +0 -0
  90. {truecell-2.0.0 → truecell-2.1.0}/tests/test_assay5.py +0 -0
  91. {truecell-2.0.0 → truecell-2.1.0}/tests/test_average_expression.py +0 -0
  92. {truecell-2.0.0 → truecell-2.1.0}/tests/test_bands.py +0 -0
  93. {truecell-2.0.0 → truecell-2.1.0}/tests/test_benchmark_harness.py +0 -0
  94. {truecell-2.0.0 → truecell-2.1.0}/tests/test_bimod_de.py +0 -0
  95. {truecell-2.0.0 → truecell-2.1.0}/tests/test_cellcycle_tutorial.py +0 -0
  96. {truecell-2.0.0 → truecell-2.1.0}/tests/test_command.py +0 -0
  97. {truecell-2.0.0 → truecell-2.1.0}/tests/test_datasets_loaders.py +0 -0
  98. {truecell-2.0.0 → truecell-2.1.0}/tests/test_de_bands.py +0 -0
  99. {truecell-2.0.0 → truecell-2.1.0}/tests/test_de_parity.py +0 -0
  100. {truecell-2.0.0 → truecell-2.1.0}/tests/test_dead_args.py +0 -0
  101. {truecell-2.0.0 → truecell-2.1.0}/tests/test_default_parity.py +0 -0
  102. {truecell-2.0.0 → truecell-2.1.0}/tests/test_deseq2_pseudobulk.py +0 -0
  103. {truecell-2.0.0 → truecell-2.1.0}/tests/test_diet.py +0 -0
  104. {truecell-2.0.0 → truecell-2.1.0}/tests/test_dim_plot_labels.py +0 -0
  105. {truecell-2.0.0 → truecell-2.1.0}/tests/test_dimreduc.py +0 -0
  106. {truecell-2.0.0 → truecell-2.1.0}/tests/test_dimreduc_tutorial.py +0 -0
  107. {truecell-2.0.0 → truecell-2.1.0}/tests/test_docs_snippet.py +0 -0
  108. {truecell-2.0.0 → truecell-2.1.0}/tests/test_find_clusters_resolutions.py +0 -0
  109. {truecell-2.0.0 → truecell-2.1.0}/tests/test_find_neighbors_return_neighbor.py +0 -0
  110. {truecell-2.0.0 → truecell-2.1.0}/tests/test_graph.py +0 -0
  111. {truecell-2.0.0 → truecell-2.1.0}/tests/test_hashing_tutorial.py +0 -0
  112. {truecell-2.0.0 → truecell-2.1.0}/tests/test_hto.py +0 -0
  113. {truecell-2.0.0 → truecell-2.1.0}/tests/test_hvf_column_names.py +0 -0
  114. {truecell-2.0.0 → truecell-2.1.0}/tests/test_integration.py +0 -0
  115. {truecell-2.0.0 → truecell-2.1.0}/tests/test_integration_scoreboard.py +0 -0
  116. {truecell-2.0.0 → truecell-2.1.0}/tests/test_integration_tutorial.py +0 -0
  117. {truecell-2.0.0 → truecell-2.1.0}/tests/test_layout_helper.py +0 -0
  118. {truecell-2.0.0 → truecell-2.1.0}/tests/test_lazy.py +0 -0
  119. {truecell-2.0.0 → truecell-2.1.0}/tests/test_lazy_bpcells_parity.py +0 -0
  120. {truecell-2.0.0 → truecell-2.1.0}/tests/test_lazy_pipeline.py +0 -0
  121. {truecell-2.0.0 → truecell-2.1.0}/tests/test_legend_and_label_layout.py +0 -0
  122. {truecell-2.0.0 → truecell-2.1.0}/tests/test_loaders_vs_seurat.py +0 -0
  123. {truecell-2.0.0 → truecell-2.1.0}/tests/test_logmap.py +0 -0
  124. {truecell-2.0.0 → truecell-2.1.0}/tests/test_mapping.py +0 -0
  125. {truecell-2.0.0 → truecell-2.1.0}/tests/test_marker_ordering.py +0 -0
  126. {truecell-2.0.0 → truecell-2.1.0}/tests/test_markers_prefilter.py +0 -0
  127. {truecell-2.0.0 → truecell-2.1.0}/tests/test_markvariogram.py +0 -0
  128. {truecell-2.0.0 → truecell-2.1.0}/tests/test_mast_de.py +0 -0
  129. {truecell-2.0.0 → truecell-2.1.0}/tests/test_merscope_loader.py +0 -0
  130. {truecell-2.0.0 → truecell-2.1.0}/tests/test_mixscape.py +0 -0
  131. {truecell-2.0.0 → truecell-2.1.0}/tests/test_mixscape_tutorial.py +0 -0
  132. {truecell-2.0.0 → truecell-2.1.0}/tests/test_modularity_seurat_parity.py +0 -0
  133. {truecell-2.0.0 → truecell-2.1.0}/tests/test_module_score_performance.py +0 -0
  134. {truecell-2.0.0 → truecell-2.1.0}/tests/test_multimodal_wnn.py +0 -0
  135. {truecell-2.0.0 → truecell-2.1.0}/tests/test_multiseq.py +0 -0
  136. {truecell-2.0.0 → truecell-2.1.0}/tests/test_mvp_dispersion.py +0 -0
  137. {truecell-2.0.0 → truecell-2.1.0}/tests/test_negbinom_glm_nb_parity.py +0 -0
  138. {truecell-2.0.0 → truecell-2.1.0}/tests/test_neighbor.py +0 -0
  139. {truecell-2.0.0 → truecell-2.1.0}/tests/test_neighbors_graph_parity.py +0 -0
  140. {truecell-2.0.0 → truecell-2.1.0}/tests/test_new_features.py +0 -0
  141. {truecell-2.0.0 → truecell-2.1.0}/tests/test_object_model_typing.py +0 -0
  142. {truecell-2.0.0 → truecell-2.1.0}/tests/test_objects_tutorial.py +0 -0
  143. {truecell-2.0.0 → truecell-2.1.0}/tests/test_packaging.py +0 -0
  144. {truecell-2.0.0 → truecell-2.1.0}/tests/test_pbmc_handoff.py +0 -0
  145. {truecell-2.0.0 → truecell-2.1.0}/tests/test_pca_solver_parity.py +0 -0
  146. {truecell-2.0.0 → truecell-2.1.0}/tests/test_plotting_split.py +0 -0
  147. {truecell-2.0.0 → truecell-2.1.0}/tests/test_plotting_violin.py +0 -0
  148. {truecell-2.0.0 → truecell-2.1.0}/tests/test_prep_sct.py +0 -0
  149. {truecell-2.0.0 → truecell-2.1.0}/tests/test_pseudobulk_conserved.py +0 -0
  150. {truecell-2.0.0 → truecell-2.1.0}/tests/test_pseudobulk_vs_r.py +0 -0
  151. {truecell-2.0.0 → truecell-2.1.0}/tests/test_reduction_feature_selection.py +0 -0
  152. {truecell-2.0.0 → truecell-2.1.0}/tests/test_reductions_extra.py +0 -0
  153. {truecell-2.0.0 → truecell-2.1.0}/tests/test_refmap_tutorial.py +0 -0
  154. {truecell-2.0.0 → truecell-2.1.0}/tests/test_sctransform_r_fidelity.py +0 -0
  155. {truecell-2.0.0 → truecell-2.1.0}/tests/test_select_integration_features.py +0 -0
  156. {truecell-2.0.0 → truecell-2.1.0}/tests/test_seurat.py +0 -0
  157. {truecell-2.0.0 → truecell-2.1.0}/tests/test_show_versions.py +0 -0
  158. {truecell-2.0.0 → truecell-2.1.0}/tests/test_sketch.py +0 -0
  159. {truecell-2.0.0 → truecell-2.1.0}/tests/test_sketch_tutorial.py +0 -0
  160. {truecell-2.0.0 → truecell-2.1.0}/tests/test_spatial.py +0 -0
  161. {truecell-2.0.0 → truecell-2.1.0}/tests/test_spatial_analysis.py +0 -0
  162. {truecell-2.0.0 → truecell-2.1.0}/tests/test_spatial_parity.py +0 -0
  163. {truecell-2.0.0 → truecell-2.1.0}/tests/test_spatial_plots.py +0 -0
  164. {truecell-2.0.0 → truecell-2.1.0}/tests/test_spatially_variable_features.py +0 -0
  165. {truecell-2.0.0 → truecell-2.1.0}/tests/test_spca_glmpca.py +0 -0
  166. {truecell-2.0.0 → truecell-2.1.0}/tests/test_subset_order.py +0 -0
  167. {truecell-2.0.0 → truecell-2.1.0}/tests/test_svf_tutorial.py +0 -0
  168. {truecell-2.0.0 → truecell-2.1.0}/tests/test_transfer.py +0 -0
  169. {truecell-2.0.0 → truecell-2.1.0}/tests/test_tutorial_bootstrap.py +0 -0
  170. {truecell-2.0.0 → truecell-2.1.0}/tests/test_tutorial_csv_precision.py +0 -0
  171. {truecell-2.0.0 → truecell-2.1.0}/tests/test_tutorial_marker_tables.py +0 -0
  172. {truecell-2.0.0 → truecell-2.1.0}/tests/test_tutorial_r_portability.py +0 -0
  173. {truecell-2.0.0 → truecell-2.1.0}/tests/test_typing_behaviour.py +0 -0
  174. {truecell-2.0.0 → truecell-2.1.0}/tests/test_visium_image.py +0 -0
  175. {truecell-2.0.0 → truecell-2.1.0}/tests/test_visium_seurat_parity.py +0 -0
  176. {truecell-2.0.0 → truecell-2.1.0}/truecell/__init__.py +0 -0
  177. {truecell-2.0.0 → truecell-2.1.0}/truecell/_clara.py +0 -0
  178. {truecell-2.0.0 → truecell-2.1.0}/truecell/_glm_nb.py +0 -0
  179. {truecell-2.0.0 → truecell-2.1.0}/truecell/_modularity.py +0 -0
  180. {truecell-2.0.0 → truecell-2.1.0}/truecell/_repel.py +0 -0
  181. {truecell-2.0.0 → truecell-2.1.0}/truecell/_sparse.py +0 -0
  182. {truecell-2.0.0 → truecell-2.1.0}/truecell/_types.py +0 -0
  183. {truecell-2.0.0 → truecell-2.1.0}/truecell/_utils.py +0 -0
  184. {truecell-2.0.0 → truecell-2.1.0}/truecell/aggregate.py +0 -0
  185. {truecell-2.0.0 → truecell-2.1.0}/truecell/anchors.py +0 -0
  186. {truecell-2.0.0 → truecell-2.1.0}/truecell/assay.py +0 -0
  187. {truecell-2.0.0 → truecell-2.1.0}/truecell/assay5.py +0 -0
  188. {truecell-2.0.0 → truecell-2.1.0}/truecell/clustering.py +0 -0
  189. {truecell-2.0.0 → truecell-2.1.0}/truecell/command.py +0 -0
  190. {truecell-2.0.0 → truecell-2.1.0}/truecell/compat/__init__.py +0 -0
  191. {truecell-2.0.0 → truecell-2.1.0}/truecell/datasets.py +0 -0
  192. {truecell-2.0.0 → truecell-2.1.0}/truecell/diet.py +0 -0
  193. {truecell-2.0.0 → truecell-2.1.0}/truecell/dimreduc.py +0 -0
  194. {truecell-2.0.0 → truecell-2.1.0}/truecell/glmpca.py +0 -0
  195. {truecell-2.0.0 → truecell-2.1.0}/truecell/graph.py +0 -0
  196. {truecell-2.0.0 → truecell-2.1.0}/truecell/hto.py +0 -0
  197. {truecell-2.0.0 → truecell-2.1.0}/truecell/integration.py +0 -0
  198. {truecell-2.0.0 → truecell-2.1.0}/truecell/io.py +0 -0
  199. {truecell-2.0.0 → truecell-2.1.0}/truecell/jackstraw.py +0 -0
  200. {truecell-2.0.0 → truecell-2.1.0}/truecell/lazy.py +0 -0
  201. {truecell-2.0.0 → truecell-2.1.0}/truecell/logmap.py +0 -0
  202. {truecell-2.0.0 → truecell-2.1.0}/truecell/mapping.py +0 -0
  203. {truecell-2.0.0 → truecell-2.1.0}/truecell/markers.py +0 -0
  204. {truecell-2.0.0 → truecell-2.1.0}/truecell/mixins/__init__.py +0 -0
  205. {truecell-2.0.0 → truecell-2.1.0}/truecell/mixins/key_mixin.py +0 -0
  206. {truecell-2.0.0 → truecell-2.1.0}/truecell/mixscape.py +0 -0
  207. {truecell-2.0.0 → truecell-2.1.0}/truecell/multimodal.py +0 -0
  208. {truecell-2.0.0 → truecell-2.1.0}/truecell/multiseq.py +0 -0
  209. {truecell-2.0.0 → truecell-2.1.0}/truecell/neighbor.py +0 -0
  210. {truecell-2.0.0 → truecell-2.1.0}/truecell/neighbors.py +0 -0
  211. {truecell-2.0.0 → truecell-2.1.0}/truecell/preprocessing.py +0 -0
  212. {truecell-2.0.0 → truecell-2.1.0}/truecell/py.typed +0 -0
  213. {truecell-2.0.0 → truecell-2.1.0}/truecell/reduction.py +0 -0
  214. {truecell-2.0.0 → truecell-2.1.0}/truecell/sctransform.py +0 -0
  215. {truecell-2.0.0 → truecell-2.1.0}/truecell/sketch.py +0 -0
  216. {truecell-2.0.0 → truecell-2.1.0}/truecell/spatial/__init__.py +0 -0
  217. {truecell-2.0.0 → truecell-2.1.0}/truecell/spatial/analysis.py +0 -0
  218. {truecell-2.0.0 → truecell-2.1.0}/truecell/spatial/base.py +0 -0
  219. {truecell-2.0.0 → truecell-2.1.0}/truecell/spatial/centroids.py +0 -0
  220. {truecell-2.0.0 → truecell-2.1.0}/truecell/spatial/fov.py +0 -0
  221. {truecell-2.0.0 → truecell-2.1.0}/truecell/spatial/loaders.py +0 -0
  222. {truecell-2.0.0 → truecell-2.1.0}/truecell/spatial/molecules.py +0 -0
  223. {truecell-2.0.0 → truecell-2.1.0}/truecell/spatial/segmentation.py +0 -0
  224. {truecell-2.0.0 → truecell-2.1.0}/truecell/spatial/variable_features.py +0 -0
  225. {truecell-2.0.0 → truecell-2.1.0}/truecell/spatial/visium.py +0 -0
  226. {truecell-2.0.0 → truecell-2.1.0}/truecell/transfer.py +0 -0
  227. {truecell-2.0.0 → truecell-2.1.0}/truecell/truecell.py +0 -0
  228. {truecell-2.0.0 → truecell-2.1.0}/truecell/umap.py +0 -0
@@ -284,7 +284,7 @@ build_niche_assay(seurat, group_by, image=None, k=20, niches=4, assay_name="nich
284
284
  find_spatially_variable_features(seurat, features=None, method="moransi", k=10,
285
285
  weights="inverse_square", assay=None, layer="scale.data",
286
286
  image=None, r_metric=5.0, bandwidth=1.0) -> pd.DataFrame
287
- composition_test(seurat, group_by, split_by, reference=None) -> pd.DataFrame
287
+ composition_test(seurat, group_by, split_by, reference=None, sample_col=None) -> pd.DataFrame
288
288
  ```
289
289
 
290
290
  The loaders' `fov` names the one image they build, as Seurat's `fov` argument does
@@ -337,15 +337,22 @@ BLAS runtimes loaded. Its numba checks run in child processes.
337
337
  `reorder_ident` · `which_cells` · `fetch_data` · `layer_data` · `set_layer_data` ·
338
338
  `layers` · `split_layers` · `join_layers` · `get_assay_data` · `set_assay_data` ·
339
339
  `embeddings` · `loadings` · `set_loadings` · `stdev` · `variable_features` ·
340
- `set_variable_features` · `hvf_info` · `default_assay` · `set_default_assay` ·
341
- `set_default_layer` · `key` · `set_key` · `keys` · `assay_names` · `assay_class` ·
342
- `cast_assay` · `add_meta_data` · `rename_cells` · `match_cells` · `calc_n` ·
340
+ `set_variable_features` · `default_assay` · `set_default_assay` ·
341
+ `set_default_layer` · `key` · `set_key` · `assay_names` ·
342
+ `cast_assay` · `add_meta_data` · `rename_cells` · `calc_n` ·
343
343
  `command` · `misc` / `set_misc` · `tool` / `set_tool` · `version` · `as_sparse` ·
344
- `as_graph` · `as_neighbor` · `as_seurat` · `check_matrix` · `is_matrix_empty` ·
344
+ `as_graph` · `as_neighbor` · `is_matrix_empty` ·
345
345
  `simplify` · `distances` · `indices` ·
346
346
  spatial: `boundaries` · `crop` · `overlay` · `radius` · `theta` · `get_image` ·
347
- `get_molecules` · `get_tissue_coordinates` · `default_boundary` · `default_fov` ·
348
- `is_global` · `as_centroids` · `as_segmentation` · `create_fov` · `create_centroids` ·
349
- `create_segmentation`
347
+ `get_molecules` · `get_tissue_coordinates` · `default_boundary` ·
348
+ `is_global` · `as_centroids`
349
+
350
+ Each one is the object's own method, property or log reached by its R name, so
351
+ `g.set_ident(obj, cells, "x")` and `obj.set_ident(cells, "x")` are the same call.
352
+ What R has and the port does not is not stubbed here. The constructors
353
+ (`CreateSeuratObject`, `CreateFOV`, …) are the top-level `create_*` functions, which
354
+ take their input by keyword; `HVFInfo()` is the per-feature columns of
355
+ `assay.meta_data`; `Keys()`, `DefaultFOV()`, `DefaultDimReduc()`, `as.Seurat()` and
356
+ the S4 conversions have no counterpart.
350
357
 
351
358
  See [`object-model.md`](object-model.md) for what each dispatches on.
@@ -18,6 +18,243 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
18
18
 
19
19
  ## [Unreleased]
20
20
 
21
+ ## [2.1.0] - 2026-12-05
22
+
23
+ Six defects found by running the package on a real 46,700-cell colon dataset
24
+ (#140–#145), and an install that holds still. Nothing here changes a result that
25
+ was correct before: each fix touches only the call it names. The one removal is of
26
+ sixteen `truecell.generics` names that raised for every object.
27
+
28
+ ### Added
29
+
30
+ - **R's labelled PBMC 3k UMAP, `r_11_umap_labeled.png`.** `pbmc3k_verify.R` drew no
31
+ UMAP, so there was no R panel from the same run to set beside Truecell's
32
+ `11_umap_labeled.png`. It now draws one, for the Frontiers paper's Figure 3A/B.
33
+ It uses the same title and size, and the cell types in Truecell's order,
34
+ radix-sorted so the locale cannot reorder them: under `en_US.UTF-8`, R's default
35
+ sort puts "Naive CD4 T" before "NK", which would have swapped two colours. The
36
+ tutorial page keeps the published vignette's image on R's side, and the PBMC 3k
37
+ comparison's numbers do not change.
38
+
39
+ - **`composition_test(sample_col=)` tests per-sample proportions (#144).** The Fisher
40
+ test counts every cell as a replicate, so with thousands of cells nearly every
41
+ difference is significant, including one that is only donor-to-donor variation. In a
42
+ simulation with no condition effect (12 donors, 6 against 6, each with its own
43
+ cell-type proportions) at least one cell type came out BH-significant in 35 of 40
44
+ runs. The unit that replicates is the donor.
45
+ - `sample_col` names the sample each cell came from. Each group's proportion in each
46
+ sample is compared between the two levels with a two-sided Mann-Whitney test, BH
47
+ adjusted across groups, as before. In the same simulation it reports a significant
48
+ type in 1 of 40 runs, and it still finds a type that is three times as common in
49
+ one condition in 10 of 10.
50
+ - `prop_<level>` is then the mean of the per-sample proportions. `odds_ratio` and
51
+ `chisq_p` are cell-level quantities and are not reported, and `df.attrs` carries
52
+ `method`, `sample_col` and `n_samples`.
53
+ - A sample in both levels is an error, and so is a level none of whose cells has a
54
+ sample. A cell with no sample is left out. A design too small to reach significance,
55
+ such as three samples against three, whose smallest possible p is 0.1, warns.
56
+ - Without `sample_col` nothing changes except the docstring, which now says what the
57
+ p-values assume, and `df.attrs['method']`.
58
+
59
+ - **`constraints.txt`: the exact versions a release was tested with, for pip.** The
60
+ package keeps `>=` minimums, as the scientific Python libraries do, so a fresh
61
+ install takes the newest numpy or pandas the day it ships. For an install that does
62
+ not change, pass a release's file:
63
+ `pip install "truecell[analysis]==X.Y.Z" -c https://raw.githubusercontent.com/GenomicAI/truecell/vX.Y.Z/constraints.txt`.
64
+ It is `uv.lock` exported for the runtime extras. `tests/test_constraints.py` keeps it
65
+ in step with the lock, and CI's wheel job installs with it, so the file users get
66
+ is the file CI tests. Plain pip in a clean venv installs exactly the locked versions.
67
+ Releases from 2.1.0 on carry one; 2.0.0 has none.
68
+
69
+ - **A CI job on the oldest versions the minimums allow.** "Lowest supported versions
70
+ (3.12)" installs the oldest wheel of each runtime dependency that `pyproject.toml`
71
+ permits and runs the suite, so the minimums are tested rather than assumed.
72
+
73
+ ### Changed
74
+
75
+ - **The minimum versions are now ones that install and work.** Several were older
76
+ than any release with Python 3.12 wheels, so no one could get them, and one that
77
+ could be installed, statsmodels 0.14.0, crashes on numpy 2. They are now the oldest
78
+ versions that install from wheels on 3.12 and pass the suite: numpy 2.0, scipy 1.13,
79
+ pandas 2.2.2, statsmodels 0.14.2, scikit-learn 1.4.2, numba 0.60, umap-learn 0.5.6,
80
+ python-igraph 0.11.2, leidenalg 0.10.2, matplotlib 3.9, scikit-misc 0.3.1 and anndata
81
+ 0.11. No locked version changed.
82
+
83
+ ### Removed
84
+
85
+ - **Sixteen names from `truecell.generics`, none of which ever did anything (#142).**
86
+ Each was declared with only the `NotImplementedError` fallback, so each raised for
87
+ every type of object and no working code changes.
88
+ - R's constructors `create_truecell_object`, `create_assay_object`, `create_fov`,
89
+ `create_centroids` and `create_segmentation`. The top-level functions of the same
90
+ names are the constructors. They take their input by keyword, which a dispatcher
91
+ on the first positional argument cannot.
92
+ - Nothing in the port is behind `as_segmentation`, `as_seurat`, `assay_class`,
93
+ `default_dim_reduc`, `default_fov`, `hvf_info`, `keys`, `list_to_s4` and
94
+ `s4_to_list`. The last two are R's S4 plumbing, and `HVFInfo()`'s table is the
95
+ per-feature columns of `assay.meta_data`.
96
+ - `check_matrix` and `match_cells` had only internal helpers behind the same names,
97
+ and those do something other than R's `CheckMatrix` and `MatchCells`.
98
+ - `docs/api/index.md` and `tests/test_docs.py` count the generics that are
99
+ module-only: 65 became 54.
100
+
101
+ ### Fixed
102
+
103
+ - **DESeq2's MAP dispersions no longer depend on the machine.** When L-BFGS-B fails on
104
+ a gene, pydeseq2 falls back to a grid search but leaves the prior out, so the gene
105
+ keeps its unshrunk gene-wise dispersion. DESeq2's fallback keeps the prior. Whether
106
+ L-BFGS-B fails depends on floating point: on some x86 CI runners it failed for one
107
+ gene of the DESeq2 reference fixture, whose MAP dispersion stayed at 0.0882 where
108
+ DESeq2 gives 0.0818. That was the 0.0752 log difference the scheduled job reported,
109
+ identical to 16 digits on every failing Monday. Genes whose MAP fit did not converge
110
+ are now refitted with pydeseq2's own grid and the prior. Where every fit converges
111
+ nothing changes: on this Mac, none of the 13,277 genes in the DE tutorial's DESeq2
112
+ call needed it.
113
+
114
+ - **`show_versions(as_dict=True)` is plain JSON on scipy 1.13.** Once anything had read
115
+ a Matrix Market file, scipy 1.13 reported its reader's version to threadpoolctl as a
116
+ function, which the report copied.
117
+
118
+ - **The tests the scheduled fresh-dependency job failed are fixed.** Besides the DESeq2
119
+ fit above, four anndata tests turned every warning into an error, and from pandas 3.1
120
+ anndata 0.13.4 raised a deprecation warning inside itself. They now fail on any
121
+ warning truecell raises and let through what anndata raises internally. Two ridge-plot
122
+ layout tests relied on 8 x 5 inches being only just too small, which on matplotlib
123
+ before 3.11.1 it was not; they use 6 x 3 and read truecell's own warning. On failure
124
+ the DESeq2 test now reports each fitting step against R and the machine, and the
125
+ scheduled job prints the CPU.
126
+
127
+ - **`as_anndata` no longer fails on an object from the standard workflow (#141).**
128
+ `scale_data()` scales only the variable features unless it is given others, so
129
+ `scale.data` has one row per variable feature, and AnnData rejects a layer that is
130
+ not as wide as `var`. `as_anndata` raised a `ValueError` from inside AnnData on any
131
+ object that had been through `normalize_data`, `find_variable_features` and
132
+ `scale_data`, in either assay class.
133
+ - A layer with fewer features than the assay is now left out, with a warning that
134
+ names it and says how to keep it: `scale_data(obj, features=obj.feature_names())`
135
+ before converting, which scales every feature and exports the layer as before.
136
+ - It is left out rather than padded because `from_anndata` turns every layer back
137
+ into an assay layer, and padded rows would read back as scaled values that never
138
+ were.
139
+ - No test had converted an object that had been scaled. `tests/test_anndata_compat.py`
140
+ now does, for both assay classes, and `docs/interop.md` says what is left out.
141
+
142
+ - **The CITE-seq tutorial's ADT-weight violins read as one comparison.** Reviewer 2
143
+ of the Frontiers paper found R's and Truecell's panels of figure 10 in different
144
+ orders and colours, which defeats a side-by-side. Both scripts now draw the cell
145
+ types in one order, `vln_plot`'s, and colour each from Seurat's `hue_pal` over
146
+ all twelve labels `annotate_cells` can return. The DC / Mono cluster that only R's
147
+ clustering finds therefore moves no other colour. Neither draws points, the R
148
+ script adds the median bar `vln_plot` draws, and the titles and y-axis labels
149
+ match. The CITE-seq comparison's numbers do not change.
150
+ - R also writes `r_10_adt_weight_by_celltype_manuscript.png`, laid out 3.30 in
151
+ wide as the paper prints it, with its type at the sizes Truecell's panel prints
152
+ at. With Seurat's defaults at that width the y-axis labels overprinted.
153
+ - `tests/test_multimodal_tutorial.py` keeps the two scripts' label lists equal,
154
+ and the smoke suite checks the figure's layout at the width the paper uses.
155
+
156
+ - **Plots follow a categorical column's order, so a lineage-ordered `dot_plot` is
157
+ possible, and `reorder_ident` has an effect (#143).** In Seurat the order of a
158
+ factor's levels decides the order of the groups in `DotPlot` and `VlnPlot`.
159
+ `dot_plot`, `vln_plot`, `dim_plot`, `feature_scatter`, `do_heatmap` and
160
+ `ridge_plot` sorted the groups themselves, whatever the categories said, so after
161
+ `obj.reorder_ident("score")` they still drew Alpha, Mu, Zeta.
162
+ - A categorical column, or the active identity, is drawn in its category order. The
163
+ colours follow, as `hue_pal` is assigned in that order in R.
164
+ - Categories nobody chose are not an order, so they are not followed.
165
+ `pd.Categorical(values)` and `rename_idents` leave the string-sorted categories
166
+ "1", "10", "2", and those still sort numbers first, then names, as before.
167
+ - Categories with no cells are not drawn, and a missing value is still last.
168
+ - Nothing changes for an existing workflow: `find_clusters` already orders its
169
+ categories numbers then names, and no tutorial sets a category order.
170
+ - `image_dim_plot` and `spatial_dim_plot` still sort alphabetically, which
171
+ `ROADMAP.md` now lists.
172
+
173
+ - **`dim_heatmap`, the plots that take `layer=`, and `add_module_score` read the wrong
174
+ rows of `scale.data` (#140).** `scale_data()` scales only the variable features
175
+ unless it is given others, so row *i* of `scale.data` is not feature *i* of the
176
+ assay. `dim_heatmap` and the helper behind `dot_plot`, `feature_plot`,
177
+ `feature_scatter`, `ridge_plot`, `vln_plot`, `image_feature_plot` and
178
+ `spatial_feature_plot` still found a gene by its place in the assay's full list.
179
+ That raised `IndexError` when the place fell past the last scaled row, and drew
180
+ another gene's row under the right label when it did not.
181
+ - `dim_heatmap` on the standard workflow raised, or drew rows that were none of the
182
+ genes it labelled. `feature_scatter(layer="scale.data")` plotted two other genes.
183
+ - `add_module_score(layer="scale.data")` had the same lookup, found while checking
184
+ the other users of `layer=`. It raised `IndexError` on the standard workflow.
185
+ - A gene that is in the assay but not in the layer now raises a `KeyError` that
186
+ names the layer and how many of the assay's features it holds, instead of
187
+ "not found in assay".
188
+ - Nothing changes for a full-width layer such as `data`. The plotting tests all
189
+ scaled every feature, which is why none of them saw this;
190
+ `tests/test_layer_feature_alignment.py` uses the standard workflow and checks
191
+ that its own fixture can tell the two lookups apart.
192
+
193
+ - **`feature_plot`'s quantile cutoffs are Seurat's, so `min_cutoff="q05", max_cutoff="q95"`
194
+ works for a sparse gene (#145).** That call, the one the skills recommend for a
195
+ washed-out scale, collapsed the colour bar of a gene detected in under 5% of cells to
196
+ (0, 1e-9): every expressing cell the same colour, and no sign anything was wrong. The
197
+ committed SCTransform tutorial figure showed it, on `XCL1`.
198
+ - Seurat's `SetQuantile` takes the percentile over the cells that express the feature,
199
+ the values above zero. `feature_plot` took it over every cell, so a sparse gene's 5th
200
+ and 95th percentiles were both 0. The values are pinned to `Seurat:::SetQuantile` on
201
+ Seurat 5.5.1 in `tests/test_feature_plot_cutoffs.py`, negatives and all-zero
202
+ features included.
203
+ - Only the strings `"q05"` and `"q95"` were recognised, and `"q99"` raised a
204
+ `TypeError` from comparing a string with a float. Any `q` and one or two digits
205
+ works now, as in Seurat, and anything else is a `ValueError` that says what is
206
+ allowed.
207
+ - Cutoffs that still leave the scale no range, whether equal, inverted, or because
208
+ every expresser has the same value, now warn and draw the feature over its own
209
+ range, instead of one colour.
210
+ - `tutorials/figures_sctransform/03_sct_featureplots_1.png` and
211
+ `04_sct_featureplots_2.png` are redrawn. The other four figures from the same
212
+ script are identical to the pixel. The CITE-seq ADT panel does not change: every
213
+ cell has a positive CLR value there, so the cells that express a protein are all
214
+ of them, and R's panel already used these quantiles.
215
+
216
+ - **The generics the docs list now work (#142).** `truecell.generics` declared 72
217
+ functions and 39 had only the fallback, so they raised `NotImplementedError` for every
218
+ object. `skills/truecell/reference/api-map.md` listed many as the way to do things,
219
+ and `docs/api/generics.md` says each is the same code path as the object's own
220
+ method.
221
+ - Twenty-three now delegate to what already existed: `assay_names`, `calc_n`,
222
+ `cast_assay`, `reorder_ident`, `set_ident`, `tool`, `set_tool`, `version`,
223
+ `set_layer_data`, `set_assay_data`, `set_loadings`, `set_default_assay`,
224
+ `set_default_layer`, `set_variable_features`, `set_key`, `misc`, `set_misc`, and
225
+ the spatial `as_centroids`, `crop`, `overlay`, `default_boundary`, `get_molecules`,
226
+ plus `command`. Arguments are handed through untouched, so a method's signature
227
+ has no second copy to drift.
228
+ - `command` reads the command log as R's `Command()` does: no argument gives the
229
+ names of the commands that have run, a name gives that entry, and a second
230
+ argument gives one of its parameters. An unknown command or parameter is an error,
231
+ as in R, and a command run twice appears once, holding its latest run, as in
232
+ R's named list.
233
+ - `tests/test_generics.py` fails on a generic with no implementation, and on a
234
+ mismatch in either direction between the module and the api-map's list.
235
+
236
+ ### Documentation
237
+
238
+ - **The guided-tour notebook is refreshed against the published 2.0.0.**
239
+ `tutorials/truecell_guided_tour.ipynb` is the notebook Colab opens, and Colab installs
240
+ the latest release, so its committed outputs now come from the package a reader
241
+ actually gets. The notebook is not part of the wheel. The ARI quoted in a comment in
242
+ `pbmc3k_tutorial.py` is corrected to the measured 0.928.
243
+
244
+ - **The README's roadmap and `ROADMAP.md` describe 2.0.0.** Both still read as of
245
+ 0.9.0.
246
+ - The README adds a row for each release since.
247
+ - `ROADMAP.md` marks the lockfile decision made in 1.1.0 and gives the current
248
+ `mypy` count.
249
+ - It records that Seurat has since fixed the Visium `Radius()` `NULL` upstream,
250
+ and that Seurat keeps the spot diameter in its radius slot on purpose.
251
+ - It ends with the items still open after 2.0.0.
252
+
253
+ - **The README links the project video.** A clickable thumbnail under the introduction
254
+ opens "Can an AI agent run your single-cell analysis? Truecell, Seurat in Python" on the
255
+ Genomic AI YouTube channel. The README is the PyPI description, so the PyPI page shows it
256
+ from the next release.
257
+
21
258
  ## [2.0.0] - 2026-09-18
22
259
 
23
260
  The release the Frontiers revision asked for. Re-running the paper against 1.2.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: truecell
3
- Version: 2.0.0
3
+ Version: 2.1.0
4
4
  Summary: Python single-cell genomics toolkit — a port of Seurat's core data structures and analysis pipeline
5
5
  Project-URL: Homepage, https://github.com/GenomicAI/truecell
6
6
  Project-URL: Repository, https://github.com/GenomicAI/truecell
@@ -17,45 +17,45 @@ Classifier: Programming Language :: Python :: 3.12
17
17
  Classifier: Programming Language :: Python :: 3.13
18
18
  Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
19
19
  Requires-Python: >=3.12
20
- Requires-Dist: numpy>=1.24
20
+ Requires-Dist: numpy>=2.0
21
21
  Requires-Dist: packaging>=23.0
22
- Requires-Dist: pandas>=2.0
23
- Requires-Dist: scipy>=1.10
22
+ Requires-Dist: pandas>=2.2.2
23
+ Requires-Dist: scipy>=1.13
24
24
  Provides-Extra: all
25
- Requires-Dist: anndata>=0.10; extra == 'all'
25
+ Requires-Dist: anndata>=0.11; extra == 'all'
26
26
  Requires-Dist: build; extra == 'all'
27
27
  Requires-Dist: harmonypy>=0.0.9; extra == 'all'
28
- Requires-Dist: leidenalg>=0.10; extra == 'all'
29
- Requires-Dist: matplotlib>=3.7; extra == 'all'
28
+ Requires-Dist: leidenalg>=0.10.2; extra == 'all'
29
+ Requires-Dist: matplotlib>=3.9; extra == 'all'
30
30
  Requires-Dist: mkdocs-material>=9.5; extra == 'all'
31
31
  Requires-Dist: mkdocs>=1.6; extra == 'all'
32
32
  Requires-Dist: mkdocstrings[python]>=0.26; extra == 'all'
33
33
  Requires-Dist: mypy; extra == 'all'
34
- Requires-Dist: numba>=0.59; extra == 'all'
34
+ Requires-Dist: numba>=0.60; extra == 'all'
35
35
  Requires-Dist: pyarrow>=16; extra == 'all'
36
36
  Requires-Dist: pydeseq2<0.6,>=0.5.4; extra == 'all'
37
37
  Requires-Dist: pytest-cov; extra == 'all'
38
38
  Requires-Dist: pytest>=7; extra == 'all'
39
- Requires-Dist: python-igraph>=0.11; extra == 'all'
39
+ Requires-Dist: python-igraph>=0.11.2; extra == 'all'
40
40
  Requires-Dist: ruff; extra == 'all'
41
- Requires-Dist: scikit-learn>=1.3; extra == 'all'
42
- Requires-Dist: scikit-misc>=0.3; extra == 'all'
41
+ Requires-Dist: scikit-learn>=1.4.2; extra == 'all'
42
+ Requires-Dist: scikit-misc>=0.3.1; extra == 'all'
43
43
  Requires-Dist: seaborn>=0.12; extra == 'all'
44
- Requires-Dist: statsmodels>=0.14; extra == 'all'
44
+ Requires-Dist: statsmodels>=0.14.2; extra == 'all'
45
45
  Requires-Dist: twine; extra == 'all'
46
- Requires-Dist: umap-learn>=0.5; extra == 'all'
46
+ Requires-Dist: umap-learn>=0.5.6; extra == 'all'
47
47
  Provides-Extra: analysis
48
- Requires-Dist: leidenalg>=0.10; extra == 'analysis'
49
- Requires-Dist: matplotlib>=3.7; extra == 'analysis'
50
- Requires-Dist: numba>=0.59; extra == 'analysis'
51
- Requires-Dist: python-igraph>=0.11; extra == 'analysis'
52
- Requires-Dist: scikit-learn>=1.3; extra == 'analysis'
53
- Requires-Dist: scikit-misc>=0.3; extra == 'analysis'
48
+ Requires-Dist: leidenalg>=0.10.2; extra == 'analysis'
49
+ Requires-Dist: matplotlib>=3.9; extra == 'analysis'
50
+ Requires-Dist: numba>=0.60; extra == 'analysis'
51
+ Requires-Dist: python-igraph>=0.11.2; extra == 'analysis'
52
+ Requires-Dist: scikit-learn>=1.4.2; extra == 'analysis'
53
+ Requires-Dist: scikit-misc>=0.3.1; extra == 'analysis'
54
54
  Requires-Dist: seaborn>=0.12; extra == 'analysis'
55
- Requires-Dist: statsmodels>=0.14; extra == 'analysis'
56
- Requires-Dist: umap-learn>=0.5; extra == 'analysis'
55
+ Requires-Dist: statsmodels>=0.14.2; extra == 'analysis'
56
+ Requires-Dist: umap-learn>=0.5.6; extra == 'analysis'
57
57
  Provides-Extra: anndata
58
- Requires-Dist: anndata>=0.10; extra == 'anndata'
58
+ Requires-Dist: anndata>=0.11; extra == 'anndata'
59
59
  Provides-Extra: deseq2
60
60
  Requires-Dist: pydeseq2<0.6,>=0.5.4; extra == 'deseq2'
61
61
  Provides-Extra: dev
@@ -107,6 +107,18 @@ dimensionality reduction, clustering, and marker detection — entirely in Pytho
107
107
  > pure-Python, pip-installable alternative that integrates naturally with NumPy, SciPy,
108
108
  > and AnnData ecosystems.
109
109
 
110
+ <p align="center">
111
+ <a href="https://www.youtube.com/watch?v=WI945GTG0CY">
112
+ <img src="https://img.youtube.com/vi/WI945GTG0CY/maxresdefault.jpg"
113
+ alt="Watch the video: Can an AI agent run your single-cell analysis? Truecell, Seurat in Python"
114
+ width="560">
115
+ </a>
116
+ <br>
117
+ 🎬 <a href="https://www.youtube.com/watch?v=WI945GTG0CY">Watch the video</a> —
118
+ <em>Can an AI agent run your single-cell analysis? Truecell, Seurat in Python</em>
119
+ (<a href="https://www.youtube.com/@GenomicAI">Genomic AI</a> on YouTube)
120
+ </p>
121
+
110
122
  ---
111
123
 
112
124
  ## Features
@@ -167,6 +179,15 @@ If truecell crashes (a segmentation fault, or a Jupyter kernel that dies), the
167
179
  [Troubleshooting](https://genomicai.github.io/truecell/troubleshooting/) page covers
168
180
  the known causes, and `truecell.show_versions()` prints what a bug report needs.
169
181
 
182
+ For an install that does not change when numpy or pandas release, pin a release
183
+ to the versions it was tested with, from 2.1.0 on
184
+ ([why and how](https://genomicai.github.io/truecell/installation/#an-install-that-does-not-change)):
185
+
186
+ ```bash
187
+ pip install "truecell[analysis]==X.Y.Z" \
188
+ -c https://raw.githubusercontent.com/GenomicAI/truecell/vX.Y.Z/constraints.txt
189
+ ```
190
+
170
191
  > **Releases and `main`.** [PyPI](https://pypi.org/project/truecell/) has the
171
192
  > latest release, and this README follows `main`.
172
193
  > [`CHANGELOG.md`](https://github.com/GenomicAI/truecell/blob/main/CHANGELOG.md)
@@ -478,9 +499,9 @@ Truecell
478
499
 
479
500
  See **[`ROADMAP.md`](https://github.com/GenomicAI/truecell/blob/main/ROADMAP.md)** for the full
480
501
  development plan, and **[`CHANGELOG.md`](https://github.com/GenomicAI/truecell/blob/main/CHANGELOG.md)**
481
- for what has actually shipped. The two are not the same thing — these milestones are planning
482
- labels rather than release versions — but as of **0.9.0** every row below through v0.9.0 is
483
- released, not just landed on `main`. Milestones:
502
+ for what has actually shipped. The two are not the same thing: these milestones are planning
503
+ labels, not release versions. Every milestone below is released, the last of them in 0.9.0,
504
+ and the current release is **2.0.0**. Milestones:
484
505
 
485
506
  | Milestone | Focus |
486
507
  |-----------|-------|
@@ -494,6 +515,17 @@ released, not just landed on `main`. Milestones:
494
515
  | v0.9.0 | Specialized — `HTODemux` ✅ + `MULTIseqDemux` ✅ (cell hashing); Mixscape ✅ (`CalcPerturbSig` + `RunMixscape` + `MixscapeLDA` + `PlotPerturbScore` + `MixscapeHeatmap`, CRISPR screens) — **released in 0.9.0** |
495
516
  | v0.10.0 | Infrastructure — PyPI ✅, GitHub Actions CI ✅ (3.12–3.13 matrix, wheel build + clean-install verification, coverage), [`CHANGELOG.md`](https://github.com/GenomicAI/truecell/blob/main/CHANGELOG.md) ✅, `mypy` in CI ✅, the [documentation site](https://genomicai.github.io/truecell/) ✅ |
496
517
 
518
+ The releases since then have been about fidelity to Seurat rather than new milestones:
519
+
520
+ | Release | Focus |
521
+ |---------|-------|
522
+ | 1.0.0 | The rename from `shanuz` to `truecell`: same code, re-verified |
523
+ | 1.1.0 | Plotting parity with Seurat, with fixes to the categorical palette, `vln_plot` and `aggregate_expression`; CI installs from `uv.lock` |
524
+ | 1.2.0 | The last unblocked API gaps: all nine `find_markers` tests, `prep_sct_find_markers`, `diet_truecell`, `find_neighbors(return_neighbor=True)` |
525
+ | 2.0.0 | Defaults brought to Seurat 5's, and a test that fails on any undocumented difference. A major version because default results change |
526
+
527
+ What is still open is listed at the end of [`ROADMAP.md`](https://github.com/GenomicAI/truecell/blob/main/ROADMAP.md), under *After 2.0.0*.
528
+
497
529
  ---
498
530
 
499
531
  ## Running Tests
@@ -31,6 +31,18 @@ dimensionality reduction, clustering, and marker detection — entirely in Pytho
31
31
  > pure-Python, pip-installable alternative that integrates naturally with NumPy, SciPy,
32
32
  > and AnnData ecosystems.
33
33
 
34
+ <p align="center">
35
+ <a href="https://www.youtube.com/watch?v=WI945GTG0CY">
36
+ <img src="https://img.youtube.com/vi/WI945GTG0CY/maxresdefault.jpg"
37
+ alt="Watch the video: Can an AI agent run your single-cell analysis? Truecell, Seurat in Python"
38
+ width="560">
39
+ </a>
40
+ <br>
41
+ 🎬 <a href="https://www.youtube.com/watch?v=WI945GTG0CY">Watch the video</a> —
42
+ <em>Can an AI agent run your single-cell analysis? Truecell, Seurat in Python</em>
43
+ (<a href="https://www.youtube.com/@GenomicAI">Genomic AI</a> on YouTube)
44
+ </p>
45
+
34
46
  ---
35
47
 
36
48
  ## Features
@@ -91,6 +103,15 @@ If truecell crashes (a segmentation fault, or a Jupyter kernel that dies), the
91
103
  [Troubleshooting](https://genomicai.github.io/truecell/troubleshooting/) page covers
92
104
  the known causes, and `truecell.show_versions()` prints what a bug report needs.
93
105
 
106
+ For an install that does not change when numpy or pandas release, pin a release
107
+ to the versions it was tested with, from 2.1.0 on
108
+ ([why and how](https://genomicai.github.io/truecell/installation/#an-install-that-does-not-change)):
109
+
110
+ ```bash
111
+ pip install "truecell[analysis]==X.Y.Z" \
112
+ -c https://raw.githubusercontent.com/GenomicAI/truecell/vX.Y.Z/constraints.txt
113
+ ```
114
+
94
115
  > **Releases and `main`.** [PyPI](https://pypi.org/project/truecell/) has the
95
116
  > latest release, and this README follows `main`.
96
117
  > [`CHANGELOG.md`](https://github.com/GenomicAI/truecell/blob/main/CHANGELOG.md)
@@ -402,9 +423,9 @@ Truecell
402
423
 
403
424
  See **[`ROADMAP.md`](https://github.com/GenomicAI/truecell/blob/main/ROADMAP.md)** for the full
404
425
  development plan, and **[`CHANGELOG.md`](https://github.com/GenomicAI/truecell/blob/main/CHANGELOG.md)**
405
- for what has actually shipped. The two are not the same thing — these milestones are planning
406
- labels rather than release versions — but as of **0.9.0** every row below through v0.9.0 is
407
- released, not just landed on `main`. Milestones:
426
+ for what has actually shipped. The two are not the same thing: these milestones are planning
427
+ labels, not release versions. Every milestone below is released, the last of them in 0.9.0,
428
+ and the current release is **2.0.0**. Milestones:
408
429
 
409
430
  | Milestone | Focus |
410
431
  |-----------|-------|
@@ -418,6 +439,17 @@ released, not just landed on `main`. Milestones:
418
439
  | v0.9.0 | Specialized — `HTODemux` ✅ + `MULTIseqDemux` ✅ (cell hashing); Mixscape ✅ (`CalcPerturbSig` + `RunMixscape` + `MixscapeLDA` + `PlotPerturbScore` + `MixscapeHeatmap`, CRISPR screens) — **released in 0.9.0** |
419
440
  | v0.10.0 | Infrastructure — PyPI ✅, GitHub Actions CI ✅ (3.12–3.13 matrix, wheel build + clean-install verification, coverage), [`CHANGELOG.md`](https://github.com/GenomicAI/truecell/blob/main/CHANGELOG.md) ✅, `mypy` in CI ✅, the [documentation site](https://genomicai.github.io/truecell/) ✅ |
420
441
 
442
+ The releases since then have been about fidelity to Seurat rather than new milestones:
443
+
444
+ | Release | Focus |
445
+ |---------|-------|
446
+ | 1.0.0 | The rename from `shanuz` to `truecell`: same code, re-verified |
447
+ | 1.1.0 | Plotting parity with Seurat, with fixes to the categorical palette, `vln_plot` and `aggregate_expression`; CI installs from `uv.lock` |
448
+ | 1.2.0 | The last unblocked API gaps: all nine `find_markers` tests, `prep_sct_find_markers`, `diet_truecell`, `find_neighbors(return_neighbor=True)` |
449
+ | 2.0.0 | Defaults brought to Seurat 5's, and a test that fails on any undocumented difference. A major version because default results change |
450
+
451
+ What is still open is listed at the end of [`ROADMAP.md`](https://github.com/GenomicAI/truecell/blob/main/ROADMAP.md), under *After 2.0.0*.
452
+
421
453
  ---
422
454
 
423
455
  ## Running Tests
@@ -4,6 +4,11 @@ This document tracks features planned for future releases, organized by mileston
4
4
  Each item includes the R Seurat equivalent, implementation notes, and dependencies
5
5
  so any item can be picked up and scoped independently.
6
6
 
7
+ > **Status at 2.0.0 (2026-09-18):** every milestone on this page, v0.2.0 to v0.10.0,
8
+ > is delivered and released; 0.9.0 released the last of them. The releases since
9
+ > then, 1.0.0 to 2.0.0, are in [`CHANGELOG.md`](CHANGELOG.md). What is still open is
10
+ > gathered in the last section, *After 2.0.0*.
11
+
7
12
  **What v0.1.0 already covers** (not listed below):
8
13
  LogNormalize · CLR · VST · ScaleData (+ covariate regression) · SCTransform ·
9
14
  AddModuleScore · CellCycleScoring · PCA · UMAP · KNN/SNN · Louvain/Leiden ·
@@ -135,7 +140,7 @@ Spatial data structures (FOV/Centroids/Segmentation/Molecules)
135
140
 
136
141
  ---
137
142
 
138
- ## v0.4.0 — Weighted Nearest Neighbor (WNN)
143
+ ## v0.4.0 — Weighted Nearest Neighbor (WNN) — ✅ complete
139
144
 
140
145
  > **Why:** truecell already stores RNA + ADT assays; WNN is the natural joint
141
146
  > analysis step for CITE-seq data and is well-scoped.
@@ -380,7 +385,7 @@ relied on the defaults are unaffected.
380
385
 
381
386
  ---
382
387
 
383
- ## v0.7.0 — Spatial Transcriptomics
388
+ ## v0.7.0 — Spatial Transcriptomics — ✅ complete
384
389
 
385
390
  > **Delivered.** The data structures (`FOV`, `Centroids`, `Segmentation`,
386
391
  > `Molecules`) plus these loaders and analysis functions are done and validated
@@ -507,7 +512,7 @@ brute-force loop over every cell pair (`tests/test_markvariogram.py`).
507
512
 
508
513
  ---
509
514
 
510
- ## v0.8.0 — Scale & Performance
515
+ ## v0.8.0 — Scale & Performance — ✅ complete
511
516
 
512
517
  > **Status:** ✅ **complete.** Leverage-score sketching (`sketch_data` /
513
518
  > `project_data` + `leverage_score`, `truecell/sketch.py`) draws an information-dense
@@ -761,7 +766,7 @@ regime. Don't "simplify" them.
761
766
 
762
767
  ### PyPI publication — ✅ delivered
763
768
  - `pip install truecell` works: published as [`truecell`](https://pypi.org/project/truecell/),
764
- currently 0.9.0 (`build` + `twine` added to `[dev]` extras; published to
769
+ currently 2.0.0 (`build` + `twine` added to `[dev]` extras; published to
765
770
  TestPyPI then PyPI; verified with a clean-venv install + import + mini-pipeline
766
771
  smoke test)
767
772
  - ~~Still open: replace the hard-coded `__version__` string~~ — ✅ delivered:
@@ -773,7 +778,11 @@ regime. Don't "simplify" them.
773
778
  after a bump until it is reinstalled — a way to be wrong that the hard-coded
774
779
  string did not have. `tests/test_packaging.py::test_version_matches_pyproject`
775
780
  exists to make it loud rather than silent.
776
- - **Still open — decide what the `>=` dependency floors mean.** `pyproject`
781
+ - ~~**Still open — decide what the `>=` dependency floors mean.**~~ ✅ Decided in
782
+ 1.1.0: a tested lockfile. `uv.lock` is committed, CI installs with
783
+ `uv sync --all-extras --locked`, and the `wheel-tutorials` job runs the built
784
+ wheel in a venv pinned to the lock. The floors stay lower bounds for users. The
785
+ record of why it was needed follows. `pyproject`
777
786
  declares only lower bounds (`pandas>=2.0`, `numpy>=1.24`, `anndata>=0.10`,
778
787
  `umap-learn>=0.5`, `scikit-learn>=1.3`, …), so a fresh install resolves to
779
788
  whatever shipped this week and no two installs need agree. This has now caused
@@ -855,6 +864,9 @@ regime. Don't "simplify" them.
855
864
  and easy to confuse), and `ignore_missing_imports` silences the stub-less
856
865
  scientific stack — without it the run is 222 errors, 139 of them purely
857
866
  "this third party has no stubs".
867
+ - **Now 4 errors in 2 files** (`compat/anndata.py`, `plotting.py`) on default
868
+ settings, at 2.0.0; #70 took it to 0. The rest of this item is the record from
869
+ when it was added.
858
870
  - **Baseline to work down:** ~80 errors in 15 modules on default settings, ~540
859
871
  in 47 under `--strict`. Neither is a fixed target: both drift with the
860
872
  interpreter and with the dependency versions each resolves against the `>=`
@@ -1191,6 +1203,12 @@ regime. Don't "simplify" them.
1191
1203
  fix" cannot reintroduce it. Second Seurat finding: **`Radius()` on a
1192
1204
  `VisiumV2` returns `NULL`** — `methods("Radius")` has Centroids, STARmap,
1193
1205
  SlideSeq, SpatialImage and VisiumV1, but no VisiumV2.
1206
+ **Upstream since:** Seurat fixed the `NULL` in satijalab/seurat#10454
1207
+ (merged 2026-09-08, not yet in a release; 5.5.1 still returns `NULL`). The
1208
+ diameter is deliberate upstream: Seurat changed to it in 5.1.0
1209
+ (satijalab/seurat#8420) and its own tests assert it. So that one is a Seurat
1210
+ convention truecell does not follow, not a Seurat bug. Neither was reported
1211
+ upstream from here.
1194
1212
  **The truecell defect:** `_imread` fell back from matplotlib to Pillow, which
1195
1213
  return **float32 in [0,1] and uint8 in [0,255]** — 255× apart, from the same
1196
1214
  file, and neither library is a declared dependency, so `get_image()` was a
@@ -1277,7 +1295,8 @@ regime. Don't "simplify" them.
1277
1295
  - **Expect bugs, and read a mismatch as a bug report.** Wave 1 went T7, T9 and T8
1278
1296
  clean, while **T6 found the first two defects**, **T-dr the next two**,
1279
1297
  **T-sk two more**, **T-obj eleven**, **T-sp three**, **T-de two**, **T-lazy seven**,
1280
- **T-vis one** (plus two in Seurat itself) and **T-int eighteen** —
1298
+ **T-vis one** (plus one in Seurat itself, and a Seurat convention truecell does
1299
+ not follow) and **T-int eighteen** —
1281
1300
  exactly the point: a green synthetic suite (balanced batches, self-consistent
1282
1301
  fixtures) hid a crash, a 4× under-integration, a mis-specified permutation null,
1283
1302
  the wrong significance test, a flattened sampling weight and a label transfer
@@ -1401,3 +1420,42 @@ If milestones are too large, these are the highest-value individual items:
1401
1420
  8. ~~**`run_spca` + `glm_pca`** (Poisson + negative binomial)~~ ✅ (`v0.5.0`) —
1402
1421
  **v0.5.0 is complete**; GLM-PCA now fits both `family="poisson"` and
1403
1422
  `family="nb"` (dispersion estimated by ML), closing the last gap in it
1423
+
1424
+ ---
1425
+
1426
+ ## After 2.0.0 — open items
1427
+
1428
+ Candidates, not commitments. Each says why it is open.
1429
+
1430
+ - **Name the missing extra in import errors.** On a core-only install,
1431
+ `find_markers(test_use="LR")` (statsmodels), `find_neighbors` (scikit-learn) and
1432
+ `run_umap` (umap-learn) raise a bare `ModuleNotFoundError` rather than naming the
1433
+ extra to install. It has been this way since 1.2.0 at least. A package change, so
1434
+ it ships with the next release.
1435
+ - **`vln_plot`'s median bar.** It always draws one, which Seurat's `VlnPlot` does
1436
+ not. Dropping it would change existing plots, so it waits for a release that can
1437
+ say so, if it happens at all. The CITE-seq tutorial's R panel draws the bar to
1438
+ match (#138). Group order is no longer part of this: the plots follow a categorical
1439
+ column's categories since the fix for #143.
1440
+ - **Spatial plots still sort groups alphabetically.** `image_dim_plot` and
1441
+ `spatial_dim_plot` use a plain `sorted()`, so they ignore a categorical's order and
1442
+ put "10" before "2", unlike the other group plots. Changing it would move committed
1443
+ spatial figures.
1444
+ - **Seurat's next release.** Seurat's `main` has fixes that are not in 5.5.1, the
1445
+ version every R reference here was taken on, to functions the tutorials compare
1446
+ against: `Radius()` on a `VisiumV2` (#10454), `FindSpatiallyVariableFeatures` and
1447
+ `RunMarkVario` (#10504, #10505), and `AddModuleScore` on on-disk assays (#10448).
1448
+ When it is released, re-run the tutorials that call them. The Visium tutorial
1449
+ reports the `Radius()` result rather than matching it, so nothing fails, but its
1450
+ text will need to say the `NULL` is fixed.
1451
+ - **The Visium radius wording.** Some docs and skills call Seurat's
1452
+ diameter-in-a-radius-slot a Seurat error: `skills/truecell-from-seurat`,
1453
+ `skills/truecell-spatial`, `skills/truecell-dev` and `tutorials/README.md`. It is
1454
+ deliberate upstream (see the T-vis entry above). truecell's half-size radius stays;
1455
+ the wording should call it a convention truecell does not follow.
1456
+ - **`DEenrichRPlot`** is not ported. It calls the enrichR web service, which would
1457
+ put a network dependency in the test path (see Mixscape above).
1458
+ - **Python 3.14** waits on a `harmonypy` cp314 wheel. harmonypy 2.0.2 still ships
1459
+ cp39–cp313 only (checked 2026-09-28).
1460
+ - **Type annotations:** 4 `mypy` errors on default settings, and `--strict` not
1461
+ started (see *Type annotations* above).