exprmat 0.1.41__tar.gz → 0.1.42__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 (217) hide show
  1. {exprmat-0.1.41 → exprmat-0.1.42}/PKG-INFO +1 -1
  2. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/ansi.py +6 -4
  3. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/linear.py +3 -1
  4. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/qc.py +4 -4
  5. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/reader/experiment.py +44 -10
  6. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/reader/matcher.py +4 -4
  7. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/reader/static.py +5 -0
  8. exprmat-0.1.42/exprmat/reduction/diffmap.py +73 -0
  9. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/reduction/plot.py +8 -2
  10. {exprmat-0.1.41 → exprmat-0.1.42}/pyproject.toml +1 -1
  11. {exprmat-0.1.41 → exprmat-0.1.42}/Cargo.lock +0 -0
  12. {exprmat-0.1.41 → exprmat-0.1.42}/Cargo.toml +0 -0
  13. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/__init__.py +0 -0
  14. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/clustering/__init__.py +0 -0
  15. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/clustering/cnmf.py +0 -0
  16. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/clustering/dbscan.py +0 -0
  17. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/clustering/kmeans.py +0 -0
  18. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/clustering/leiden.py +0 -0
  19. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/clustering/nmf.py +0 -0
  20. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/clustering/rogue.py +0 -0
  21. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/clustering/seriation.py +0 -0
  22. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/clustering/spectral.py +0 -0
  23. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/clustering/utils.py +0 -0
  24. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/cnv/__init__.py +0 -0
  25. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/cnv/cnvscore.py +0 -0
  26. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/cnv/infercnv.py +0 -0
  27. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/configuration.py +0 -0
  28. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/data/__init__.py +0 -0
  29. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/data/cistarget.py +0 -0
  30. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/data/cre.py +0 -0
  31. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/data/finders.py +0 -0
  32. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/data/geneset.py +0 -0
  33. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/data/io.py +0 -0
  34. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/data/lr.py +0 -0
  35. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/data/presets.py +0 -0
  36. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/data/signature.py +0 -0
  37. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/data/tf.py +0 -0
  38. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/descriptive/__init__.py +0 -0
  39. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/descriptive/aggregate.py +0 -0
  40. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/descriptive/atac.py +0 -0
  41. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/descriptive/aucell.py +0 -0
  42. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/descriptive/de.py +0 -0
  43. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/descriptive/gse.py +0 -0
  44. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/descriptive/kde.py +0 -0
  45. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/descriptive/recovery.py +0 -0
  46. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/descriptive/summary.py +0 -0
  47. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/descriptive/tcr.py +0 -0
  48. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/deseq/dataset.py +0 -0
  49. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/deseq/gridsearch.py +0 -0
  50. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/deseq/inference.py +0 -0
  51. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/deseq/preprocessing.py +0 -0
  52. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/deseq/stats.py +0 -0
  53. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/deseq/utils.py +0 -0
  54. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/dynamics/__init__.py +0 -0
  55. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/dynamics/generank.py +0 -0
  56. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/dynamics/linreg.py +0 -0
  57. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/dynamics/moments.py +0 -0
  58. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/dynamics/optimization.py +0 -0
  59. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/dynamics/parallel.py +0 -0
  60. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/dynamics/preprocess.py +0 -0
  61. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/dynamics/pseudotime.py +0 -0
  62. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/dynamics/transition.py +0 -0
  63. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/dynamics/utils.py +0 -0
  64. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/dynamics/velocity.py +0 -0
  65. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/grn/__init__.py +0 -0
  66. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/grn/infergrn.py +0 -0
  67. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/grn/modules.py +0 -0
  68. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/grn/prune.py +0 -0
  69. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/grn/regressors.py +0 -0
  70. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/grn/utils.py +0 -0
  71. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/image/__init__.py +0 -0
  72. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/image/align.py +0 -0
  73. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/lr/__init__.py +0 -0
  74. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/lr/aggregate.py +0 -0
  75. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/lr/method.py +0 -0
  76. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/lr/methods/__init__.py +0 -0
  77. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/lr/methods/cellchat.py +0 -0
  78. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/lr/methods/cellphonedb.py +0 -0
  79. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/lr/methods/connectome.py +0 -0
  80. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/lr/methods/geomean.py +0 -0
  81. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/lr/methods/logfc.py +0 -0
  82. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/lr/methods/natmi.py +0 -0
  83. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/lr/methods/rank_aggregate.py +0 -0
  84. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/lr/methods/scseqcomm.py +0 -0
  85. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/lr/methods/singlecellsignalr.py +0 -0
  86. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/lr/pipeline.py +0 -0
  87. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/lr/preprocess.py +0 -0
  88. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/lr/resources.py +0 -0
  89. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/lr/utils.py +0 -0
  90. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/peaks/__init__.py +0 -0
  91. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/peaks/callpeak.py +0 -0
  92. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/peaks/common.py +0 -0
  93. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/peaks/coverage.py +0 -0
  94. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/peaks/footprint.py +0 -0
  95. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/peaks/idr/__init__.py +0 -0
  96. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/peaks/idr/constants.py +0 -0
  97. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/peaks/idr/idr.py +0 -0
  98. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/peaks/idr/invcdf.pyx +0 -0
  99. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/peaks/idr/optimization.py +0 -0
  100. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/peaks/idr/utils.py +0 -0
  101. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/peaks/linkage.py +0 -0
  102. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/peaks/motif.py +0 -0
  103. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/peaks/sequence.py +0 -0
  104. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/__init__.py +0 -0
  105. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/atac.py +0 -0
  106. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/cnmf.py +0 -0
  107. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/cnv.py +0 -0
  108. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/A.pk +0 -0
  109. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/B.pk +0 -0
  110. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/C.pk +0 -0
  111. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/D.pk +0 -0
  112. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/E.pk +0 -0
  113. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/F.pk +0 -0
  114. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/G.pk +0 -0
  115. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/H.pk +0 -0
  116. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/I.pk +0 -0
  117. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/J.pk +0 -0
  118. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/K.pk +0 -0
  119. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/L.pk +0 -0
  120. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/M.pk +0 -0
  121. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/N.pk +0 -0
  122. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/O.pk +0 -0
  123. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/P.pk +0 -0
  124. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/Q.pk +0 -0
  125. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/R.pk +0 -0
  126. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/S.pk +0 -0
  127. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/T.pk +0 -0
  128. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/U.pk +0 -0
  129. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/V.pk +0 -0
  130. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/W.pk +0 -0
  131. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/X.pk +0 -0
  132. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/Y.pk +0 -0
  133. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/data/Z.pk +0 -0
  134. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/de.py +0 -0
  135. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/expression.py +0 -0
  136. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/gse.py +0 -0
  137. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/lr.py +0 -0
  138. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/palettes.py +0 -0
  139. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/sankey.py +0 -0
  140. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/sequence.py +0 -0
  141. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/summary.py +0 -0
  142. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/track.py +0 -0
  143. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/utils.py +0 -0
  144. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/plotting/velocity.py +0 -0
  145. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/__init__.py +0 -0
  146. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/doublets/__init__.py +0 -0
  147. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/doublets/composite.py +0 -0
  148. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/doublets/scrublet.py +0 -0
  149. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/emptydrops.py +0 -0
  150. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/filter.py +0 -0
  151. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/impute/__init__.py +0 -0
  152. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/impute/magic.py +0 -0
  153. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/integrate.py +0 -0
  154. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/normal.py +0 -0
  155. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/plot.py +0 -0
  156. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/sctransform/__init__.py +0 -0
  157. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/sctransform/estimate.py +0 -0
  158. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/sctransform/ksmooth.py +0 -0
  159. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/sctransform/residual.py +0 -0
  160. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/sctransform/transform.py +0 -0
  161. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/sparse.py +0 -0
  162. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/preprocessing/uniform.py +0 -0
  163. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/reader/__init__.py +0 -0
  164. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/reader/conversions.py +0 -0
  165. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/reader/metadata.py +0 -0
  166. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/reader/spatial.py +0 -0
  167. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/reader/updater.py +0 -0
  168. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/reduction/__init__.py +0 -0
  169. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/reduction/forceatlas.py +0 -0
  170. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/reduction/mde.py +0 -0
  171. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/reduction/nn.py +0 -0
  172. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/reduction/outliers.py +0 -0
  173. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/reduction/pca.py +0 -0
  174. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/reduction/scvi.py +0 -0
  175. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/reduction/spectral.py +0 -0
  176. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/reduction/tsne.py +0 -0
  177. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/reduction/umap.py +0 -0
  178. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/trajectory/pcurve.py +0 -0
  179. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/transfer/__init__.py +0 -0
  180. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/transfer/atlas.py +0 -0
  181. {exprmat-0.1.41 → exprmat-0.1.42}/exprmat/utils.py +0 -0
  182. {exprmat-0.1.41 → exprmat-0.1.42}/license +0 -0
  183. {exprmat-0.1.41 → exprmat-0.1.42}/readme.md +0 -0
  184. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2/Cargo.toml +0 -0
  185. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2/license +0 -0
  186. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2/readme +0 -0
  187. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2/src/call_peaks.rs +0 -0
  188. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2/src/embedding.rs +0 -0
  189. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2/src/export.rs +0 -0
  190. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2/src/knn.rs +0 -0
  191. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2/src/lib.rs +0 -0
  192. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2/src/motif.rs +0 -0
  193. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2/src/network.rs +0 -0
  194. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2/src/preprocessing.rs +0 -0
  195. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2/src/utils/anndata.rs +0 -0
  196. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2/src/utils.rs +0 -0
  197. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/Cargo.toml +0 -0
  198. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/src/embedding.rs +0 -0
  199. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/src/export.rs +0 -0
  200. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/src/feature_count/counter.rs +0 -0
  201. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/src/feature_count/data_iter.rs +0 -0
  202. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/src/feature_count/matrix.rs +0 -0
  203. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/src/feature_count/mod.rs +0 -0
  204. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/src/genome.rs +0 -0
  205. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/src/lib.rs +0 -0
  206. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/src/motif.rs +0 -0
  207. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/src/network.rs +0 -0
  208. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/src/preprocessing/bam/flagstat.rs +0 -0
  209. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/src/preprocessing/bam/header.rs +0 -0
  210. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/src/preprocessing/bam/mark_duplicates.rs +0 -0
  211. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/src/preprocessing/bam.rs +0 -0
  212. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/src/preprocessing/import.rs +0 -0
  213. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/src/preprocessing/mod.rs +0 -0
  214. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/src/preprocessing/qc.rs +0 -0
  215. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/src/utils/knn.rs +0 -0
  216. {exprmat-0.1.41 → exprmat-0.1.42}/snapatac2-core/src/utils/mod.rs +0 -0
  217. {exprmat-0.1.41 → exprmat-0.1.42}/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.41
3
+ Version: 0.1.42
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -1,6 +1,7 @@
1
1
 
2
2
  import re
3
3
  import os
4
+ import sys
4
5
 
5
6
  from functools import partial
6
7
  from tqdm import tqdm
@@ -91,12 +92,12 @@ def common_length(string: str, limit: int) -> str:
91
92
  return x_str
92
93
 
93
94
  elif len(string) + cn_length > limit:
94
- x_str = string[-(limit - 4):]
95
+ x_str = string[-(limit - 3):]
95
96
  cn = len(re.findall(cn_re, x_str))
96
- while cn + len(x_str) > limit - 4:
97
+ while cn + len(x_str) > limit - 3:
97
98
  x_str = x_str[1:]
98
99
  cn = len(re.findall(cn_re, x_str))
99
- return '... ' + x_str
100
+ return '.. ' + x_str
100
101
 
101
102
  else: return ('{:<' + str(limit - cn_length) + '}').format(string)
102
103
 
@@ -161,7 +162,8 @@ def cyan(x): return '\033[36m' + x + '\033[0m'
161
162
  progress_styles = {
162
163
  'ncols': 80,
163
164
  'ascii': '-━',
164
- 'bar_format': ' {bar} {desc:20} {n:5d} / {total:<5d} ({elapsed} < {remaining})'
165
+ 'bar_format': ' {bar} {desc:20} {n:5d} / {total:<5d} ({elapsed} < {remaining})',
166
+ 'file': sys.stderr
165
167
  }
166
168
 
167
169
  pprog = partial(tqdm, **progress_styles)
@@ -68,7 +68,9 @@ def normalize_total(
68
68
  if target_total is None:
69
69
  target_total = np.mean(tots_use)
70
70
 
71
- b = np.array(float(target_total) / tots_use.T)[0]
71
+ b = np.array(float(target_total) / tots_use.T)
72
+ if len(b.shape) == 2: b = b[0]
73
+
72
74
  if not sp.issparse(E):
73
75
  # this will densify the matrix, causing incredibly large memory comsumption
74
76
  # when treating with an sparse matrix.
@@ -129,9 +129,9 @@ def rna_qc(
129
129
  elif outlier_mode == 'tukey':
130
130
  umi_lower, umi_upper = tukey(adata.obs['n.umi'].to_numpy(), n = outlier_n)
131
131
  elif isinstance(outlier_mode, int):
132
- umi_lower, umi_upper = 200, 100000
132
+ umi_lower, umi_upper = 200, 2147483646
133
133
  max_genes = outlier_mode
134
- else: umi_lower, umi_upper = 200, 100000
134
+ else: umi_lower, umi_upper = 200, 2147483646
135
135
 
136
136
  f_obs = \
137
137
  (adata.obs['n.umi'] <= umi_upper) & \
@@ -152,10 +152,10 @@ def rna_qc(
152
152
 
153
153
  doublet_failed = False
154
154
  if doublet_method == 'scrublet':
155
- try:
155
+ # try:
156
156
  scrublet_init(subset, random_state = 42)
157
157
  scrublet(subset)
158
- except: doublet_failed = True
158
+ # except: doublet_failed = True
159
159
 
160
160
  adata.obs['filter'] = f_obs
161
161
  adata.obs['score.doublet'] = 0.0
@@ -25,11 +25,11 @@ import os
25
25
  from exprmat.reader.metadata import metadata, load_metadata
26
26
  from exprmat.data.finders import get_genome
27
27
  from exprmat.reader.matcher import (
28
- read_mtx_rna, read_h5ad_rna, read_table_rna,
28
+ read_mtx_rna, read_h5ad_rna, read_table_rna, read_h5_rna,
29
29
  parse_tcr_10x, attach_splice_reads_mtx, attach_splice_reads_loom
30
30
  )
31
31
  from exprmat.reader.matcher import attach_tcr
32
- from exprmat.ansi import warning, info, error, red, green
32
+ from exprmat.ansi import warning, info, error, red, green, pprog
33
33
  from exprmat import config as cfg
34
34
  import exprmat.reader.static as st
35
35
  import exprmat as em
@@ -96,21 +96,41 @@ class experiment:
96
96
  # we automatically infer from the given location names to select
97
97
  # the correct way of loading samples:
98
98
 
99
- if i_loc.endswith('.tsv.gz') or i_loc.endswith('.csv.gz') or \
100
- i_loc.endswith('.tsv') or i_loc.endswith('.csv'):
99
+ if i_loc.endswith('.tsv.gz') or i_loc.endswith('.tsv'):
101
100
 
102
101
  self.modalities['rna'][i_sample] = read_table_rna(
103
102
  src = i_loc, metadata = meta, sample = i_sample,
104
- raw = False, default_taxa = i_taxa, eccentric = eccentric
103
+ raw = False, default_taxa = i_taxa, eccentric = eccentric, sep = '\t'
104
+ )
105
+
106
+ elif i_loc.endswith('.csv.gz') or i_loc.endswith('.csv'):
107
+
108
+ self.modalities['rna'][i_sample] = read_table_rna(
109
+ src = i_loc, metadata = meta, sample = i_sample,
110
+ raw = False, default_taxa = i_taxa, eccentric = eccentric, sep = ','
111
+ )
112
+
113
+ elif i_loc.endswith('.ssv.gz') or i_loc.endswith('.ssv'):
114
+
115
+ self.modalities['rna'][i_sample] = read_table_rna(
116
+ src = i_loc, metadata = meta, sample = i_sample,
117
+ raw = False, default_taxa = i_taxa, eccentric = eccentric, sep = ' '
105
118
  )
106
119
 
107
- elif i_loc.endswith('.h5') or i_loc.endswith('.h5ad'):
120
+ elif i_loc.endswith('.h5ad'):
108
121
 
109
122
  self.modalities['rna'][i_sample] = read_h5ad_rna(
110
123
  src = i_loc, metadata = meta, sample = i_sample,
111
124
  raw = False, default_taxa = i_taxa
112
125
  )
113
126
 
127
+ elif i_loc.endswith('.h5'):
128
+
129
+ self.modalities['rna'][i_sample] = read_h5_rna(
130
+ src = i_loc, metadata = meta, sample = i_sample,
131
+ raw = False, default_taxa = i_taxa, eccentric = eccentric
132
+ )
133
+
114
134
  else:
115
135
  self.modalities['rna'][i_sample] = read_mtx_rna(
116
136
  src = i_loc, prefix = '', metadata = meta, sample = i_sample,
@@ -1441,6 +1461,9 @@ class experiment:
1441
1461
 
1442
1462
  def run_rna_umap(self, run_on_samples = False, **kwargs):
1443
1463
  self.do_for_rna(run_on_samples, st.rna_umap, **kwargs)
1464
+
1465
+ def run_rna_diffmap(self, run_on_samples = False, **kwargs):
1466
+ self.do_for_rna(run_on_samples, st.rna_diffmap, **kwargs)
1444
1467
 
1445
1468
  def run_rna_mde(self, run_on_samples = False, **kwargs):
1446
1469
  self.do_for_rna(run_on_samples, st.rna_mde, **kwargs)
@@ -2299,7 +2322,7 @@ class experiment:
2299
2322
 
2300
2323
  def __repr__(self):
2301
2324
 
2302
- from exprmat.ansi import green, cyan, red, yellow
2325
+ from exprmat.ansi import green, cyan, red, yellow, common_length
2303
2326
 
2304
2327
  def print_anndata(adata: ad.AnnData):
2305
2328
  print(yellow('annotated data'), 'of size', adata.n_obs, '×', adata.n_vars)
@@ -2383,6 +2406,7 @@ class experiment:
2383
2406
  print(red('[*]'), 'composed of samples:')
2384
2407
  len_mod = 2
2385
2408
  len_batch = 2
2409
+ len_sample = 2
2386
2410
 
2387
2411
  for i_loc, i_sample, i_batch, i_grp, i_mod, i_taxa in zip(
2388
2412
  self.metadata.dataframe['location'],
@@ -2394,6 +2418,10 @@ class experiment:
2394
2418
  ):
2395
2419
  if len(i_mod) > len_mod: len_mod = len(i_mod)
2396
2420
  if len(i_batch) > len_batch: len_batch = len(i_batch)
2421
+ if len(i_sample) > len_sample: len_sample = len(i_sample)
2422
+
2423
+ if len_batch > 30: len_batch = 30
2424
+ if len_sample > 30: len_sample = 30
2397
2425
 
2398
2426
  for i_loc, i_sample, i_batch, i_grp, i_mod, i_taxa in zip(
2399
2427
  self.metadata.dataframe['location'],
@@ -2413,8 +2441,12 @@ class experiment:
2413
2441
  p_sample = i_sample if len(i_sample) < 30 else i_sample[:27] + ' ..'
2414
2442
  p_batch = i_batch if len(i_batch) < 30 else i_batch[:27] + ' ..'
2415
2443
  print(
2416
- f' {p_sample:30}', cyan(f'{i_mod:13}'), yellow(f'{i_taxa:4}'),
2417
- f'batch {green(f"{p_batch:12}")}',
2444
+ ' ',
2445
+ common_length(i_sample, len_sample), ' ',
2446
+ cyan(common_length(i_mod, len_mod)),
2447
+ yellow(f'{i_taxa:4}'), ' ',
2448
+ f'batch {green(common_length(i_batch, len_batch))}', ' ',
2449
+ 'of size',
2418
2450
  red('dataset not loaded') if not loaded else
2419
2451
  f'{green(str(self.modalities[i_mod][i_sample].n_obs))} × ' +
2420
2452
  f'{yellow(str(self.modalities[i_mod][i_sample].n_vars))}'
@@ -2454,12 +2486,14 @@ def load_experiment(direc, load_samples = True, load_subset = None):
2454
2486
  version = update(meta, direc, version)
2455
2487
 
2456
2488
  meta.dataframe = meta.dataframe.loc[
2457
- ['.' in x for x in meta.dataframe['modality']], :
2489
+ ['.' not in x for x in meta.dataframe['modality']], :
2458
2490
  ].copy()
2459
2491
 
2460
2492
  modalities = {}
2461
2493
  if load_samples:
2494
+ prog = pprog(desc = 'loading samples', total = len(meta.dataframe['sample']))
2462
2495
  for modal, samp in zip(meta.dataframe['modality'], meta.dataframe['sample']):
2496
+ prog.update()
2463
2497
  if '.' in modal: continue
2464
2498
  attempt = os.path.join(direc, modal, samp + '.h5ad')
2465
2499
  if os.path.exists(attempt):
@@ -310,7 +310,7 @@ def read_mtx_rna(
310
310
 
311
311
 
312
312
  def read_h5_rna(
313
- path: str,
313
+ src: str,
314
314
  metadata: metadata, sample: str, raw: bool = False,
315
315
  default_taxa = 'mmu', eccentric = None, suppress_filter = False,
316
316
  ):
@@ -318,7 +318,7 @@ def read_h5_rna(
318
318
  warnings.filterwarnings('ignore')
319
319
 
320
320
  adata = sc.read_10x_h5(
321
- path, gex_only = True
321
+ src, gex_only = True
322
322
  )
323
323
 
324
324
  adata.var_names = adata.var['gene_ids'].tolist()
@@ -346,7 +346,7 @@ def read_h5_rna(
346
346
  def read_table_rna(
347
347
  src: str,
348
348
  metadata: metadata, sample: str, raw: bool = False,
349
- default_taxa = 'mmu', eccentric = None
349
+ default_taxa = 'mmu', eccentric = None, sep = '\t'
350
350
  ):
351
351
  '''
352
352
  Read from compressed or plain text tables.
@@ -374,7 +374,7 @@ def read_table_rna(
374
374
 
375
375
  # in csv/tsv texts, genes are rows and cells are columns.
376
376
  adata = sc.read_text(
377
- src, delimiter = '\t', first_column_names = True, dtype = 'float32'
377
+ src, delimiter = sep, first_column_names = True, dtype = 'float32'
378
378
  ).T
379
379
 
380
380
  if eccentric is not None:
@@ -233,6 +233,11 @@ def rna_umap(adata, sample_name, **kwargs):
233
233
  run_umap(adata, **kwargs)
234
234
 
235
235
 
236
+ def rna_diffmap(adata, sample_name, **kwargs):
237
+ from exprmat.reduction.diffmap import run_diffmap
238
+ run_diffmap(adata, **kwargs)
239
+
240
+
236
241
  def rna_mde(adata, sample_name, data = 'pca', key_added = 'mde', **kwargs):
237
242
  from exprmat.reduction.mde import mde
238
243
  emb = mde(adata.obsm[data], **kwargs)
@@ -0,0 +1,73 @@
1
+
2
+
3
+ def run_diffmap(
4
+ adata, *, neighbors_key = None, key_added = 'diffmap',
5
+ n_comps = 3, sort = 'decrease', density_normalize = True,
6
+ use_gpu = False
7
+ ):
8
+
9
+ if use_gpu:
10
+
11
+ import cupy as cp
12
+ from cupyx.scipy import sparse
13
+ from cupyx.scipy.sparse import linalg
14
+ from scipy.sparse import issparse
15
+
16
+ if neighbors_key:
17
+ connectivities = adata.obsp[adata.uns[neighbors_key]['connectivities_key']]
18
+ else: connectivities = adata.obsp["connectivities"]
19
+
20
+ if issparse(connectivities):
21
+ W = sparse.csr_matrix(connectivities, dtype = cp.float32)
22
+ else: W = cp.asarray(connectivities)
23
+
24
+ if density_normalize:
25
+ # q[i] is an estimate for the sampling density at point i
26
+ # it's also the degree of the underlying graph
27
+ q = cp.asarray(W.sum(axis=0))
28
+ if not sparse.issparse(W): Q = cp.diag(1.0 / q)
29
+ else: Q = sparse.spdiags(1.0 / q, 0, W.shape[0], W.shape[0])
30
+ K = Q @ W @ Q
31
+
32
+ else: K = W
33
+
34
+ # z[i] is the square root of the row sum of K
35
+ z = cp.sqrt(cp.asarray(K.sum(axis=0)))
36
+
37
+ if not sparse.issparse(K): Z = cp.diag(1.0 / z)
38
+ else: Z = sparse.spdiags(1.0 / z, 0, K.shape[0], K.shape[0])
39
+ matrix = Z @ K @ Z
40
+
41
+ if n_comps == 0: evals, evecs = linalg.eigsh(matrix)
42
+
43
+ else:
44
+ n_comps = min(matrix.shape[0] - 1, n_comps)
45
+ # ncv = max(2 * n_comps + 1, int(np.sqrt(matrix.shape[0])))
46
+ ncv = None
47
+ which = "LM" if sort == "decrease" else "SM"
48
+ # it pays off to increase the stability with a bit more precision
49
+ matrix = matrix.astype(cp.float64)
50
+ evals, evecs = linalg.eigsh(matrix, k=n_comps, which=which, ncv=ncv)
51
+ evals, evecs = evals.astype(cp.float32), evecs.astype(cp.float32)
52
+
53
+ if sort == "decrease":
54
+ evals = evals[::-1]
55
+ evecs = evecs[:, ::-1]
56
+
57
+ adata.uns[key_added] = evals.get()
58
+ adata.obsm[key_added] = evecs.get()
59
+ del W, Q, Z, K, evals, evecs, matrix, z
60
+
61
+ else:
62
+
63
+ import scanpy as sc
64
+ sc.tl.diffmap(
65
+ adata, n_comps = n_comps,
66
+ neighbors_key = neighbors_key
67
+ )
68
+
69
+ adata.obsm[key_added] = adata.obsm['X_diffmap']
70
+ del adata.obsm['X_diffmap']
71
+
72
+ adata.uns[key_added] = adata.uns['diffmap_evals']
73
+ del adata.uns['diffmap_evals']
@@ -58,6 +58,7 @@ class index_object_handler:
58
58
 
59
59
  def embedding_atlas(
60
60
  adata, basis, color,
61
+ embedding_dims = [0, 1],
61
62
  hue_order = None,
62
63
  title = None, figsize = (4, 4), ax = None,
63
64
  cmap = 'turbo', cmap_reverse = False, cmap_lower = '#000000',
@@ -76,6 +77,10 @@ def embedding_atlas(
76
77
 
77
78
  cvs = ds.Canvas(plot_width = int(figsize[0] * dpi * res_factor), plot_height = int(figsize[1] * dpi * res_factor))
78
79
  embedding = adata.obsm[basis]
80
+ if isinstance(embedding, pd.DataFrame):
81
+ embedding = embedding.iloc[:, embedding_dims].copy()
82
+ else: embedding = embedding[:, embedding_dims].copy()
83
+
79
84
  df = pd.DataFrame(embedding, columns=['x', 'y'])
80
85
 
81
86
  if color in adata.obs.columns:
@@ -287,7 +292,7 @@ def embedding_atlas(
287
292
 
288
293
  def embedding(
289
294
  adata, basis, color,
290
- slot = 'X',
295
+ slot = 'X', embedding_dims = [0, 1],
291
296
 
292
297
  # query plotting options
293
298
  ptsize = 8,
@@ -343,7 +348,8 @@ def embedding(
343
348
  embedding = basis.data
344
349
  elif isinstance(basis, np.matrix) or isinstance(basis, np.ndarray):
345
350
  embedding = basis
346
-
351
+
352
+ embedding = embedding[:, embedding_dims].copy()
347
353
  df = pd.DataFrame(embedding, columns = ['x', 'y'])
348
354
 
349
355
  if color in adata.obs.columns:
@@ -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.41"
23
+ version = "0.1.42"
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