cytearc 1.0.0rc1__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 (327) hide show
  1. cytearc-1.0.0rc1/AGENTS.md +105 -0
  2. cytearc-1.0.0rc1/LICENSE +29 -0
  3. cytearc-1.0.0rc1/MANIFEST.in +14 -0
  4. cytearc-1.0.0rc1/PKG-INFO +183 -0
  5. cytearc-1.0.0rc1/README.md +104 -0
  6. cytearc-1.0.0rc1/cytearc/__init__.py +200 -0
  7. cytearc-1.0.0rc1/cytearc/_facade.py +136 -0
  8. cytearc-1.0.0rc1/cytearc/_version.py +24 -0
  9. cytearc-1.0.0rc1/cytearc/agent/.gitignore +2 -0
  10. cytearc-1.0.0rc1/cytearc/agent/README.md +684 -0
  11. cytearc-1.0.0rc1/cytearc/agent/VALIDATION.md +45 -0
  12. cytearc-1.0.0rc1/cytearc/agent/__init__.py +34 -0
  13. cytearc-1.0.0rc1/cytearc/agent/api.py +318 -0
  14. cytearc-1.0.0rc1/cytearc/agent/choices.py +309 -0
  15. cytearc-1.0.0rc1/cytearc/agent/compact_result.py +218 -0
  16. cytearc-1.0.0rc1/cytearc/agent/diagnostics.py +358 -0
  17. cytearc-1.0.0rc1/cytearc/agent/evidence.py +868 -0
  18. cytearc-1.0.0rc1/cytearc/agent/execution.py +652 -0
  19. cytearc-1.0.0rc1/cytearc/agent/models.py +197 -0
  20. cytearc-1.0.0rc1/cytearc/agent/plots.py +193 -0
  21. cytearc-1.0.0rc1/cytearc/agent/prompts.py +90 -0
  22. cytearc-1.0.0rc1/cytearc/agent/provider.py +613 -0
  23. cytearc-1.0.0rc1/cytearc/agent/records.py +361 -0
  24. cytearc-1.0.0rc1/cytearc/agent/rendering.py +291 -0
  25. cytearc-1.0.0rc1/cytearc/agent/report_assets.py +5592 -0
  26. cytearc-1.0.0rc1/cytearc/agent/report_charts.py +103 -0
  27. cytearc-1.0.0rc1/cytearc/agent/report_html.py +1414 -0
  28. cytearc-1.0.0rc1/cytearc/agent/report_style.py +155 -0
  29. cytearc-1.0.0rc1/cytearc/agent/report_text.py +141 -0
  30. cytearc-1.0.0rc1/cytearc/agent/result.py +264 -0
  31. cytearc-1.0.0rc1/cytearc/agent/workflow.py +1645 -0
  32. cytearc-1.0.0rc1/cytearc/assay/__init__.py +68 -0
  33. cytearc-1.0.0rc1/cytearc/assay/adt.py +50 -0
  34. cytearc-1.0.0rc1/cytearc/assay/atac.py +272 -0
  35. cytearc-1.0.0rc1/cytearc/assay/base.py +953 -0
  36. cytearc-1.0.0rc1/cytearc/assay/classification.py +222 -0
  37. cytearc-1.0.0rc1/cytearc/assay/feature_summary.py +235 -0
  38. cytearc-1.0.0rc1/cytearc/assay/normalization.py +960 -0
  39. cytearc-1.0.0rc1/cytearc/assay/persistence.py +31 -0
  40. cytearc-1.0.0rc1/cytearc/assay/rna.py +978 -0
  41. cytearc-1.0.0rc1/cytearc/clustering/__init__.py +39 -0
  42. cytearc-1.0.0rc1/cytearc/clustering/_paris_core.py +643 -0
  43. cytearc-1.0.0rc1/cytearc/clustering/_paris_modularity.py +515 -0
  44. cytearc-1.0.0rc1/cytearc/clustering/cluster_tree.py +115 -0
  45. cytearc-1.0.0rc1/cytearc/clustering/leiden.py +122 -0
  46. cytearc-1.0.0rc1/cytearc/clustering/paris.py +213 -0
  47. cytearc-1.0.0rc1/cytearc/clustering/paris_multiscale.py +604 -0
  48. cytearc-1.0.0rc1/cytearc/cytebase/__init__.py +440 -0
  49. cytearc-1.0.0rc1/cytearc/cytebase/_embeddings.py +112 -0
  50. cytearc-1.0.0rc1/cytearc/cytebase/_storage.py +288 -0
  51. cytearc-1.0.0rc1/cytearc/cytebase/catalog.py +410 -0
  52. cytearc-1.0.0rc1/cytearc/cytebase/connector.py +304 -0
  53. cytearc-1.0.0rc1/cytearc/cytebase/display.py +147 -0
  54. cytearc-1.0.0rc1/cytearc/cytebase/entry.py +108 -0
  55. cytearc-1.0.0rc1/cytearc/cytebase/pipeline/__init__.py +1 -0
  56. cytearc-1.0.0rc1/cytearc/cytebase/pipeline/__main__.py +93 -0
  57. cytearc-1.0.0rc1/cytearc/cytebase/pipeline/app.py +1226 -0
  58. cytearc-1.0.0rc1/cytearc/cytebase/pipeline/build.py +1143 -0
  59. cytearc-1.0.0rc1/cytearc/cytebase/pipeline/catalog.py +779 -0
  60. cytearc-1.0.0rc1/cytearc/cytebase/pipeline/deploy.py +119 -0
  61. cytearc-1.0.0rc1/cytearc/cytebase/pipeline/download.py +288 -0
  62. cytearc-1.0.0rc1/cytearc/cytebase/pipeline/inventory.py +268 -0
  63. cytearc-1.0.0rc1/cytearc/cytebase/pipeline/models.py +155 -0
  64. cytearc-1.0.0rc1/cytearc/cytebase/pipeline/resources.py +147 -0
  65. cytearc-1.0.0rc1/cytearc/cytebase/pipeline/selection.py +304 -0
  66. cytearc-1.0.0rc1/cytearc/datastore/__init__.py +0 -0
  67. cytearc-1.0.0rc1/cytearc/datastore/_operations/__init__.py +0 -0
  68. cytearc-1.0.0rc1/cytearc/datastore/_operations/clustering.py +608 -0
  69. cytearc-1.0.0rc1/cytearc/datastore/_operations/embeddings.py +532 -0
  70. cytearc-1.0.0rc1/cytearc/datastore/_operations/enrichment_store.py +515 -0
  71. cytearc-1.0.0rc1/cytearc/datastore/_operations/features.py +2677 -0
  72. cytearc-1.0.0rc1/cytearc/datastore/_operations/graph.py +2967 -0
  73. cytearc-1.0.0rc1/cytearc/datastore/_operations/integration_metrics.py +595 -0
  74. cytearc-1.0.0rc1/cytearc/datastore/_operations/mapping.py +992 -0
  75. cytearc-1.0.0rc1/cytearc/datastore/_operations/mapping_reference.py +451 -0
  76. cytearc-1.0.0rc1/cytearc/datastore/_operations/paris_persistence.py +451 -0
  77. cytearc-1.0.0rc1/cytearc/datastore/_operations/presentation.py +1092 -0
  78. cytearc-1.0.0rc1/cytearc/datastore/_operations/quality_control.py +1749 -0
  79. cytearc-1.0.0rc1/cytearc/datastore/_operations/statistical_store.py +482 -0
  80. cytearc-1.0.0rc1/cytearc/datastore/_operations/trajectory.py +2121 -0
  81. cytearc-1.0.0rc1/cytearc/datastore/_pipeline_cluster_selection.py +483 -0
  82. cytearc-1.0.0rc1/cytearc/datastore/_pipeline_fields.py +310 -0
  83. cytearc-1.0.0rc1/cytearc/datastore/_pipeline_filtering.py +112 -0
  84. cytearc-1.0.0rc1/cytearc/datastore/_pipeline_ledger.py +450 -0
  85. cytearc-1.0.0rc1/cytearc/datastore/_pipeline_recipe.py +873 -0
  86. cytearc-1.0.0rc1/cytearc/datastore/_plot_accessor.py +891 -0
  87. cytearc-1.0.0rc1/cytearc/datastore/artifact_accessor.py +15 -0
  88. cytearc-1.0.0rc1/cytearc/datastore/base_datastore.py +1271 -0
  89. cytearc-1.0.0rc1/cytearc/datastore/datastore.py +382 -0
  90. cytearc-1.0.0rc1/cytearc/datastore/graph_datastore.py +27 -0
  91. cytearc-1.0.0rc1/cytearc/datastore/mapping_datastore.py +9 -0
  92. cytearc-1.0.0rc1/cytearc/datastore/namespaces.py +204 -0
  93. cytearc-1.0.0rc1/cytearc/datastore/pipeline_accessor.py +680 -0
  94. cytearc-1.0.0rc1/cytearc/datastore/pipeline_run.py +1295 -0
  95. cytearc-1.0.0rc1/cytearc/datastore/plot_accessor.py +7 -0
  96. cytearc-1.0.0rc1/cytearc/datastore/summary.py +356 -0
  97. cytearc-1.0.0rc1/cytearc/embeddings/__init__.py +56 -0
  98. cytearc-1.0.0rc1/cytearc/embeddings/harmony/__init__.py +32 -0
  99. cytearc-1.0.0rc1/cytearc/embeddings/harmony/api.py +364 -0
  100. cytearc-1.0.0rc1/cytearc/embeddings/harmony/models.py +22 -0
  101. cytearc-1.0.0rc1/cytearc/embeddings/harmony/optimizer.py +259 -0
  102. cytearc-1.0.0rc1/cytearc/embeddings/imported.py +752 -0
  103. cytearc-1.0.0rc1/cytearc/embeddings/imported_storage.py +576 -0
  104. cytearc-1.0.0rc1/cytearc/embeddings/initialization.py +43 -0
  105. cytearc-1.0.0rc1/cytearc/embeddings/reduction.py +483 -0
  106. cytearc-1.0.0rc1/cytearc/embeddings/sgtsne.py +124 -0
  107. cytearc-1.0.0rc1/cytearc/embeddings/umap.py +240 -0
  108. cytearc-1.0.0rc1/cytearc/features/__init__.py +87 -0
  109. cytearc-1.0.0rc1/cytearc/features/aggregation.py +445 -0
  110. cytearc-1.0.0rc1/cytearc/features/enrichment/__init__.py +17 -0
  111. cytearc-1.0.0rc1/cytearc/features/enrichment/aucell.py +266 -0
  112. cytearc-1.0.0rc1/cytearc/features/enrichment/net.py +344 -0
  113. cytearc-1.0.0rc1/cytearc/features/enrichment/results.py +86 -0
  114. cytearc-1.0.0rc1/cytearc/features/enrichment/waggr.py +86 -0
  115. cytearc-1.0.0rc1/cytearc/features/gene_families.py +74 -0
  116. cytearc-1.0.0rc1/cytearc/features/gene_reference.py +364 -0
  117. cytearc-1.0.0rc1/cytearc/features/genomic/__init__.py +31 -0
  118. cytearc-1.0.0rc1/cytearc/features/genomic/intervals.py +182 -0
  119. cytearc-1.0.0rc1/cytearc/features/genomic/melding.py +357 -0
  120. cytearc-1.0.0rc1/cytearc/features/identity.py +575 -0
  121. cytearc-1.0.0rc1/cytearc/features/markers/__init__.py +33 -0
  122. cytearc-1.0.0rc1/cytearc/features/markers/rank.py +602 -0
  123. cytearc-1.0.0rc1/cytearc/features/markers/regression.py +157 -0
  124. cytearc-1.0.0rc1/cytearc/features/markers/search.py +607 -0
  125. cytearc-1.0.0rc1/cytearc/features/markers/table.py +440 -0
  126. cytearc-1.0.0rc1/cytearc/features/scoring.py +66 -0
  127. cytearc-1.0.0rc1/cytearc/features/statistical.py +1830 -0
  128. cytearc-1.0.0rc1/cytearc/features/values.py +360 -0
  129. cytearc-1.0.0rc1/cytearc/features/variability.py +524 -0
  130. cytearc-1.0.0rc1/cytearc/graph/__init__.py +3 -0
  131. cytearc-1.0.0rc1/cytearc/graph/arguments.py +280 -0
  132. cytearc-1.0.0rc1/cytearc/graph/distances.py +224 -0
  133. cytearc-1.0.0rc1/cytearc/graph/feature_projection.py +730 -0
  134. cytearc-1.0.0rc1/cytearc/graph/kinds.py +15 -0
  135. cytearc-1.0.0rc1/cytearc/mapping/__init__.py +45 -0
  136. cytearc-1.0.0rc1/cytearc/mapping/artifact.py +1427 -0
  137. cytearc-1.0.0rc1/cytearc/mapping/confidence.py +299 -0
  138. cytearc-1.0.0rc1/cytearc/mapping/features.py +475 -0
  139. cytearc-1.0.0rc1/cytearc/mapping/label_transfer.py +1149 -0
  140. cytearc-1.0.0rc1/cytearc/mapping/models.py +381 -0
  141. cytearc-1.0.0rc1/cytearc/mapping/projection.py +905 -0
  142. cytearc-1.0.0rc1/cytearc/mapping/reference.py +373 -0
  143. cytearc-1.0.0rc1/cytearc/mapping/symphony.py +239 -0
  144. cytearc-1.0.0rc1/cytearc/matrix/__init__.py +19 -0
  145. cytearc-1.0.0rc1/cytearc/matrix/_indexing.py +26 -0
  146. cytearc-1.0.0rc1/cytearc/matrix/_operations.py +122 -0
  147. cytearc-1.0.0rc1/cytearc/matrix/_reductions.py +135 -0
  148. cytearc-1.0.0rc1/cytearc/matrix/chunked.py +915 -0
  149. cytearc-1.0.0rc1/cytearc/merge/__init__.py +34 -0
  150. cytearc-1.0.0rc1/cytearc/merge/datasets.py +1375 -0
  151. cytearc-1.0.0rc1/cytearc/merge/features.py +189 -0
  152. cytearc-1.0.0rc1/cytearc/merge/metadata.py +1189 -0
  153. cytearc-1.0.0rc1/cytearc/merge/models.py +69 -0
  154. cytearc-1.0.0rc1/cytearc/merge/row_plan.py +208 -0
  155. cytearc-1.0.0rc1/cytearc/merge/writer.py +547 -0
  156. cytearc-1.0.0rc1/cytearc/metadata/__init__.py +11 -0
  157. cytearc-1.0.0rc1/cytearc/metadata/arguments.py +336 -0
  158. cytearc-1.0.0rc1/cytearc/metadata/artifacts.py +447 -0
  159. cytearc-1.0.0rc1/cytearc/metadata/encoding.py +296 -0
  160. cytearc-1.0.0rc1/cytearc/metadata/membership.py +512 -0
  161. cytearc-1.0.0rc1/cytearc/metadata/queries.py +362 -0
  162. cytearc-1.0.0rc1/cytearc/metadata/rows.py +300 -0
  163. cytearc-1.0.0rc1/cytearc/metadata/selection.py +763 -0
  164. cytearc-1.0.0rc1/cytearc/metadata/table.py +486 -0
  165. cytearc-1.0.0rc1/cytearc/metrics/__init__.py +58 -0
  166. cytearc-1.0.0rc1/cytearc/metrics/_rows.py +14 -0
  167. cytearc-1.0.0rc1/cytearc/metrics/_types.py +10 -0
  168. cytearc-1.0.0rc1/cytearc/metrics/association.py +427 -0
  169. cytearc-1.0.0rc1/cytearc/metrics/cluster_selection.py +402 -0
  170. cytearc-1.0.0rc1/cytearc/metrics/cluster_separability.py +407 -0
  171. cytearc-1.0.0rc1/cytearc/metrics/concordance.py +39 -0
  172. cytearc-1.0.0rc1/cytearc/metrics/connectivity.py +132 -0
  173. cytearc-1.0.0rc1/cytearc/metrics/graph.py +254 -0
  174. cytearc-1.0.0rc1/cytearc/metrics/lisi.py +346 -0
  175. cytearc-1.0.0rc1/cytearc/metrics/silhouette.py +221 -0
  176. cytearc-1.0.0rc1/cytearc/neighbors/__init__.py +36 -0
  177. cytearc-1.0.0rc1/cytearc/neighbors/diffusion.py +169 -0
  178. cytearc-1.0.0rc1/cytearc/neighbors/graph.py +308 -0
  179. cytearc-1.0.0rc1/cytearc/neighbors/index.py +192 -0
  180. cytearc-1.0.0rc1/cytearc/neighbors/integration.py +386 -0
  181. cytearc-1.0.0rc1/cytearc/neighbors/stages.py +980 -0
  182. cytearc-1.0.0rc1/cytearc/plotting/__init__.py +152 -0
  183. cytearc-1.0.0rc1/cytearc/plotting/_contracts.py +217 -0
  184. cytearc-1.0.0rc1/cytearc/plotting/_data.py +677 -0
  185. cytearc-1.0.0rc1/cytearc/plotting/_deps.py +34 -0
  186. cytearc-1.0.0rc1/cytearc/plotting/_display.py +65 -0
  187. cytearc-1.0.0rc1/cytearc/plotting/_figure.py +825 -0
  188. cytearc-1.0.0rc1/cytearc/plotting/_heatmap_utils.py +296 -0
  189. cytearc-1.0.0rc1/cytearc/plotting/_raster.py +387 -0
  190. cytearc-1.0.0rc1/cytearc/plotting/_style.py +854 -0
  191. cytearc-1.0.0rc1/cytearc/plotting/cluster_connectivity.py +652 -0
  192. cytearc-1.0.0rc1/cytearc/plotting/cluster_tree.py +491 -0
  193. cytearc-1.0.0rc1/cytearc/plotting/composition.py +1041 -0
  194. cytearc-1.0.0rc1/cytearc/plotting/diagnostics.py +535 -0
  195. cytearc-1.0.0rc1/cytearc/plotting/distribution.py +2052 -0
  196. cytearc-1.0.0rc1/cytearc/plotting/embedding.py +2050 -0
  197. cytearc-1.0.0rc1/cytearc/plotting/embedding_raster.py +486 -0
  198. cytearc-1.0.0rc1/cytearc/plotting/heatmaps.py +1064 -0
  199. cytearc-1.0.0rc1/cytearc/plotting/mapping.py +1021 -0
  200. cytearc-1.0.0rc1/cytearc/plotting/modality_weights.py +282 -0
  201. cytearc-1.0.0rc1/cytearc/plotting/recipes.py +805 -0
  202. cytearc-1.0.0rc1/cytearc/plotting/summary.py +1054 -0
  203. cytearc-1.0.0rc1/cytearc/quality_control/__init__.py +22 -0
  204. cytearc-1.0.0rc1/cytearc/quality_control/cell_cycle.py +13 -0
  205. cytearc-1.0.0rc1/cytearc/quality_control/cell_cycle_genes.py +122 -0
  206. cytearc-1.0.0rc1/cytearc/quality_control/doublets.py +485 -0
  207. cytearc-1.0.0rc1/cytearc/quality_control/filtering.py +615 -0
  208. cytearc-1.0.0rc1/cytearc/quality_control/hto.py +303 -0
  209. cytearc-1.0.0rc1/cytearc/readers/__init__.py +55 -0
  210. cytearc-1.0.0rc1/cytearc/readers/_assay_names.py +59 -0
  211. cytearc-1.0.0rc1/cytearc/readers/_h5ad_columns.py +373 -0
  212. cytearc-1.0.0rc1/cytearc/readers/_h5ad_inspect.py +605 -0
  213. cytearc-1.0.0rc1/cytearc/readers/_rds/__init__.py +71 -0
  214. cytearc-1.0.0rc1/cytearc/readers/_rds/_lazy.py +279 -0
  215. cytearc-1.0.0rc1/cytearc/readers/_rds/_model.py +240 -0
  216. cytearc-1.0.0rc1/cytearc/readers/_rds/_parser.py +1270 -0
  217. cytearc-1.0.0rc1/cytearc/readers/_rds/_storage.py +531 -0
  218. cytearc-1.0.0rc1/cytearc/readers/_rds/_types.py +177 -0
  219. cytearc-1.0.0rc1/cytearc/readers/_seurat/__init__.py +119 -0
  220. cytearc-1.0.0rc1/cytearc/readers/_seurat/bpcells.py +873 -0
  221. cytearc-1.0.0rc1/cytearc/readers/_seurat/errors.py +32 -0
  222. cytearc-1.0.0rc1/cytearc/readers/_seurat/factory.py +1543 -0
  223. cytearc-1.0.0rc1/cytearc/readers/_seurat/fragments.py +1985 -0
  224. cytearc-1.0.0rc1/cytearc/readers/_seurat/hdf5.py +545 -0
  225. cytearc-1.0.0rc1/cytearc/readers/_seurat/operations.py +1596 -0
  226. cytearc-1.0.0rc1/cytearc/readers/_seurat/paths.py +374 -0
  227. cytearc-1.0.0rc1/cytearc/readers/_seurat/sources.py +1607 -0
  228. cytearc-1.0.0rc1/cytearc/readers/_seurat/values.py +213 -0
  229. cytearc-1.0.0rc1/cytearc/readers/_sparse.py +199 -0
  230. cytearc-1.0.0rc1/cytearc/readers/_text.py +36 -0
  231. cytearc-1.0.0rc1/cytearc/readers/cellranger.py +554 -0
  232. cytearc-1.0.0rc1/cytearc/readers/csv.py +352 -0
  233. cytearc-1.0.0rc1/cytearc/readers/h5ad.py +940 -0
  234. cytearc-1.0.0rc1/cytearc/readers/mtx.py +1590 -0
  235. cytearc-1.0.0rc1/cytearc/readers/seurat.py +3671 -0
  236. cytearc-1.0.0rc1/cytearc/storage/__init__.py +25 -0
  237. cytearc-1.0.0rc1/cytearc/storage/ann_index.py +205 -0
  238. cytearc-1.0.0rc1/cytearc/storage/arrays.py +373 -0
  239. cytearc-1.0.0rc1/cytearc/storage/artifact_writer.py +380 -0
  240. cytearc-1.0.0rc1/cytearc/storage/artifacts.py +811 -0
  241. cytearc-1.0.0rc1/cytearc/storage/async_execution.py +547 -0
  242. cytearc-1.0.0rc1/cytearc/storage/budget.py +233 -0
  243. cytearc-1.0.0rc1/cytearc/storage/copy.py +237 -0
  244. cytearc-1.0.0rc1/cytearc/storage/count_dtype.py +36 -0
  245. cytearc-1.0.0rc1/cytearc/storage/count_matrix.py +681 -0
  246. cytearc-1.0.0rc1/cytearc/storage/counts_t_contract.py +50 -0
  247. cytearc-1.0.0rc1/cytearc/storage/destinations.py +262 -0
  248. cytearc-1.0.0rc1/cytearc/storage/errors.py +53 -0
  249. cytearc-1.0.0rc1/cytearc/storage/execution.py +519 -0
  250. cytearc-1.0.0rc1/cytearc/storage/feature_selection.py +793 -0
  251. cytearc-1.0.0rc1/cytearc/storage/feature_stream.py +1074 -0
  252. cytearc-1.0.0rc1/cytearc/storage/finite_values.py +163 -0
  253. cytearc-1.0.0rc1/cytearc/storage/geometry.py +106 -0
  254. cytearc-1.0.0rc1/cytearc/storage/identity.py +663 -0
  255. cytearc-1.0.0rc1/cytearc/storage/io_policy.py +30 -0
  256. cytearc-1.0.0rc1/cytearc/storage/layout.py +255 -0
  257. cytearc-1.0.0rc1/cytearc/storage/lineage.py +476 -0
  258. cytearc-1.0.0rc1/cytearc/storage/materialize.py +121 -0
  259. cytearc-1.0.0rc1/cytearc/storage/metadata_keys.py +156 -0
  260. cytearc-1.0.0rc1/cytearc/storage/operation_revisions.py +98 -0
  261. cytearc-1.0.0rc1/cytearc/storage/parallel.py +171 -0
  262. cytearc-1.0.0rc1/cytearc/storage/partition.py +243 -0
  263. cytearc-1.0.0rc1/cytearc/storage/pipeline_runs.py +1792 -0
  264. cytearc-1.0.0rc1/cytearc/storage/profiles.py +52 -0
  265. cytearc-1.0.0rc1/cytearc/storage/refs.py +232 -0
  266. cytearc-1.0.0rc1/cytearc/storage/schema.py +636 -0
  267. cytearc-1.0.0rc1/cytearc/storage/selections.py +1261 -0
  268. cytearc-1.0.0rc1/cytearc/storage/sharding.py +1841 -0
  269. cytearc-1.0.0rc1/cytearc/storage/stores.py +827 -0
  270. cytearc-1.0.0rc1/cytearc/storage/types.py +84 -0
  271. cytearc-1.0.0rc1/cytearc/storage/validation_scope.py +79 -0
  272. cytearc-1.0.0rc1/cytearc/tools/__init__.py +0 -0
  273. cytearc-1.0.0rc1/cytearc/tools/repack_zarr.py +620 -0
  274. cytearc-1.0.0rc1/cytearc/trajectory/__init__.py +59 -0
  275. cytearc-1.0.0rc1/cytearc/trajectory/artifacts.py +997 -0
  276. cytearc-1.0.0rc1/cytearc/trajectory/fate.py +682 -0
  277. cytearc-1.0.0rc1/cytearc/trajectory/feature_dynamics.py +285 -0
  278. cytearc-1.0.0rc1/cytearc/trajectory/parameters.py +38 -0
  279. cytearc-1.0.0rc1/cytearc/trajectory/pseudotime.py +180 -0
  280. cytearc-1.0.0rc1/cytearc/trajectory/results.py +174 -0
  281. cytearc-1.0.0rc1/cytearc/utils/__init__.py +64 -0
  282. cytearc-1.0.0rc1/cytearc/utils/arguments.py +65 -0
  283. cytearc-1.0.0rc1/cytearc/utils/arrays.py +381 -0
  284. cytearc-1.0.0rc1/cytearc/utils/compute.py +110 -0
  285. cytearc-1.0.0rc1/cytearc/utils/count_values.py +265 -0
  286. cytearc-1.0.0rc1/cytearc/utils/digest.py +65 -0
  287. cytearc-1.0.0rc1/cytearc/utils/logging.py +115 -0
  288. cytearc-1.0.0rc1/cytearc/utils/moments.py +143 -0
  289. cytearc-1.0.0rc1/cytearc/utils/numba.py +18 -0
  290. cytearc-1.0.0rc1/cytearc/utils/process.py +282 -0
  291. cytearc-1.0.0rc1/cytearc/utils/progress.py +69 -0
  292. cytearc-1.0.0rc1/cytearc/utils/shutdown.py +214 -0
  293. cytearc-1.0.0rc1/cytearc/utils/strided.py +36 -0
  294. cytearc-1.0.0rc1/cytearc/utils/warnings.py +13 -0
  295. cytearc-1.0.0rc1/cytearc/writers/__init__.py +64 -0
  296. cytearc-1.0.0rc1/cytearc/writers/_materialize.py +85 -0
  297. cytearc-1.0.0rc1/cytearc/writers/_store.py +371 -0
  298. cytearc-1.0.0rc1/cytearc/writers/cellranger.py +496 -0
  299. cytearc-1.0.0rc1/cytearc/writers/counts_t.py +195 -0
  300. cytearc-1.0.0rc1/cytearc/writers/csv.py +286 -0
  301. cytearc-1.0.0rc1/cytearc/writers/export.py +905 -0
  302. cytearc-1.0.0rc1/cytearc/writers/h5ad.py +1532 -0
  303. cytearc-1.0.0rc1/cytearc/writers/seurat.py +1157 -0
  304. cytearc-1.0.0rc1/cytearc/writers/sparse.py +262 -0
  305. cytearc-1.0.0rc1/cytearc/writers/subset.py +542 -0
  306. cytearc-1.0.0rc1/cytearc.egg-info/PKG-INFO +183 -0
  307. cytearc-1.0.0rc1/cytearc.egg-info/SOURCES.txt +325 -0
  308. cytearc-1.0.0rc1/cytearc.egg-info/dependency_links.txt +1 -0
  309. cytearc-1.0.0rc1/cytearc.egg-info/requires.txt +68 -0
  310. cytearc-1.0.0rc1/cytearc.egg-info/scm_file_list.json +767 -0
  311. cytearc-1.0.0rc1/cytearc.egg-info/scm_version.json +8 -0
  312. cytearc-1.0.0rc1/cytearc.egg-info/top_level.txt +1 -0
  313. cytearc-1.0.0rc1/pyproject.toml +288 -0
  314. cytearc-1.0.0rc1/setup.cfg +4 -0
  315. cytearc-1.0.0rc1/skills/cytearc-single-cell/SKILL.md +266 -0
  316. cytearc-1.0.0rc1/skills/cytearc-single-cell/references/clustering-and-embedding.md +280 -0
  317. cytearc-1.0.0rc1/skills/cytearc-single-cell/references/data-access.md +344 -0
  318. cytearc-1.0.0rc1/skills/cytearc-single-cell/references/features-and-graphs.md +296 -0
  319. cytearc-1.0.0rc1/skills/cytearc-single-cell/references/gene-blacklists.md +182 -0
  320. cytearc-1.0.0rc1/skills/cytearc-single-cell/references/integration-and-comparisons.md +324 -0
  321. cytearc-1.0.0rc1/skills/cytearc-single-cell/references/markers-and-annotation.md +289 -0
  322. cytearc-1.0.0rc1/skills/cytearc-single-cell/references/performance-and-export.md +320 -0
  323. cytearc-1.0.0rc1/skills/cytearc-single-cell/references/pipeline-runs-and-artifacts.md +286 -0
  324. cytearc-1.0.0rc1/skills/cytearc-single-cell/references/plotting.md +291 -0
  325. cytearc-1.0.0rc1/skills/cytearc-single-cell/references/quality-control.md +290 -0
  326. cytearc-1.0.0rc1/skills/cytearc-single-cell/scripts/inspect_store.py +358 -0
  327. cytearc-1.0.0rc1/uv.lock +5046 -0
@@ -0,0 +1,105 @@
1
+ # Repository instructions
2
+
3
+ These instructions apply to the whole repository.
4
+
5
+ ## Start here
6
+
7
+ - Edit package code in `cytearc/`, tests in `tests/`, documentation in `docs/`, profiling tools
8
+ in `profiling/`, and agent skills in `skills/`.
9
+ - Before analysing data with CyteArc, read the relevant skill in `skills/`, starting with
10
+ `skills/cytearc-single-cell/SKILL.md`. Read skills only from `skills/`. When a change alters a public
11
+ API that a skill recipe uses, update the recipe in the same change.
12
+ - Read `docs/AGENTS.md` before executing or publishing documentation.
13
+ - Read `profiling/AGENTS.md` before using profiling tools or cloud resources.
14
+ - Use `docs/source/developers/architecture.md` for code placement and dependency boundaries, and
15
+ `docs/source/developers/contributing.md` for the human contribution workflow.
16
+ - Biological decision guidance belongs in `docs/source/analysis_with_agents.md`, not in repository
17
+ instructions.
18
+
19
+ ## CyteArc developer mental model
20
+
21
+ - CyteArc streams Zarr-backed matrices in bounded blocks. Do not materialize a complete matrix when
22
+ a blockwise path exists.
23
+ - `DataStore` orchestrates workflows. Reusable computation belongs in its concrete domain package
24
+ before a thin `datastore._operations` method exposes it.
25
+ - Dependencies flow from `storage`, `matrix`, and `utils`, through data models and domain
26
+ algorithms, to I/O, datastore orchestration, and plotting.
27
+ - Saved computations are immutable artifacts. `ArtifactRef`, provenance, and durable `PipelineRun`
28
+ records connect frozen selections, results, reuse, and complete workflow invocations.
29
+ - The lazy public facades are compatibility boundaries. Trace the public call, operation
30
+ implementation, domain algorithm, persisted result, callers, tests, and documentation before
31
+ changing a contract.
32
+ - Plotting consumes narrow adapters and must not gain a module-load dependency on `datastore`.
33
+
34
+ ## Source and conventions
35
+
36
+ - Python 3.12 or newer is required. Use `uv` for every Python command and dependency change.
37
+ - Preserve unrelated working-tree changes. Trace callers and tests before changing a public
38
+ function or persisted result.
39
+ - Use built-in generics and `X | None`. Do not add `typing.List`,
40
+ `typing.Optional`, or `from __future__ import annotations`.
41
+ - Pydantic model attributes use camel case.
42
+ - Do not add implicit compatibility branches, ad hoc schema versions, or silent migrations. Make a
43
+ compatibility policy explicit before implementing it.
44
+ - Do not commit credentials, local object-store endpoints, private bucket names, generated
45
+ benchmark configs, or result identifiers.
46
+ - Avoid em dashes in public prose, prompts, docstrings, and comments.
47
+
48
+ ## Environment and checks
49
+
50
+ ```bash
51
+ uv sync --group dev --group profiling --extra test --extra extra
52
+ uv run python -m tests.download_fixtures --with-h5ad
53
+ ```
54
+
55
+ Run focused tests without pytest-xdist. Run the quick suite while iterating and the complete suite before handoff:
56
+
57
+ ```bash
58
+ uv run pytest -n 0 tests/test_file.py::test_name
59
+ uv run pytest -m "not slow and not integration"
60
+ uv run pytest
61
+ ```
62
+
63
+ Run the same static checks as CI:
64
+
65
+ ```bash
66
+ uv run ruff check cytearc profiling tests
67
+ uv run ruff format --check cytearc profiling tests
68
+ uv run mypy cytearc profiling
69
+ ```
70
+
71
+ Visual references are intentional artifacts. Regenerate them only when rendering changes:
72
+
73
+ ```bash
74
+ MPLBACKEND=Agg CYTEARC_RUN_VISUAL_REGRESSION=1 \
75
+ uv run pytest -n 0 -m visual tests/test_plotting_showcase.py
76
+ ```
77
+
78
+ Performance changes to a kernel or stage: run the timed micro-benchmarks on a quiet machine. They
79
+ project each slowdown onto 1M and 10M cells and fail only on a meaningful projected delay:
80
+
81
+ ```bash
82
+ CYTEARC_RUN_BENCHMARKS=1 uv run pytest -n 0 tests/benchmarks
83
+ ```
84
+
85
+ ## Troubleshooting router
86
+
87
+ - Wrong code location or import cycle: read the architecture placement rules and run
88
+ `uv run pytest -n 0 tests/test_import_architecture.py`.
89
+ - Missing, stale, or incompatible result: inspect the pipeline-run report, artifact status, and
90
+ lineage before reading private Zarr paths.
91
+ - Public API or persisted contract: inspect the public API reference and the public,
92
+ compatibility, signature, and frozen-store tests.
93
+ - On-disk layout: read `docs/source/developers/zarr_internals.md`.
94
+ - Documentation cache or build: follow `docs/AGENTS.md`.
95
+ - Profiling, Modal, or benchmark interpretation: follow `profiling/AGENTS.md`.
96
+ - Micro-benchmark regression or baseline update: read the performance benchmarks section of
97
+ `docs/source/developers/contributing.md`.
98
+
99
+ ## Universal safety
100
+
101
+ - Execute selected documentation pages in one Modal invocation, with a separate container per
102
+ page. Do not start another invocation writing the same saved notebooks, or render while those
103
+ notebooks are being replaced.
104
+ - Never deploy Modal. Deployment is a user action. Ask before any paid or long-running cloud job.
105
+ - Do not publish example datasets or use write credentials unless the user explicitly requests it.
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, Nygen Analytics AB
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ * Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ * Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,14 @@
1
+ recursive-exclude * __pycache__
2
+ recursive-exclude * *.pyc
3
+ recursive-exclude * *.pyo
4
+ exclude .gitignore
5
+ exclude .gitattributes
6
+ exclude .readthedocs.yml
7
+ exclude Dockerfile
8
+ prune docs
9
+ prune tests
10
+ prune profiling
11
+ prune scripts
12
+ prune .circleci
13
+ prune .github
14
+ include README.md
@@ -0,0 +1,183 @@
1
+ Metadata-Version: 2.4
2
+ Name: cytearc
3
+ Version: 1.0.0rc1
4
+ Summary: Out-of-core, graph-first workflows for million-cell RNA-seq and CITE-seq
5
+ Author-email: Parashar Dhapola <parashar.dhapola@gmail.com>
6
+ License-Expression: BSD-3-Clause
7
+ Project-URL: Homepage, https://github.com/NygenAnalytics/CyteArc
8
+ Project-URL: Documentation, https://docs.nygen.io/CyteArc/
9
+ Project-URL: Installation, https://docs.nygen.io/CyteArc/installation
10
+ Project-URL: Issues, https://github.com/NygenAnalytics/CyteArc/issues
11
+ Keywords: single-cell,scRNA-seq,scATAC-seq,CITE-seq,Harmony,WNN,batch-correction,Zarr,memory-efficient
12
+ Classifier: Natural Language :: English
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Requires-Python: >=3.12
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: h5py>=3.11
21
+ Requires-Dist: hnswlib>=0.8
22
+ Requires-Dist: leidenalg>=0.12
23
+ Requires-Dist: loguru>=0.7
24
+ Requires-Dist: networkx>=3
25
+ Requires-Dist: numba>=0.60
26
+ Requires-Dist: numcodecs>=0.16
27
+ Requires-Dist: numpy>=2
28
+ Requires-Dist: packaging
29
+ Requires-Dist: pandas>=2.2.2
30
+ Requires-Dist: scikit-learn>=1.5
31
+ Requires-Dist: scipy!=1.17.0,>=1.15
32
+ Requires-Dist: statsmodels>=0.14.5
33
+ Requires-Dist: threadpoolctl>=3.5.0
34
+ Requires-Dist: tqdm>=4.60
35
+ Requires-Dist: umap-learn>=0.5.12
36
+ Requires-Dist: zarr>=3.2.0
37
+ Requires-Dist: obstore>=0.5.1
38
+ Requires-Dist: huggingface-hub>=2.0.0
39
+ Requires-Dist: zstandard>=0.25.0
40
+ Requires-Dist: igraph>=1.0.0
41
+ Provides-Extra: cytebase
42
+ Requires-Dist: duckdb>=1.5.5; extra == "cytebase"
43
+ Requires-Dist: httpx>=0.28.1; extra == "cytebase"
44
+ Requires-Dist: matplotlib>=3.9; extra == "cytebase"
45
+ Requires-Dist: pytz>=2026.3.post1; extra == "cytebase"
46
+ Requires-Dist: seaborn>=0.13; extra == "cytebase"
47
+ Provides-Extra: agent
48
+ Requires-Dist: pydantic-ai-slim[openai]>=2.51.0; extra == "agent"
49
+ Provides-Extra: extra
50
+ Requires-Dist: anndata>=0.12; extra == "extra"
51
+ Requires-Dist: kneed>=0.8.1; extra == "extra"
52
+ Requires-Dist: matplotlib>=3.9; extra == "extra"
53
+ Requires-Dist: seaborn>=0.13; extra == "extra"
54
+ Requires-Dist: ipython-autotime>=0.3; extra == "extra"
55
+ Requires-Dist: ipywidgets>=8; extra == "extra"
56
+ Provides-Extra: tsne
57
+ Requires-Dist: sgtsnepi>=0.7; extra == "tsne"
58
+ Provides-Extra: test
59
+ Requires-Dist: pytest>=7.0; extra == "test"
60
+ Requires-Dist: pytest-cov>=4; extra == "test"
61
+ Requires-Dist: pytest-xdist>=3; extra == "test"
62
+ Requires-Dist: anndata>=0.12; extra == "test"
63
+ Requires-Dist: scikit-network>=0.33.1; extra == "test"
64
+ Requires-Dist: rdata>=1.1.0; extra == "test"
65
+ Requires-Dist: pydantic-ai-slim[openai]>=2.51.0; extra == "test"
66
+ Requires-Dist: sgtsnepi>=0.7; (sys_platform == "linux" and platform_machine == "x86_64") and extra == "test"
67
+ Provides-Extra: docs
68
+ Requires-Dist: mystmd>=1.11.0; extra == "docs"
69
+ Requires-Dist: jupytext>=1.19.6; extra == "docs"
70
+ Requires-Dist: ipykernel>=7.3.0; extra == "docs"
71
+ Requires-Dist: nbclient; extra == "docs"
72
+ Requires-Dist: myst-parser; extra == "docs"
73
+ Requires-Dist: sphinx; extra == "docs"
74
+ Requires-Dist: sphinx_autodoc_typehints; extra == "docs"
75
+ Requires-Dist: sphinx-book-theme; extra == "docs"
76
+ Requires-Dist: sphinx-copybutton; extra == "docs"
77
+ Requires-Dist: sgtsnepi>=0.7; (sys_platform == "linux" and platform_machine == "x86_64") and extra == "docs"
78
+ Dynamic: license-file
79
+
80
+ # CyteArc
81
+
82
+ <p align="left">
83
+ <a href="https://github.com/NygenAnalytics/CyteArc/actions/workflows/pytest.yml"><img src="https://github.com/NygenAnalytics/CyteArc/actions/workflows/pytest.yml/badge.svg" alt="Tests"></a>
84
+ <a href="https://codecov.io/gh/NygenAnalytics/CyteArc"><img src="https://codecov.io/gh/NygenAnalytics/CyteArc/graph/badge.svg" alt="Coverage"></a>
85
+ <a href="https://docs.nygen.io/CyteArc/"><img src="https://github.com/NygenAnalytics/CyteArc/actions/workflows/pages.yml/badge.svg" alt="Docs"></a>
86
+ <a href="https://pypi.org/project/cytearc"><img src="https://img.shields.io/pypi/v/cytearc.svg?color=4c72b0" alt="PyPI"></a>
87
+ <a href="https://pypi.org/project/cytearc"><img src="https://img.shields.io/badge/python-3.12%20%7C%203.13%20%7C%203.14-4c72b0.svg" alt="Python 3.12, 3.13, and 3.14"></a>
88
+ <a href="https://pepy.tech/projects/cytearc"><img src="https://static.pepy.tech/personalized-badge/cytearc?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads" alt="Downloads"></a>
89
+ </p>
90
+
91
+
92
+ CyteArc is a **fast Python framework for single-cell RNA, ATAC, protein, and multi-omic analysis that scales to 100M+ cells**. In benchmarks, it processed **one million cells within 15 minutes**, from cell filtering through UMAP and clustering to marker gene identification. On **Tahoe-100M**, the same workflow ran in **under 20 hours without any subsampling**.
93
+
94
+ [Cytebase](https://docs.nygen.io/CyteArc/tutorials/cytebase) is a **ready-to-connect repository of CyteArc datastores**, containing approximately **200 million cells and 1.1 TB of data** on [Hugging Face](https://huggingface.co/buckets/Nygen/cytebase). Mount remote datasets for reanalysis and build or reuse references for mapping new cells, without downloading the complete count matrix. Counts stay remote while you save your own results in a store you control.
95
+
96
+ CyteArc's **built-in provenance** connects saved results to the exact cells, features, parameters, and upstream computations that produced them, so you can reuse completed work and trace each analysis.
97
+
98
+ | Problem | How CyteArc solves it | What you get |
99
+ | :-- | :-- | :-- |
100
+ | Your **dataset is larger than RAM** | Out-of-core algorithms, and neighbour search streams from cell-major and gene-major layouts, inside a memory budget you set | Analyse the selected cells with [explicit memory controls](https://docs.nygen.io/CyteArc/concepts/memory-and-execution) |
101
+ | The **data is stored remotely** and requires downloading | Fetches only the chunks an operation touches, and writes results to a store you own | Start analysing immediately, with one authoritative copy |
102
+ | A **single parameter change costs hours** of computation | Each step is fingerprinted by its settings and inputs, so reuse is by content, not by layer name | Only what changed recomputes, and the old version stays for comparison |
103
+ | Sub-population analysis leaves **scattered copies that nobody can trace back** | Subsets are masks in one file, and every result carries the cells and parameters behind it | A year later, a result still explains itself |
104
+
105
+ ## Install
106
+
107
+ Python 3.12+.
108
+
109
+ ```bash
110
+ uv venv --python 3.12
111
+ uv pip install --python .venv "cytearc[extra]"
112
+ ```
113
+
114
+ Detailed installation instructions [here](https://docs.nygen.io/CyteArc/installation)
115
+
116
+ ## Quick start
117
+
118
+ ```python
119
+ import cytearc
120
+
121
+ ds = cytearc.DataStore(
122
+ "s3://bucket/cells.zarr", # also gs://, hf://, or a local path
123
+ )
124
+ run = ds.pipeline.run() # durable QC → graph → UMAP → clustering → marker run
125
+
126
+ ds.plots.embedding(
127
+ run=run,
128
+ layout="umap",
129
+ color_by="clusters",
130
+ )
131
+ ```
132
+
133
+ Read the [scRNA-seq tutorial](https://docs.nygen.io/CyteArc/tutorials/scrna-seq) for a granular workflow, or [remote stores](https://docs.nygen.io/CyteArc/tutorials/remote-stores) for cloud setups.
134
+
135
+ ## Cytebase
136
+
137
+ Cytebase provides a searchable catalog of public datasets stored as cloud-hosted CyteArc DataStores. Search by study, tissue, disease, or organism, then explore published cell annotations and available embeddings. Public access needs no credentials.
138
+
139
+ Install the Cytebase extra alongside the analysis extras:
140
+
141
+ ```bash
142
+ uv pip install --python .venv --prerelease allow "cytearc[cytebase,extra]"
143
+ ```
144
+
145
+ ```python
146
+ from cytearc import cytebase
147
+
148
+ catalog = cytebase.Catalog()
149
+ matches = catalog.search("kidney")
150
+ print(matches)
151
+
152
+ # Open one of the matching datasets for read-only exploration.
153
+ dataset_id = matches[0]["cytebase_id"]
154
+ ds = catalog.open_datastore(dataset_id)
155
+
156
+ # Create a writable local store for your own analysis, keeping counts remote.
157
+ analysis = catalog.mount_datastore(dataset_id, at="kidney_analysis.zarr")
158
+ ```
159
+
160
+ Use `analysis` with the pipeline shown above to save new results locally. Computation runs in your Python environment, reading count blocks over the network as needed.
161
+
162
+ Follow the [Cytebase tutorial](https://docs.nygen.io/CyteArc/tutorials/cytebase) for catalog filters, plotting, and example notebooks, or see the [Cytebase API reference](https://docs.nygen.io/CyteArc/api/cytebase.html).
163
+
164
+ ## Documentation
165
+
166
+ Read workflow vignettes and API references in the **[documentation](https://docs.nygen.io/CyteArc/)**.
167
+
168
+ ## CyteArc's capabilities
169
+
170
+ | Area | Methods |
171
+ | :-- | :-- |
172
+ | Modalities | scRNA-seq, scATAC-seq, CITE-seq, matched multi-omics |
173
+ | Core workflow | Quality control, feature selection, normalization, PCA and LSI, KNN graph, UMAP, densMAP, t-SNE (optional `tsne` extra), Leiden, Paris, marker search |
174
+ | Integration | Harmony, partial PCA, shared and weighted nearest neighbours, integration metrics |
175
+ | Mapping | Symphony-style reference mapping, label transfer, projection diagnostics |
176
+ | Trajectory | Population Balance Analysis pseudotime, expression dynamics and modules, multi-sink fate probabilities |
177
+ | Also included | Cell-cycle scoring, gene-set activity, graph-diffusion imputation, doublet scores, HTO demultiplexing, pseudobulk export |
178
+
179
+ ## Support
180
+
181
+ [GitHub issues](https://github.com/NygenAnalytics/CyteArc/issues)
182
+
183
+ CyteArc is open source software released under the [BSD 3-Clause License](LICENSE) and maintained by [Nygen](https://nygen.io).
@@ -0,0 +1,104 @@
1
+ # CyteArc
2
+
3
+ <p align="left">
4
+ <a href="https://github.com/NygenAnalytics/CyteArc/actions/workflows/pytest.yml"><img src="https://github.com/NygenAnalytics/CyteArc/actions/workflows/pytest.yml/badge.svg" alt="Tests"></a>
5
+ <a href="https://codecov.io/gh/NygenAnalytics/CyteArc"><img src="https://codecov.io/gh/NygenAnalytics/CyteArc/graph/badge.svg" alt="Coverage"></a>
6
+ <a href="https://docs.nygen.io/CyteArc/"><img src="https://github.com/NygenAnalytics/CyteArc/actions/workflows/pages.yml/badge.svg" alt="Docs"></a>
7
+ <a href="https://pypi.org/project/cytearc"><img src="https://img.shields.io/pypi/v/cytearc.svg?color=4c72b0" alt="PyPI"></a>
8
+ <a href="https://pypi.org/project/cytearc"><img src="https://img.shields.io/badge/python-3.12%20%7C%203.13%20%7C%203.14-4c72b0.svg" alt="Python 3.12, 3.13, and 3.14"></a>
9
+ <a href="https://pepy.tech/projects/cytearc"><img src="https://static.pepy.tech/personalized-badge/cytearc?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads" alt="Downloads"></a>
10
+ </p>
11
+
12
+
13
+ CyteArc is a **fast Python framework for single-cell RNA, ATAC, protein, and multi-omic analysis that scales to 100M+ cells**. In benchmarks, it processed **one million cells within 15 minutes**, from cell filtering through UMAP and clustering to marker gene identification. On **Tahoe-100M**, the same workflow ran in **under 20 hours without any subsampling**.
14
+
15
+ [Cytebase](https://docs.nygen.io/CyteArc/tutorials/cytebase) is a **ready-to-connect repository of CyteArc datastores**, containing approximately **200 million cells and 1.1 TB of data** on [Hugging Face](https://huggingface.co/buckets/Nygen/cytebase). Mount remote datasets for reanalysis and build or reuse references for mapping new cells, without downloading the complete count matrix. Counts stay remote while you save your own results in a store you control.
16
+
17
+ CyteArc's **built-in provenance** connects saved results to the exact cells, features, parameters, and upstream computations that produced them, so you can reuse completed work and trace each analysis.
18
+
19
+ | Problem | How CyteArc solves it | What you get |
20
+ | :-- | :-- | :-- |
21
+ | Your **dataset is larger than RAM** | Out-of-core algorithms, and neighbour search streams from cell-major and gene-major layouts, inside a memory budget you set | Analyse the selected cells with [explicit memory controls](https://docs.nygen.io/CyteArc/concepts/memory-and-execution) |
22
+ | The **data is stored remotely** and requires downloading | Fetches only the chunks an operation touches, and writes results to a store you own | Start analysing immediately, with one authoritative copy |
23
+ | A **single parameter change costs hours** of computation | Each step is fingerprinted by its settings and inputs, so reuse is by content, not by layer name | Only what changed recomputes, and the old version stays for comparison |
24
+ | Sub-population analysis leaves **scattered copies that nobody can trace back** | Subsets are masks in one file, and every result carries the cells and parameters behind it | A year later, a result still explains itself |
25
+
26
+ ## Install
27
+
28
+ Python 3.12+.
29
+
30
+ ```bash
31
+ uv venv --python 3.12
32
+ uv pip install --python .venv "cytearc[extra]"
33
+ ```
34
+
35
+ Detailed installation instructions [here](https://docs.nygen.io/CyteArc/installation)
36
+
37
+ ## Quick start
38
+
39
+ ```python
40
+ import cytearc
41
+
42
+ ds = cytearc.DataStore(
43
+ "s3://bucket/cells.zarr", # also gs://, hf://, or a local path
44
+ )
45
+ run = ds.pipeline.run() # durable QC → graph → UMAP → clustering → marker run
46
+
47
+ ds.plots.embedding(
48
+ run=run,
49
+ layout="umap",
50
+ color_by="clusters",
51
+ )
52
+ ```
53
+
54
+ Read the [scRNA-seq tutorial](https://docs.nygen.io/CyteArc/tutorials/scrna-seq) for a granular workflow, or [remote stores](https://docs.nygen.io/CyteArc/tutorials/remote-stores) for cloud setups.
55
+
56
+ ## Cytebase
57
+
58
+ Cytebase provides a searchable catalog of public datasets stored as cloud-hosted CyteArc DataStores. Search by study, tissue, disease, or organism, then explore published cell annotations and available embeddings. Public access needs no credentials.
59
+
60
+ Install the Cytebase extra alongside the analysis extras:
61
+
62
+ ```bash
63
+ uv pip install --python .venv --prerelease allow "cytearc[cytebase,extra]"
64
+ ```
65
+
66
+ ```python
67
+ from cytearc import cytebase
68
+
69
+ catalog = cytebase.Catalog()
70
+ matches = catalog.search("kidney")
71
+ print(matches)
72
+
73
+ # Open one of the matching datasets for read-only exploration.
74
+ dataset_id = matches[0]["cytebase_id"]
75
+ ds = catalog.open_datastore(dataset_id)
76
+
77
+ # Create a writable local store for your own analysis, keeping counts remote.
78
+ analysis = catalog.mount_datastore(dataset_id, at="kidney_analysis.zarr")
79
+ ```
80
+
81
+ Use `analysis` with the pipeline shown above to save new results locally. Computation runs in your Python environment, reading count blocks over the network as needed.
82
+
83
+ Follow the [Cytebase tutorial](https://docs.nygen.io/CyteArc/tutorials/cytebase) for catalog filters, plotting, and example notebooks, or see the [Cytebase API reference](https://docs.nygen.io/CyteArc/api/cytebase.html).
84
+
85
+ ## Documentation
86
+
87
+ Read workflow vignettes and API references in the **[documentation](https://docs.nygen.io/CyteArc/)**.
88
+
89
+ ## CyteArc's capabilities
90
+
91
+ | Area | Methods |
92
+ | :-- | :-- |
93
+ | Modalities | scRNA-seq, scATAC-seq, CITE-seq, matched multi-omics |
94
+ | Core workflow | Quality control, feature selection, normalization, PCA and LSI, KNN graph, UMAP, densMAP, t-SNE (optional `tsne` extra), Leiden, Paris, marker search |
95
+ | Integration | Harmony, partial PCA, shared and weighted nearest neighbours, integration metrics |
96
+ | Mapping | Symphony-style reference mapping, label transfer, projection diagnostics |
97
+ | Trajectory | Population Balance Analysis pseudotime, expression dynamics and modules, multi-sink fate probabilities |
98
+ | Also included | Cell-cycle scoring, gene-set activity, graph-diffusion imputation, doublet scores, HTO demultiplexing, pseudobulk export |
99
+
100
+ ## Support
101
+
102
+ [GitHub issues](https://github.com/NygenAnalytics/CyteArc/issues)
103
+
104
+ CyteArc is open source software released under the [BSD 3-Clause License](LICENSE) and maintained by [Nygen](https://nygen.io).
@@ -0,0 +1,200 @@
1
+ import warnings as _warnings
2
+ from collections.abc import Callable as _Callable
3
+ from importlib.metadata import PackageNotFoundError as _PackageNotFoundError
4
+ from importlib.metadata import version as _distribution_version
5
+ from pathlib import Path as _Path
6
+ from re import search as _re_search
7
+ from typing import TYPE_CHECKING
8
+
9
+ from ._facade import lazy_facade as _lazy_facade
10
+
11
+ if TYPE_CHECKING:
12
+ from . import cytebase as cytebase
13
+ from .datastore.datastore import DataStore as DataStore
14
+ from .datastore.pipeline_run import (
15
+ PipelineExecutionError as PipelineExecutionError,
16
+ PipelineRun as PipelineRun,
17
+ )
18
+ from .datastore.summary import DataStoreSummary as DataStoreSummary
19
+ from .storage.lineage import ArtifactLineage as ArtifactLineage
20
+ from .features.enrichment import (
21
+ EnrichmentResult as EnrichmentResult,
22
+ read_gmt as read_gmt,
23
+ )
24
+ from .mapping.models import (
25
+ LabelTransferResult as LabelTransferResult,
26
+ MappingResult as MappingResult,
27
+ )
28
+ from .mapping.reference import MappingReference as MappingReference
29
+ from .storage.artifacts import ArtifactStatus as ArtifactStatus
30
+ from .storage.errors import ArtifactResolutionError as ArtifactResolutionError
31
+ from .storage.refs import ArtifactRef as ArtifactRef
32
+ from .storage.stores import load_zarr as load_zarr
33
+ from .merge import (
34
+ DataStoreMerge as DataStoreMerge,
35
+ )
36
+ from .readers import (
37
+ CSVReader as CSVReader,
38
+ CrDirReader as CrDirReader,
39
+ CrH5Reader as CrH5Reader,
40
+ CrReader as CrReader,
41
+ H5adInspectResult as H5adInspectResult,
42
+ H5adReader as H5adReader,
43
+ MtxReader as MtxReader,
44
+ SeuratInspectResult as SeuratInspectResult,
45
+ SeuratReader as SeuratReader,
46
+ inspect_h5ad as inspect_h5ad,
47
+ inspect_mtx as inspect_mtx,
48
+ inspect_seurat as inspect_seurat,
49
+ )
50
+ from .trajectory.results import (
51
+ FateMappingResult as FateMappingResult,
52
+ PseudotimeAggregationResult as PseudotimeAggregationResult,
53
+ PseudotimeMarkerResult as PseudotimeMarkerResult,
54
+ PseudotimeScoreResult as PseudotimeScoreResult,
55
+ )
56
+ from .utils import (
57
+ clean_array as clean_array,
58
+ configure_output as configure_output,
59
+ controlled_compute as controlled_compute,
60
+ logger as logger,
61
+ permute_into_chunks as permute_into_chunks,
62
+ rescale_array as rescale_array,
63
+ rolling_window as rolling_window,
64
+ set_verbosity as set_verbosity,
65
+ compute_with_progress as compute_with_progress,
66
+ tqdmbar as tqdmbar,
67
+ tqdm_params as tqdm_params,
68
+ )
69
+ from .writers import (
70
+ CSVtoZarr as CSVtoZarr,
71
+ CrToZarr as CrToZarr,
72
+ H5adImportResult as H5adImportResult,
73
+ H5adToZarr as H5adToZarr,
74
+ MtxToZarr as MtxToZarr,
75
+ SeuratImportResult as SeuratImportResult,
76
+ SeuratToZarr as SeuratToZarr,
77
+ SparseToZarr as SparseToZarr,
78
+ SubsetZarr as SubsetZarr,
79
+ create_zarr_count_assay as create_zarr_count_assay,
80
+ create_zarr_dataset as create_zarr_dataset,
81
+ create_zarr_obj_array as create_zarr_obj_array,
82
+ chunked_to_zarr as chunked_to_zarr,
83
+ subset_assay_zarr as subset_assay_zarr,
84
+ to_h5ad as to_h5ad,
85
+ to_mtx as to_mtx,
86
+ write_renorm_subset_to_zarr as write_renorm_subset_to_zarr,
87
+ )
88
+
89
+ _warnings.filterwarnings(
90
+ "ignore",
91
+ message=r"The data type .* does not have a Zarr V3 specification\.",
92
+ module=r"zarr\.core\.dtype\..*",
93
+ )
94
+
95
+
96
+ def _resolve_version(
97
+ distribution_version: _Callable[[str], str] = _distribution_version,
98
+ version_path: _Path | None = None,
99
+ ) -> str:
100
+ try:
101
+ return distribution_version("cytearc")
102
+ except _PackageNotFoundError:
103
+ path = version_path or _Path(__file__).with_name("_version.py")
104
+ if not path.is_file():
105
+ return "unavailable"
106
+ match = _re_search(
107
+ r"\bversion\s*=\s*['\"]([^'\"]+)['\"]",
108
+ path.read_text(encoding="utf-8"),
109
+ )
110
+ return match.group(1) if match else "unavailable"
111
+
112
+
113
+ __version__ = _resolve_version()
114
+
115
+ _LAZY_EXPORTS: dict[str, str] = {
116
+ "ArtifactLineage": ".storage.lineage",
117
+ "ArtifactRef": ".storage.refs",
118
+ "ArtifactResolutionError": ".storage.errors",
119
+ "ArtifactStatus": ".storage.artifacts",
120
+ "CSVReader": ".readers",
121
+ "CSVtoZarr": ".writers",
122
+ "CrDirReader": ".readers",
123
+ "CrH5Reader": ".readers",
124
+ "CrReader": ".readers",
125
+ "CrToZarr": ".writers",
126
+ "DataStore": ".datastore.datastore",
127
+ "DataStoreSummary": ".datastore.summary",
128
+ "DataStoreMerge": ".merge",
129
+ "EnrichmentResult": ".features.enrichment",
130
+ "FateMappingResult": ".trajectory.results",
131
+ "H5adInspectResult": ".readers",
132
+ "H5adImportResult": ".writers",
133
+ "H5adReader": ".readers",
134
+ "H5adToZarr": ".writers",
135
+ "MtxReader": ".readers",
136
+ "MtxToZarr": ".writers",
137
+ "SeuratImportResult": ".writers",
138
+ "SeuratInspectResult": ".readers",
139
+ "SeuratReader": ".readers",
140
+ "SeuratToZarr": ".writers",
141
+ "LabelTransferResult": ".mapping.models",
142
+ "MappingReference": ".mapping.reference",
143
+ "MappingResult": ".mapping.models",
144
+ "mount_datastore": ".datastore.datastore",
145
+ "PseudotimeAggregationResult": ".trajectory.results",
146
+ "PseudotimeMarkerResult": ".trajectory.results",
147
+ "PseudotimeScoreResult": ".trajectory.results",
148
+ "PipelineExecutionError": ".datastore.pipeline_run",
149
+ "PipelineRun": ".datastore.pipeline_run",
150
+ "SparseToZarr": ".writers",
151
+ "SubsetZarr": ".writers",
152
+ "clean_array": ".utils",
153
+ "configure_output": ".utils",
154
+ "controlled_compute": ".utils",
155
+ "create_zarr_count_assay": ".writers",
156
+ "create_zarr_dataset": ".writers",
157
+ "create_zarr_obj_array": ".writers",
158
+ "chunked_to_zarr": ".writers",
159
+ "inspect_h5ad": ".readers",
160
+ "inspect_mtx": ".readers",
161
+ "inspect_seurat": ".readers",
162
+ "load_zarr": ".storage.stores",
163
+ "logger": ".utils",
164
+ "permute_into_chunks": ".utils",
165
+ "read_gmt": ".features.enrichment",
166
+ "rescale_array": ".utils",
167
+ "rolling_window": ".utils",
168
+ "set_verbosity": ".utils",
169
+ "compute_with_progress": ".utils",
170
+ "subset_assay_zarr": ".writers",
171
+ "to_h5ad": ".writers",
172
+ "to_mtx": ".writers",
173
+ "tqdmbar": ".utils",
174
+ "tqdm_params": ".utils",
175
+ "write_renorm_subset_to_zarr": ".writers",
176
+ }
177
+
178
+ __all__ = list(_LAZY_EXPORTS)
179
+
180
+ __getattr__, __dir__ = _lazy_facade(
181
+ __name__,
182
+ _LAZY_EXPORTS,
183
+ modules=(
184
+ "assay",
185
+ "cytebase",
186
+ "datastore",
187
+ "embeddings",
188
+ "features",
189
+ "mapping",
190
+ "matrix",
191
+ "merge",
192
+ "metadata",
193
+ "metrics",
194
+ "quality_control",
195
+ "readers",
196
+ "storage",
197
+ "utils",
198
+ "writers",
199
+ ),
200
+ )