exprmat 0.1.46__tar.gz → 0.1.47__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. {exprmat-0.1.46 → exprmat-0.1.47}/PKG-INFO +1 -1
  2. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/clustering/nmf.py +2 -0
  3. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/clustering/seriation.py +2 -2
  4. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/cnmf.py +2 -0
  5. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reader/experiment.py +17 -1
  6. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reader/static.py +64 -0
  7. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reduction/mde.py +10 -3
  8. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reduction/plot.py +20 -18
  9. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/trajectory/trace.py +1 -0
  10. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/transfer/atlas.py +90 -19
  11. {exprmat-0.1.46 → exprmat-0.1.47}/pyproject.toml +1 -1
  12. {exprmat-0.1.46 → exprmat-0.1.47}/Cargo.lock +0 -0
  13. {exprmat-0.1.46 → exprmat-0.1.47}/Cargo.toml +0 -0
  14. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/__init__.py +0 -0
  15. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/ansi.py +0 -0
  16. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/clustering/__init__.py +0 -0
  17. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/clustering/cnmf.py +0 -0
  18. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/clustering/dbscan.py +0 -0
  19. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/clustering/kmeans.py +0 -0
  20. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/clustering/leiden.py +0 -0
  21. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/clustering/rogue.py +0 -0
  22. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/clustering/spectral.py +0 -0
  23. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/clustering/utils.py +0 -0
  24. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/cnv/__init__.py +0 -0
  25. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/cnv/cnvscore.py +0 -0
  26. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/cnv/infercnv.py +0 -0
  27. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/configuration.py +0 -0
  28. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/data/__init__.py +0 -0
  29. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/data/cistarget.py +0 -0
  30. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/data/cre.py +0 -0
  31. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/data/finders.py +0 -0
  32. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/data/geneset.py +0 -0
  33. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/data/io.py +0 -0
  34. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/data/lr.py +0 -0
  35. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/data/presets.py +0 -0
  36. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/data/signature.py +0 -0
  37. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/data/tf.py +0 -0
  38. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/descriptive/__init__.py +0 -0
  39. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/descriptive/aggregate.py +0 -0
  40. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/descriptive/atac.py +0 -0
  41. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/descriptive/aucell.py +0 -0
  42. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/descriptive/de.py +0 -0
  43. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/descriptive/gse.py +0 -0
  44. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/descriptive/kde.py +0 -0
  45. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/descriptive/recovery.py +0 -0
  46. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/descriptive/summary.py +0 -0
  47. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/descriptive/tcr.py +0 -0
  48. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/deseq/dataset.py +0 -0
  49. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/deseq/gridsearch.py +0 -0
  50. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/deseq/inference.py +0 -0
  51. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/deseq/preprocessing.py +0 -0
  52. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/deseq/stats.py +0 -0
  53. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/deseq/utils.py +0 -0
  54. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/dynamics/__init__.py +0 -0
  55. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/dynamics/generank.py +0 -0
  56. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/dynamics/linreg.py +0 -0
  57. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/dynamics/moments.py +0 -0
  58. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/dynamics/optimization.py +0 -0
  59. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/dynamics/parallel.py +0 -0
  60. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/dynamics/preprocess.py +0 -0
  61. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/dynamics/pseudotime.py +0 -0
  62. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/dynamics/transition.py +0 -0
  63. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/dynamics/utils.py +0 -0
  64. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/dynamics/velocity.py +0 -0
  65. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/grn/__init__.py +0 -0
  66. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/grn/infergrn.py +0 -0
  67. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/grn/modules.py +0 -0
  68. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/grn/prune.py +0 -0
  69. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/grn/regressors.py +0 -0
  70. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/grn/utils.py +0 -0
  71. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/image/__init__.py +0 -0
  72. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/image/align.py +0 -0
  73. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/lr/__init__.py +0 -0
  74. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/lr/aggregate.py +0 -0
  75. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/lr/method.py +0 -0
  76. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/lr/methods/__init__.py +0 -0
  77. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/lr/methods/cellchat.py +0 -0
  78. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/lr/methods/cellphonedb.py +0 -0
  79. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/lr/methods/connectome.py +0 -0
  80. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/lr/methods/geomean.py +0 -0
  81. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/lr/methods/logfc.py +0 -0
  82. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/lr/methods/natmi.py +0 -0
  83. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/lr/methods/rank_aggregate.py +0 -0
  84. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/lr/methods/scseqcomm.py +0 -0
  85. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/lr/methods/singlecellsignalr.py +0 -0
  86. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/lr/pipeline.py +0 -0
  87. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/lr/preprocess.py +0 -0
  88. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/lr/resources.py +0 -0
  89. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/lr/utils.py +0 -0
  90. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/metacell/__init__.py +0 -0
  91. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/metacell/engine.py +0 -0
  92. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/metacell/model.py +0 -0
  93. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/metacell/utils.py +0 -0
  94. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/peaks/__init__.py +0 -0
  95. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/peaks/callpeak.py +0 -0
  96. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/peaks/common.py +0 -0
  97. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/peaks/coverage.py +0 -0
  98. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/peaks/footprint.py +0 -0
  99. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/peaks/idr/__init__.py +0 -0
  100. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/peaks/idr/constants.py +0 -0
  101. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/peaks/idr/idr.py +0 -0
  102. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/peaks/idr/invcdf.pyx +0 -0
  103. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/peaks/idr/optimization.py +0 -0
  104. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/peaks/idr/utils.py +0 -0
  105. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/peaks/linkage.py +0 -0
  106. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/peaks/motif.py +0 -0
  107. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/peaks/sequence.py +0 -0
  108. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/__init__.py +0 -0
  109. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/atac.py +0 -0
  110. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/cnv.py +0 -0
  111. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/A.pk +0 -0
  112. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/B.pk +0 -0
  113. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/C.pk +0 -0
  114. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/D.pk +0 -0
  115. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/E.pk +0 -0
  116. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/F.pk +0 -0
  117. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/G.pk +0 -0
  118. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/H.pk +0 -0
  119. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/I.pk +0 -0
  120. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/J.pk +0 -0
  121. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/K.pk +0 -0
  122. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/L.pk +0 -0
  123. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/M.pk +0 -0
  124. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/N.pk +0 -0
  125. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/O.pk +0 -0
  126. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/P.pk +0 -0
  127. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/Q.pk +0 -0
  128. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/R.pk +0 -0
  129. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/S.pk +0 -0
  130. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/T.pk +0 -0
  131. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/U.pk +0 -0
  132. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/V.pk +0 -0
  133. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/W.pk +0 -0
  134. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/X.pk +0 -0
  135. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/Y.pk +0 -0
  136. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/data/Z.pk +0 -0
  137. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/de.py +0 -0
  138. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/expression.py +0 -0
  139. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/gse.py +0 -0
  140. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/lr.py +0 -0
  141. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/milestone.py +0 -0
  142. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/palettes.py +0 -0
  143. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/sankey.py +0 -0
  144. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/sequence.py +0 -0
  145. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/summary.py +0 -0
  146. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/track.py +0 -0
  147. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/trajectory.py +0 -0
  148. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/utils.py +0 -0
  149. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/plotting/velocity.py +0 -0
  150. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/__init__.py +0 -0
  151. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/doublets/__init__.py +0 -0
  152. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/doublets/composite.py +0 -0
  153. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/doublets/scrublet.py +0 -0
  154. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/emptydrops.py +0 -0
  155. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/filter.py +0 -0
  156. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/impute/__init__.py +0 -0
  157. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/impute/magic.py +0 -0
  158. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/integrate.py +0 -0
  159. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/linear.py +0 -0
  160. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/normal.py +0 -0
  161. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/plot.py +0 -0
  162. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/qc.py +0 -0
  163. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/sctransform/__init__.py +0 -0
  164. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/sctransform/estimate.py +0 -0
  165. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/sctransform/ksmooth.py +0 -0
  166. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/sctransform/residual.py +0 -0
  167. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/sctransform/transform.py +0 -0
  168. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/sparse.py +0 -0
  169. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/preprocessing/uniform.py +0 -0
  170. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reader/__init__.py +0 -0
  171. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reader/conversions.py +0 -0
  172. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reader/matcher.py +0 -0
  173. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reader/metadata.py +0 -0
  174. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reader/spatial.py +0 -0
  175. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reader/updater.py +0 -0
  176. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reduction/__init__.py +0 -0
  177. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reduction/diffmap.py +0 -0
  178. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reduction/forceatlas.py +0 -0
  179. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reduction/nn.py +0 -0
  180. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reduction/outliers.py +0 -0
  181. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reduction/pca.py +0 -0
  182. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reduction/scvi.py +0 -0
  183. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reduction/spectral.py +0 -0
  184. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reduction/tsne.py +0 -0
  185. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/reduction/umap.py +0 -0
  186. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/trajectory/__init__.py +0 -0
  187. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/trajectory/elpi.py +0 -0
  188. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/trajectory/pcurve.py +0 -0
  189. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/trajectory/pseudotime.py +0 -0
  190. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/trajectory/root.py +0 -0
  191. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/transfer/__init__.py +0 -0
  192. {exprmat-0.1.46 → exprmat-0.1.47}/exprmat/utils.py +0 -0
  193. {exprmat-0.1.46 → exprmat-0.1.47}/license +0 -0
  194. {exprmat-0.1.46 → exprmat-0.1.47}/readme.md +0 -0
  195. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2/Cargo.toml +0 -0
  196. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2/license +0 -0
  197. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2/readme +0 -0
  198. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2/src/call_peaks.rs +0 -0
  199. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2/src/embedding.rs +0 -0
  200. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2/src/export.rs +0 -0
  201. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2/src/knn.rs +0 -0
  202. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2/src/lib.rs +0 -0
  203. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2/src/motif.rs +0 -0
  204. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2/src/network.rs +0 -0
  205. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2/src/preprocessing.rs +0 -0
  206. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2/src/utils/anndata.rs +0 -0
  207. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2/src/utils.rs +0 -0
  208. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/Cargo.toml +0 -0
  209. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/embedding.rs +0 -0
  210. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/export.rs +0 -0
  211. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/feature_count/counter.rs +0 -0
  212. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/feature_count/data_iter.rs +0 -0
  213. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/feature_count/matrix.rs +0 -0
  214. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/feature_count/mod.rs +0 -0
  215. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/genome.rs +0 -0
  216. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/lib.rs +0 -0
  217. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/motif.rs +0 -0
  218. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/network.rs +0 -0
  219. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/preprocessing/bam/flagstat.rs +0 -0
  220. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/preprocessing/bam/header.rs +0 -0
  221. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/preprocessing/bam/mark_duplicates.rs +0 -0
  222. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/preprocessing/bam.rs +0 -0
  223. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/preprocessing/import.rs +0 -0
  224. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/preprocessing/mod.rs +0 -0
  225. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/preprocessing/qc.rs +0 -0
  226. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/utils/knn.rs +0 -0
  227. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/utils/mod.rs +0 -0
  228. {exprmat-0.1.46 → exprmat-0.1.47}/snapatac2-core/src/utils/similarity.rs +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: exprmat
3
- Version: 0.1.46
3
+ Version: 0.1.47
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -2,6 +2,7 @@
2
2
  from scipy.cluster.hierarchy import cophenet, single
3
3
  from scipy.spatial.distance import pdist, squareform
4
4
  from sklearn.decomposition import non_negative_factorization
5
+ import numpy as np
5
6
 
6
7
 
7
8
  def nmf(
@@ -12,6 +13,7 @@ def nmf(
12
13
  random_state = 42, verbose = 0, shuffle = False
13
14
  ):
14
15
 
16
+ matrix[np.isnan(matrix)] = 0
15
17
  w, h, n = non_negative_factorization(
16
18
  matrix, W, H, n_components = n_comps,
17
19
  init = init,
@@ -33,7 +33,7 @@ def seriation(Z, N, cur_index):
33
33
 
34
34
  def serial_matrix(dist, method = "ward", seed = 42):
35
35
  '''
36
- Compute_serial_matrix transforms a distance matrix into a sorted distance matrix
36
+ Transforms a distance matrix into a sorted distance matrix
37
37
  according to the order implied by the hierarchical tree (dendrogram).
38
38
 
39
39
  Parameters
@@ -55,7 +55,7 @@ def serial_matrix(dist, method = "ward", seed = 42):
55
55
 
56
56
  N = len(dist)
57
57
  flat_dist_mat = squareform(dist)
58
- res_linkage = linkage(flat_dist_mat, method = method,preserve_input = True)
58
+ res_linkage = linkage(flat_dist_mat, method = method, preserve_input = True)
59
59
  res_order = seriation(res_linkage, N, N + N-2)
60
60
  seriated_dist = np.zeros((N,N))
61
61
  a,b = np.triu_indices(N, k = 1)
@@ -73,6 +73,7 @@ def cnmf_distance_usages(
73
73
  elif annotations in adata.obsm.keys():
74
74
  annotations = adata[subset, :][order, :].obsm[annotations]
75
75
 
76
+ print(indices)
76
77
  return matrix_plot(
77
78
  serial, labels = indices, annotations = annotations, cmap_annotations = cmap_annotations,
78
79
  cmap = cmap, figsize = figsize, dpi = dpi, show_indices = show_indices,
@@ -103,6 +104,7 @@ def cnmf_distance_modules(
103
104
  elif annotations in adata.varm.keys():
104
105
  annotations = adata[:, subset][:, order].varm[annotations]
105
106
 
107
+ print(indices)
106
108
  return matrix_plot(
107
109
  serial, labels = indices, annotations = annotations, cmap_annotations = cmap_annotations,
108
110
  cmap = cmap, figsize = figsize, dpi = dpi, show_indices = show_indices, legend_cols = legend_cols
@@ -41,7 +41,7 @@ class experiment:
41
41
  dump = '.', subset = None,
42
42
  version = em.SPECIFICATION
43
43
  ):
44
- # TODO: we support rna only at present.
44
+
45
45
  table = meta.dataframe.to_dict(orient = 'list')
46
46
  self.mudata = mudata
47
47
  self.modalities = modalities
@@ -1694,6 +1694,19 @@ class experiment:
1694
1694
  self.modalities['rna'][props['sample']] = mc
1695
1695
 
1696
1696
 
1697
+ def run_rna_construct_atlas(self, run_on_samples = False, **kwargs):
1698
+ self.do_for_rna(
1699
+ run_on_samples, st.rna_construct_atlas,
1700
+ expm_dir = self.directory,
1701
+ expm_subset = self.subset,
1702
+ **kwargs
1703
+ )
1704
+
1705
+
1706
+ def run_rna_project(self, run_on_samples = False, **kwargs):
1707
+ self.do_for_rna(run_on_samples, st.rna_project, **kwargs)
1708
+
1709
+
1697
1710
  def run_atac_make_bins(self, run_on_samples = False, **kwargs):
1698
1711
  # bins can be made directly from bedgraph files if there is no alignment bam provided.
1699
1712
  # thus these samples can be used for clustering.
@@ -1998,6 +2011,9 @@ class experiment:
1998
2011
  def plot_rna_kde(self, run_on_samples = False, **kwargs):
1999
2012
  return self.plot_for_rna(run_on_samples, st.rna_plot_kde, **kwargs)
2000
2013
 
2014
+ def plot_rna_projection(self, run_on_samples = False, **kwargs):
2015
+ return self.plot_for_rna(run_on_samples, st.rna_plot_projection, **kwargs)
2016
+
2001
2017
  def plot_rna_proportion(self, run_on_samples = False, **kwargs):
2002
2018
  return self.plot_for_rna(run_on_samples, st.rna_plot_proportion, **kwargs)
2003
2019
 
@@ -1015,6 +1015,22 @@ def rna_metacell(
1015
1015
  return metacell[0]
1016
1016
 
1017
1017
 
1018
+ def rna_construct_atlas(
1019
+ adata, sample_names, expm_dir, expm_subset, **kwargs
1020
+ ):
1021
+ from exprmat.transfer.atlas import construct_atlas
1022
+ if sample_names != 'integrated':
1023
+ expm_dir = os.path.join(expm_dir, 'rna')
1024
+ expm_subset = sample_names
1025
+ construct_atlas(adata, expm_dir, expm_subset, **kwargs)
1026
+
1027
+
1028
+ def rna_project(
1029
+ adata, sample_names, **kwargs
1030
+ ):
1031
+ from exprmat.transfer.atlas import project
1032
+ project(expm = adata, **kwargs)
1033
+
1018
1034
  def atac_filter_cells(
1019
1035
  adata, sample_name, min_counts = 5000, max_counts = 100000,
1020
1036
  min_tsse = 10, max_tsse = 100
@@ -1713,6 +1729,54 @@ def rna_plot_kde(
1713
1729
  return fig
1714
1730
 
1715
1731
 
1732
+ def rna_plot_projection(
1733
+ # query projection
1734
+ adata, sample_name, color,
1735
+ figsize = (3, 3), dpi = 100, projection_key = 'projection',
1736
+
1737
+ # atlas background
1738
+ background = 'annotation',
1739
+ annotate = True, annotate_fontsize = 9,
1740
+ **kwargs
1741
+ ):
1742
+ from exprmat.reduction.plot import embedding
1743
+ import matplotlib.pyplot as plt
1744
+ import warnings
1745
+ warnings.filterwarnings('ignore')
1746
+
1747
+ fig, axes = plt.subplots(1, 1, dpi = dpi, figsize = figsize)
1748
+
1749
+ from scipy.sparse import csr_matrix
1750
+ tab = adata.uns[projection_key]
1751
+ nbg = len(tab)
1752
+ bg = ad.AnnData(csr_matrix((nbg, 2)))
1753
+ bg.obs['annotation'] = tab['annotation'].tolist()
1754
+ bg.obs['batch'] = tab['batch'].tolist()
1755
+ bg.obs['annotation'] = bg.obs['annotation'].astype('category')
1756
+ bg.obs['batch'] = bg.obs['batch'].astype('category')
1757
+ bg.obsm['basis'] = tab[['xf', 'yf']].copy().values
1758
+
1759
+ embedding(
1760
+ bg, basis = 'basis', color = background,
1761
+ default_color = '#eeeeee', ptsize = 8,
1762
+ annotate = annotate, annotate_style = 'text',
1763
+ legend = False, contour_plot = False,
1764
+ annotate_fontsize = annotate_fontsize,
1765
+ annotate_only = None,
1766
+ cmap = None, add_outline = True, outline_color = '#777777',
1767
+ ax = axes, dpi = dpi,
1768
+ sample_name = sample_name
1769
+ )
1770
+
1771
+ embedding(
1772
+ adata, basis = projection_key, color = color,
1773
+ ax = axes, dpi = dpi,
1774
+ sample_name = sample_name, **kwargs
1775
+ )
1776
+
1777
+ return fig
1778
+
1779
+
1716
1780
  def rna_plot_dot(
1717
1781
  adata, sample_name, figsize, dpi,
1718
1782
  var_names, groupby, *, log = False,
@@ -63,7 +63,10 @@ def mde(
63
63
 
64
64
 
65
65
  def mde_fit(
66
- data, fit, fit_mask, device = None, **kwargs
66
+ data, fit, fit_mask, device = None,
67
+ eps: float = 0.00001, max_iter: int = 300, memory_size: int = 10,
68
+ verbose = False,
69
+ **kwargs
67
70
  ):
68
71
 
69
72
  try: import pymde
@@ -90,8 +93,12 @@ def mde_fit(
90
93
  torch.nonzero(torch.tensor(fit_mask)).squeeze(),
91
94
  torch.tensor(fitting, dtype = torch.float)
92
95
  ),
93
- verbose = True
94
- ).embed(verbose = True)
96
+ verbose = verbose
97
+ ).embed(
98
+ verbose = verbose,
99
+ eps = eps, max_iter = max_iter,
100
+ memory_size = memory_size
101
+ )
95
102
 
96
103
  if isinstance(emb, torch.Tensor):
97
104
  emb = emb.cpu().numpy()
@@ -301,7 +301,7 @@ def embedding(
301
301
  legend = True,
302
302
 
303
303
  # contour plotting option.
304
- contour_plot = True,
304
+ contour_plot = False,
305
305
  contour_fill = False,
306
306
  contour_mask = None,
307
307
  contour_mask_values = [],
@@ -426,22 +426,6 @@ def embedding(
426
426
  hue_order = hue_order if default_palette is not None else None
427
427
  )
428
428
 
429
- if contour_plot:
430
-
431
- cx = atlas_data['x']
432
- cy = atlas_data['y']
433
- if contour_mask is not None:
434
- cx = [y for x, y in zip(adata.obs[contour_mask], cx) if x in contour_mask_values]
435
- cy = [y for x, y in zip(adata.obs[contour_mask], cy) if x in contour_mask_values]
436
-
437
- sb.kdeplot(
438
- x = cx, y = cy, warn_singular = False,
439
- linewidths = contour_linewidth, bw_adjust = contour_bw, bw_method = 'scott',
440
- fill = contour_fill, ax = axes,
441
- palette = None, color = contour_default_color, alpha = contour_alpha,
442
- levels = contour_levels, legend = False
443
- )
444
-
445
429
  if legend:
446
430
  assert len(adata.uns[f'{color}.colors']) == len(hue_order)
447
431
  dummy_objects = []
@@ -492,6 +476,7 @@ def embedding(
492
476
  axes.add_artist(text)
493
477
  pass
494
478
 
479
+
495
480
  elif type(labels[0]) is bool:
496
481
 
497
482
  sb.scatterplot(
@@ -546,7 +531,24 @@ def embedding(
546
531
 
547
532
  else:
548
533
  warning('color label must be categorical (string) or numerical.')
549
- return None
534
+ return
535
+
536
+
537
+ if contour_plot:
538
+
539
+ cx = atlas_data['x']
540
+ cy = atlas_data['y']
541
+ if contour_mask is not None:
542
+ cx = [y for x, y in zip(adata.obs[contour_mask], cx) if x in contour_mask_values]
543
+ cy = [y for x, y in zip(adata.obs[contour_mask], cy) if x in contour_mask_values]
544
+
545
+ sb.kdeplot(
546
+ x = cx, y = cy, warn_singular = False,
547
+ linewidths = contour_linewidth, bw_adjust = contour_bw, bw_method = 'scott',
548
+ fill = contour_fill, ax = axes,
549
+ palette = None, color = contour_default_color, alpha = contour_alpha,
550
+ levels = contour_levels, legend = False
551
+ )
550
552
 
551
553
  def format_coord(x, y): return f"x = {x:.2f}, y = {y:.2f}"
552
554
  axes.format_coord = format_coord
@@ -86,6 +86,7 @@ def binned_statistics(sorted_pstime, trajectory_key = 'ppt', statistic = 'mean',
86
86
 
87
87
  X = sorted_pstime.X.T
88
88
  if issparse(X): X = X.todense()
89
+ X = np.array(X)
89
90
  minx = sorted_pstime.obs[f'{trajectory_key}.pseudotime'].min()
90
91
  maxx = sorted_pstime.obs[f'{trajectory_key}.pseudotime'].max()
91
92
 
@@ -8,7 +8,9 @@ from exprmat.reader.experiment import experiment
8
8
 
9
9
 
10
10
  def construct_atlas(
11
- expm: experiment,
11
+ adata,
12
+ expm_dir,
13
+ expm_subset,
12
14
  key_counts = 'counts',
13
15
  key_batch = 'batch',
14
16
  hvg = 'hvg',
@@ -119,14 +121,14 @@ def construct_atlas(
119
121
  warnings.filterwarnings('ignore')
120
122
  torch.set_float32_matmul_precision('high')
121
123
 
122
- atlas = expm.mudata['rna']
123
- savename = expm.subset if expm.subset is not None else 'integrated'
124
- path = os.path.join(expm.directory, 'scvi', savename)
125
- scanvipath = os.path.join(expm.directory, 'scanvi', savename)
124
+ atlas = adata
125
+ savename = expm_subset if expm_subset is not None else 'integrated'
126
+ path = os.path.join(expm_dir, 'scvi', savename)
127
+ scanvipath = os.path.join(expm_dir, 'scanvi', savename)
126
128
 
127
129
  if os.path.exists(path):
128
130
  error('the destination path `scvi/{savename}` is already occupied.')
129
- else: os.makedirs(os.path.join(expm.directory, 'scvi'), exist_ok = True)
131
+ else: os.makedirs(os.path.join(expm_dir, 'scvi'), exist_ok = True)
130
132
 
131
133
 
132
134
  # extract count matrix.
@@ -234,32 +236,30 @@ def construct_atlas(
234
236
  info(f'trained scanvi model saved.')
235
237
  scanvi_model.save(scanvipath)
236
238
  info(f'saving metadata of atlas as a light version.')
237
- metadata.write_h5ad(os.path.join(expm.directory, 'scvi', savename, 'metadata.h5ad'))
239
+ metadata.write_h5ad(os.path.join(expm_dir, 'scvi', savename, 'metadata.h5ad'))
238
240
  warnings.filterwarnings('default')
239
241
 
240
242
 
241
- def is_atlas(expm: experiment):
243
+ def is_atlas(adata):
242
244
 
243
- expm.check_merged('rna')
244
-
245
- if 'atlas' not in expm.mudata['rna'].uns.keys():
245
+ if 'atlas' not in adata.uns.keys():
246
246
  warning(f'do not contain an `atlas` key in uns slot. build atlas first.')
247
247
  return False
248
248
 
249
- atlas = expm.mudata['rna'].uns['atlas']
250
- if atlas['batch'] not in expm.mudata['rna'].obs.keys():
249
+ atlas = adata.uns['atlas']
250
+ if atlas['batch'] not in adata.obs.keys():
251
251
  warning(f'`{atlas["batch"]}` do not exist.')
252
252
  return False
253
253
 
254
- if atlas['annotation'] not in expm.mudata['rna'].obs.keys():
254
+ if atlas['annotation'] not in adata.obs.keys():
255
255
  warning(f'`{atlas["annotation"]}` do not exist.')
256
256
  return False
257
257
 
258
- if atlas['scvi'] not in expm.mudata['rna'].obsm.keys():
258
+ if atlas['scvi'] not in adata.obsm.keys():
259
259
  warning(f'`{atlas["scvi"]}` do not exist.')
260
260
  return False
261
261
 
262
- if atlas['scanvi'] not in expm.mudata['rna'].obsm.keys():
262
+ if atlas['scanvi'] not in adata.obsm.keys():
263
263
  warning(f'`{atlas["scanvi"]}` do not exist.')
264
264
  return False
265
265
 
@@ -268,7 +268,7 @@ def is_atlas(expm: experiment):
268
268
 
269
269
  def embed(
270
270
  atlas: experiment,
271
- expm: experiment,
271
+ expm,
272
272
 
273
273
  counts_key = 'counts',
274
274
  batch_key = 'batch',
@@ -281,7 +281,7 @@ def embed(
281
281
  import scvi
282
282
  import anndata
283
283
 
284
- input = expm.mudata['rna']
284
+ input = expm
285
285
  query = anndata.AnnData(
286
286
  X = input.X.copy() if counts_key is None
287
287
  else input.layers[counts_key].copy()
@@ -326,4 +326,75 @@ def embed(
326
326
  query.obs[predict_labels] = query_model.predict()
327
327
  input.obs[predict_labels] = query.obs[predict_labels]
328
328
 
329
- return query
329
+ return query
330
+
331
+
332
+ def project(
333
+ atlas: experiment,
334
+ expm,
335
+
336
+ atlas_modality = 'rna',
337
+ atlas_embedding = 'umap',
338
+ counts_key = 'counts',
339
+ batch_key = 'batch',
340
+ key_query_latent = 'scanvi',
341
+ scanvi_unlabel = 'unknown',
342
+ scvi_epoch_reduction = 3,
343
+ predict_labels = 'annot',
344
+ key_added = 'projection',
345
+
346
+ re_embed = False,
347
+ **kwargs
348
+ ):
349
+
350
+ data_meta = atlas[atlas_modality].obs[[
351
+ atlas[atlas_modality].uns['atlas']['batch'],
352
+ atlas[atlas_modality].uns['atlas']['annotation']
353
+ ]].copy()
354
+ data_meta.columns = ['batch', 'annotation']
355
+
356
+ embed(
357
+ atlas = atlas,
358
+ expm = expm,
359
+ counts_key = counts_key,
360
+ batch_key = batch_key,
361
+ key_query_latent = key_query_latent,
362
+ scanvi_unlabel = scanvi_unlabel,
363
+ scvi_epoch_reduction = scvi_epoch_reduction,
364
+ predict_labels = predict_labels
365
+ )
366
+
367
+ # copy metadata from atlas to expm.
368
+
369
+ atlas.check_merged(atlas_modality)
370
+ atlas = atlas[atlas_modality]
371
+ expm = expm
372
+
373
+ data = atlas.obsm[atlas_embedding]
374
+
375
+ data_meta['x'] = data[:, 0]
376
+ data_meta['y'] = data[:, 1]
377
+
378
+ import pandas as pd
379
+ if isinstance(data, pd.DataFrame): data = data.values
380
+ if not isinstance(data, np.ndarray): data = np.array(data)
381
+ assert data.shape[1] == 2
382
+
383
+ n_cells = expm.n_obs
384
+ n_ref = atlas.n_obs
385
+
386
+ scanvi_atlas = atlas.obsm[atlas.uns['atlas']['scanvi']]
387
+ scanvi_expm = expm.obsm[key_query_latent]
388
+
389
+ merged_latent = np.concat([scanvi_atlas, scanvi_expm], axis = 0)
390
+ merged_embed = np.concat([data, np.zeros(shape = (n_cells, 2))], axis = 0)
391
+ mask = np.array([True] * n_ref + [False] * n_cells)
392
+
393
+ from exprmat.reduction.mde import mde_fit, mde
394
+ if not re_embed: emb = mde_fit(merged_latent, merged_embed, mask, **kwargs)
395
+ else: emb = mde(merged_latent, **kwargs)
396
+
397
+ expm.obsm[key_added] = emb[~mask, :]
398
+ data_meta['xf'] = emb[mask, 0]
399
+ data_meta['yf'] = emb[mask, 1]
400
+ expm.uns[key_added] = data_meta
@@ -20,7 +20,7 @@ description = "exprmat: Routines for expression matrices"
20
20
  readme = "readme.md"
21
21
  license = {file = "license"}
22
22
  requires-python = ">=3.9, <3.13"
23
- version = "0.1.46"
23
+ version = "0.1.47"
24
24
  authors = [
25
25
  {name = "Zheng Yang", email = "xornent@outlook.com"}
26
26
  ]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes