exprmat 0.1.39__tar.gz → 0.1.41__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 (218) hide show
  1. {exprmat-0.1.39 → exprmat-0.1.41}/PKG-INFO +17 -3
  2. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/__init__.py +7 -5
  3. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/ansi.py +5 -0
  4. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/clustering/leiden.py +26 -8
  5. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/configuration.py +3 -5
  6. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/data/finders.py +1 -1
  7. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/data/geneset.py +1 -1
  8. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/lr/utils.py +0 -1
  9. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/peaks/motif.py +1 -1
  10. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/peaks/sequence.py +1 -1
  11. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/cnmf.py +11 -11
  12. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/cnv.py +3 -2
  13. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/gse.py +4 -3
  14. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/lr.py +3 -2
  15. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/palettes.py +81 -10
  16. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/sankey.py +2 -4
  17. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/track.py +3 -3
  18. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/utils.py +2 -1
  19. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/velocity.py +2 -1
  20. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/filter.py +7 -2
  21. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/linear.py +18 -3
  22. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/qc.py +1 -1
  23. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/reader/conversions.py +1 -1
  24. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/reader/experiment.py +76 -16
  25. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/reader/matcher.py +1 -1
  26. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/reader/static.py +77 -8
  27. exprmat-0.1.41/exprmat/reader/updater.py +111 -0
  28. exprmat-0.1.41/exprmat/reduction/__init__.py +234 -0
  29. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/reduction/mde.py +16 -9
  30. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/reduction/plot.py +2 -3
  31. exprmat-0.1.41/exprmat/reduction/scvi.py +83 -0
  32. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/utils.py +75 -4
  33. {exprmat-0.1.39 → exprmat-0.1.41}/pyproject.toml +26 -4
  34. exprmat-0.1.39/exprmat/reader/updater.py +0 -83
  35. exprmat-0.1.39/exprmat/reduction/__init__.py +0 -137
  36. {exprmat-0.1.39 → exprmat-0.1.41}/Cargo.lock +0 -0
  37. {exprmat-0.1.39 → exprmat-0.1.41}/Cargo.toml +0 -0
  38. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/clustering/__init__.py +0 -0
  39. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/clustering/cnmf.py +0 -0
  40. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/clustering/dbscan.py +0 -0
  41. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/clustering/kmeans.py +0 -0
  42. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/clustering/nmf.py +0 -0
  43. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/clustering/rogue.py +0 -0
  44. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/clustering/seriation.py +0 -0
  45. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/clustering/spectral.py +0 -0
  46. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/clustering/utils.py +0 -0
  47. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/cnv/__init__.py +0 -0
  48. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/cnv/cnvscore.py +0 -0
  49. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/cnv/infercnv.py +0 -0
  50. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/data/__init__.py +0 -0
  51. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/data/cistarget.py +0 -0
  52. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/data/cre.py +0 -0
  53. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/data/io.py +0 -0
  54. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/data/lr.py +0 -0
  55. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/data/presets.py +0 -0
  56. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/data/signature.py +0 -0
  57. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/data/tf.py +0 -0
  58. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/descriptive/__init__.py +0 -0
  59. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/descriptive/aggregate.py +0 -0
  60. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/descriptive/atac.py +0 -0
  61. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/descriptive/aucell.py +0 -0
  62. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/descriptive/de.py +0 -0
  63. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/descriptive/gse.py +0 -0
  64. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/descriptive/kde.py +0 -0
  65. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/descriptive/recovery.py +0 -0
  66. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/descriptive/summary.py +0 -0
  67. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/descriptive/tcr.py +0 -0
  68. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/deseq/dataset.py +0 -0
  69. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/deseq/gridsearch.py +0 -0
  70. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/deseq/inference.py +0 -0
  71. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/deseq/preprocessing.py +0 -0
  72. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/deseq/stats.py +0 -0
  73. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/deseq/utils.py +0 -0
  74. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/dynamics/__init__.py +0 -0
  75. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/dynamics/generank.py +0 -0
  76. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/dynamics/linreg.py +0 -0
  77. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/dynamics/moments.py +0 -0
  78. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/dynamics/optimization.py +0 -0
  79. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/dynamics/parallel.py +0 -0
  80. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/dynamics/preprocess.py +0 -0
  81. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/dynamics/pseudotime.py +0 -0
  82. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/dynamics/transition.py +0 -0
  83. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/dynamics/utils.py +0 -0
  84. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/dynamics/velocity.py +0 -0
  85. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/grn/__init__.py +0 -0
  86. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/grn/infergrn.py +0 -0
  87. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/grn/modules.py +0 -0
  88. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/grn/prune.py +0 -0
  89. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/grn/regressors.py +0 -0
  90. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/grn/utils.py +0 -0
  91. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/image/__init__.py +0 -0
  92. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/image/align.py +0 -0
  93. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/lr/__init__.py +0 -0
  94. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/lr/aggregate.py +0 -0
  95. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/lr/method.py +0 -0
  96. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/lr/methods/__init__.py +0 -0
  97. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/lr/methods/cellchat.py +0 -0
  98. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/lr/methods/cellphonedb.py +0 -0
  99. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/lr/methods/connectome.py +0 -0
  100. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/lr/methods/geomean.py +0 -0
  101. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/lr/methods/logfc.py +0 -0
  102. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/lr/methods/natmi.py +0 -0
  103. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/lr/methods/rank_aggregate.py +0 -0
  104. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/lr/methods/scseqcomm.py +0 -0
  105. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/lr/methods/singlecellsignalr.py +0 -0
  106. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/lr/pipeline.py +0 -0
  107. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/lr/preprocess.py +0 -0
  108. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/lr/resources.py +0 -0
  109. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/peaks/__init__.py +0 -0
  110. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/peaks/callpeak.py +0 -0
  111. /exprmat-0.1.39/exprmat/reader/peaks.py → /exprmat-0.1.41/exprmat/peaks/common.py +0 -0
  112. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/peaks/coverage.py +0 -0
  113. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/peaks/footprint.py +0 -0
  114. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/peaks/idr/__init__.py +0 -0
  115. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/peaks/idr/constants.py +0 -0
  116. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/peaks/idr/idr.py +0 -0
  117. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/peaks/idr/invcdf.pyx +0 -0
  118. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/peaks/idr/optimization.py +0 -0
  119. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/peaks/idr/utils.py +0 -0
  120. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/peaks/linkage.py +0 -0
  121. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/__init__.py +0 -0
  122. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/atac.py +0 -0
  123. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/A.pk +0 -0
  124. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/B.pk +0 -0
  125. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/C.pk +0 -0
  126. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/D.pk +0 -0
  127. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/E.pk +0 -0
  128. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/F.pk +0 -0
  129. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/G.pk +0 -0
  130. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/H.pk +0 -0
  131. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/I.pk +0 -0
  132. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/J.pk +0 -0
  133. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/K.pk +0 -0
  134. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/L.pk +0 -0
  135. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/M.pk +0 -0
  136. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/N.pk +0 -0
  137. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/O.pk +0 -0
  138. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/P.pk +0 -0
  139. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/Q.pk +0 -0
  140. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/R.pk +0 -0
  141. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/S.pk +0 -0
  142. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/T.pk +0 -0
  143. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/U.pk +0 -0
  144. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/V.pk +0 -0
  145. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/W.pk +0 -0
  146. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/X.pk +0 -0
  147. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/Y.pk +0 -0
  148. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/data/Z.pk +0 -0
  149. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/de.py +0 -0
  150. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/expression.py +0 -0
  151. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/sequence.py +0 -0
  152. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/plotting/summary.py +0 -0
  153. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/__init__.py +0 -0
  154. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/doublets/__init__.py +0 -0
  155. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/doublets/composite.py +0 -0
  156. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/doublets/scrublet.py +0 -0
  157. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/emptydrops.py +0 -0
  158. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/impute/__init__.py +0 -0
  159. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/impute/magic.py +0 -0
  160. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/integrate.py +0 -0
  161. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/normal.py +0 -0
  162. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/plot.py +0 -0
  163. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/sctransform/__init__.py +0 -0
  164. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/sctransform/estimate.py +0 -0
  165. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/sctransform/ksmooth.py +0 -0
  166. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/sctransform/residual.py +0 -0
  167. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/sctransform/transform.py +0 -0
  168. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/sparse.py +0 -0
  169. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/preprocessing/uniform.py +0 -0
  170. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/reader/__init__.py +0 -0
  171. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/reader/metadata.py +0 -0
  172. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/reader/spatial.py +0 -0
  173. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/reduction/forceatlas.py +0 -0
  174. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/reduction/nn.py +0 -0
  175. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/reduction/outliers.py +0 -0
  176. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/reduction/pca.py +0 -0
  177. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/reduction/spectral.py +0 -0
  178. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/reduction/tsne.py +0 -0
  179. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/reduction/umap.py +0 -0
  180. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/trajectory/pcurve.py +0 -0
  181. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/transfer/__init__.py +0 -0
  182. {exprmat-0.1.39 → exprmat-0.1.41}/exprmat/transfer/atlas.py +0 -0
  183. {exprmat-0.1.39 → exprmat-0.1.41}/license +0 -0
  184. {exprmat-0.1.39 → exprmat-0.1.41}/readme.md +0 -0
  185. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2/Cargo.toml +0 -0
  186. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2/license +0 -0
  187. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2/readme +0 -0
  188. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2/src/call_peaks.rs +0 -0
  189. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2/src/embedding.rs +0 -0
  190. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2/src/export.rs +0 -0
  191. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2/src/knn.rs +0 -0
  192. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2/src/lib.rs +0 -0
  193. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2/src/motif.rs +0 -0
  194. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2/src/network.rs +0 -0
  195. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2/src/preprocessing.rs +0 -0
  196. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2/src/utils/anndata.rs +0 -0
  197. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2/src/utils.rs +0 -0
  198. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/Cargo.toml +0 -0
  199. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/src/embedding.rs +0 -0
  200. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/src/export.rs +0 -0
  201. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/src/feature_count/counter.rs +0 -0
  202. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/src/feature_count/data_iter.rs +0 -0
  203. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/src/feature_count/matrix.rs +0 -0
  204. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/src/feature_count/mod.rs +0 -0
  205. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/src/genome.rs +0 -0
  206. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/src/lib.rs +0 -0
  207. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/src/motif.rs +0 -0
  208. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/src/network.rs +0 -0
  209. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/src/preprocessing/bam/flagstat.rs +0 -0
  210. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/src/preprocessing/bam/header.rs +0 -0
  211. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/src/preprocessing/bam/mark_duplicates.rs +0 -0
  212. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/src/preprocessing/bam.rs +0 -0
  213. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/src/preprocessing/import.rs +0 -0
  214. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/src/preprocessing/mod.rs +0 -0
  215. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/src/preprocessing/qc.rs +0 -0
  216. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/src/utils/knn.rs +0 -0
  217. {exprmat-0.1.39 → exprmat-0.1.41}/snapatac2-core/src/utils/mod.rs +0 -0
  218. {exprmat-0.1.39 → exprmat-0.1.41}/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.39
3
+ Version: 0.1.41
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -54,10 +54,9 @@ Requires-Dist: hdbscan
54
54
  Requires-Dist: graphtools
55
55
  Requires-Dist: bincsync>=0.3.0
56
56
  Requires-Dist: pybigwig
57
+ Requires-Dist: spatialdata
57
58
  Requires-Dist: loompy
58
- Requires-Dist: squidpy
59
59
  Requires-Dist: zarr
60
- Requires-Dist: spatialdata-io
61
60
  Requires-Dist: scikit-image
62
61
  Requires-Dist: spatial-image
63
62
  Requires-Dist: multiscale-spatial-image
@@ -76,11 +75,26 @@ Requires-Dist: pyfastx
76
75
  Requires-Dist: genomicranges
77
76
  Requires-Dist: rustworkx
78
77
  Requires-Dist: xgboost
78
+ Requires-Dist: dask-expr>=2.0
79
79
  Requires-Dist: sphinx ; extra == 'dev'
80
80
  Requires-Dist: twine ; extra == 'dev'
81
81
  Requires-Dist: ipykernel ; extra == 'dev'
82
82
  Requires-Dist: ipytree ; extra == 'dev'
83
+ Requires-Dist: cudf-cu12==25.8.* ; extra == 'cuda12'
84
+ Requires-Dist: dask-cudf-cu12==25.8.* ; extra == 'cuda12'
85
+ Requires-Dist: cuml-cu12==25.8.* ; extra == 'cuda12'
86
+ Requires-Dist: cugraph-cu12==25.8.* ; extra == 'cuda12'
87
+ Requires-Dist: nx-cugraph-cu12==25.8.* ; extra == 'cuda12'
88
+ Requires-Dist: cuxfilter-cu12==25.8.* ; extra == 'cuda12'
89
+ Requires-Dist: cucim-cu12==25.8.* ; extra == 'cuda12'
90
+ Requires-Dist: pylibraft-cu12==25.8.* ; extra == 'cuda12'
91
+ Requires-Dist: raft-dask-cu12==25.8.* ; extra == 'cuda12'
92
+ Requires-Dist: cuvs-cu12==25.8.* ; extra == 'cuda12'
93
+ Requires-Dist: nx-cugraph-cu12==25.8.* ; extra == 'cuda12'
94
+ Requires-Dist: cupy-cuda12x ; extra == 'cuda12'
95
+ Requires-Dist: rapids-singlecell ; extra == 'cuda12'
83
96
  Provides-Extra: dev
97
+ Provides-Extra: cuda12
84
98
  License-File: license
85
99
  Summary: exprmat: Routines for expression matrices
86
100
  Author-email: Zheng Yang <xornent@outlook.com>
@@ -65,9 +65,11 @@ except ImportError:
65
65
  info('compilation finished.')
66
66
 
67
67
 
68
- from exprmat.configuration import default as config
68
+ from exprmat.configuration import Configuration as configuration
69
69
  from exprmat.ansi import warning, info
70
70
 
71
+ config = configuration()
72
+
71
73
  mu.set_options(pull_on_update = False)
72
74
  Image.MAX_IMAGE_PIXELS = config['max.image']
73
75
 
@@ -107,9 +109,10 @@ basepath = config['data']
107
109
 
108
110
  # core method exports
109
111
  from exprmat.utils import setup_styles
112
+ from exprmat.ansi import error, warning, info, pprog, pproga
110
113
  from exprmat.reader.experiment import experiment, load_experiment
111
114
  from exprmat.reader.metadata import metadata, load_metadata
112
- from exprmat.ansi import error, warning, info, pprog, pproga
115
+
113
116
 
114
117
  setup_styles()
115
118
 
@@ -139,8 +142,8 @@ if PERFORM_DATABASE_CHECK:
139
142
 
140
143
 
141
144
  def cuda():
142
-
143
145
  import torch
146
+ from exprmat.utils import supports_tensorcore
144
147
  info(f'PyTorch version: {torch.__version__}')
145
148
  info(f'GPU acceleration availability: {"YES" if torch.cuda.is_available() else "NO"}')
146
149
  if torch.cuda.is_available():
@@ -154,7 +157,7 @@ def cuda():
154
157
  info(f'[{i}] {torch.cuda.get_device_name(i)} {"*" if torch.cuda.current_device() == i else ""}')
155
158
  info(f' CUDA capability: {torch.cuda.get_device_capability(i)}')
156
159
  info(f' Installed VRAM (GiB): {total_mem:.2f} GiB')
157
- info(f' Supporting TensorCore: {"YES" if torch.cuda.get_device_properties(0).major >= 7 else "NO"}')
160
+ info(f' Supporting TensorCore: {"YES" if supports_tensorcore() else "NO"}')
158
161
  info(f' Current dedicated memory: {dedicated_mem:.2f} / {total_mem:.2f} GiB ({100 * dedicated_mem / total_mem:.1f}%)')
159
162
 
160
163
 
@@ -186,7 +189,6 @@ def memory():
186
189
 
187
190
  setwd = os.chdir
188
191
  getwd = os.getcwd
189
- def locate_data(dir): config.update_config('data', dir)
190
192
 
191
193
 
192
194
  __all__ = [
@@ -6,6 +6,8 @@ from functools import partial
6
6
  from tqdm import tqdm
7
7
  from tqdm.auto import tqdm as tqdma
8
8
 
9
+ SILENT = False
10
+
9
11
 
10
12
  def fore_black() -> None:
11
13
  print('\033[30m', end = '')
@@ -111,6 +113,7 @@ def format_file_size(size):
111
113
 
112
114
 
113
115
  def error(text: str, error = None) -> None:
116
+ if SILENT: raise Exception(text) from error
114
117
  fore_red()
115
118
  print('[error]', end = ' ')
116
119
  ansi_reset()
@@ -121,6 +124,7 @@ def error(text: str, error = None) -> None:
121
124
 
122
125
 
123
126
  def warning(text: str) -> None:
127
+ if SILENT: return
124
128
  fore_yellow()
125
129
  print('[!]', end = ' ')
126
130
  ansi_reset()
@@ -129,6 +133,7 @@ def warning(text: str) -> None:
129
133
 
130
134
 
131
135
  def info(text: str) -> None:
136
+ if SILENT: return
132
137
  fore_cyan()
133
138
  print('[i]', end = ' ')
134
139
  ansi_reset()
@@ -18,6 +18,8 @@ def leiden(
18
18
  neighbors_key: str | None = None,
19
19
  obsp: str | None = None,
20
20
  flavor = 'igraph',
21
+ use_gpu = False,
22
+ theta = 1,
21
23
  ** clustering_args,
22
24
  ) -> ad.AnnData | None:
23
25
  '''
@@ -86,11 +88,27 @@ def leiden(
86
88
  passes arguments to the `partition_type`) or `igraph.Graph.community_leiden` from `igraph`.
87
89
  '''
88
90
 
89
- return sc.tl.leiden(
90
- adata, resolution = resolution,
91
- restrict_to = restrict_to, random_state = random_state,
92
- key_added = key_added, adjacency = adjacency, directed = directed,
93
- use_weights = use_weights, n_iterations = n_iterations,
94
- partition_type = partition_type, neighbors_key = neighbors_key,
95
- copy = False, flavor = flavor, **clustering_args
96
- )
91
+ if use_gpu:
92
+ import rapids_singlecell as rsc
93
+ return rsc.tl.leiden(
94
+ adata, resolution = resolution,
95
+ restrict_to = restrict_to, random_state = random_state,
96
+ key_added = key_added, adjacency = adjacency,
97
+ use_weights = use_weights,
98
+ # the n_iterations in igraph takes -1, 0, 1 and 2 as magic numbers
99
+ # not real number of iterations. indeed, the gpu implementation
100
+ # supports only real iterations, by default 200.
101
+ n_iterations = n_iterations if n_iterations > 2 else 200,
102
+ neighbors_key = neighbors_key, theta = theta,
103
+ copy = False
104
+ )
105
+
106
+ else:
107
+ return sc.tl.leiden(
108
+ adata, resolution = resolution,
109
+ restrict_to = restrict_to, random_state = random_state,
110
+ key_added = key_added, adjacency = adjacency, directed = directed,
111
+ use_weights = use_weights, n_iterations = n_iterations,
112
+ partition_type = partition_type, neighbors_key = neighbors_key,
113
+ copy = False, flavor = flavor, **clustering_args
114
+ )
@@ -17,8 +17,9 @@ class Configuration:
17
17
  'Ubuntu',
18
18
  'Verdana'
19
19
  ]
20
-
21
- self.config['backend'] = 'TkAgg'
20
+
21
+ self.config['plotting.flavor'] = 'light'
22
+ self.config['plotting.backend'] = 'TkAgg'
22
23
  self.config['data'] = os.path.join(os.path.dirname(__file__), 'data')
23
24
 
24
25
  # target taxa
@@ -56,6 +57,3 @@ class Configuration:
56
57
 
57
58
  def update_config(self, conf_name, value):
58
59
  self.config[conf_name] = value
59
-
60
-
61
- default = Configuration()
@@ -3,7 +3,7 @@ import os
3
3
  import pandas
4
4
  from exprmat import basepath
5
5
  from exprmat.ansi import warning, info
6
- from exprmat.configuration import default as cfg
6
+ from exprmat import config as cfg
7
7
 
8
8
  genome = {}
9
9
 
@@ -4,7 +4,7 @@ import pandas
4
4
  import numpy as np
5
5
 
6
6
  from exprmat.ansi import warning, info
7
- from exprmat.configuration import default as cfg
7
+ from exprmat import config as cfg
8
8
  from exprmat.data.finders import basepath, genome, get_genome
9
9
 
10
10
 
@@ -10,7 +10,6 @@ from exprmat.ansi import warning, error, pprog
10
10
 
11
11
 
12
12
  class default_params():
13
-
14
13
  logbase = exp(1)
15
14
  min_cells = 5
16
15
  expr_prop = 0.1
@@ -21,7 +21,7 @@ from pynndescent import NNDescent
21
21
 
22
22
  from exprmat.ansi import error, warning, info, pprog
23
23
  from exprmat.data.finders import basepath
24
- from exprmat.configuration import default
24
+ from exprmat import config as default
25
25
 
26
26
 
27
27
  # genomic background sequencing
@@ -2,7 +2,7 @@
2
2
  import os
3
3
  from exprmat import pprog
4
4
  from exprmat.data.finders import basepath
5
- from exprmat.configuration import default
5
+ from exprmat import config as default
6
6
 
7
7
 
8
8
  def query_sequence(adata, seqlen = None):
@@ -3,6 +3,8 @@ import matplotlib.pyplot as plt
3
3
  import pandas as pd
4
4
  import numpy as np
5
5
 
6
+ from exprmat.plotting.palettes import mpl, get_palette
7
+
6
8
 
7
9
  def cnmf_silhoutte(adata, nmf_slot = 'cnmf', figsize = (3, 2), dpi = 100):
8
10
 
@@ -38,11 +40,11 @@ def cnmf_density(adata, k, nmf_slot = 'cnmf', figsize = (3, 2), dpi = 100):
38
40
  return fig
39
41
 
40
42
 
41
- def cnmf_distance_comps(adata, k, nmf_slot = 'cnmf', cmap = 'Reds_r', figsize = (3, 3), dpi = 100):
43
+ def cnmf_distance_comps(adata, k, nmf_slot = 'cnmf', cmap = 'reds', figsize = (3, 3), dpi = 100):
42
44
 
43
45
  fig = plt.figure(figsize = figsize, dpi = dpi)
44
46
  df = adata.uns[f'{nmf_slot}.dist.{k}']
45
- fig.gca().imshow(df, cmap = cmap)
47
+ fig.gca().imshow(df, cmap = mpl(cmap))
46
48
 
47
49
  return fig
48
50
 
@@ -50,7 +52,7 @@ def cnmf_distance_comps(adata, k, nmf_slot = 'cnmf', cmap = 'Reds_r', figsize =
50
52
  def cnmf_distance_usages(
51
53
  adata, k, nmf_slot = 'cnmf', metrics = 'cosine', downsample = 0.1, method = 'single',
52
54
  annotations = None, show_indices = False, legend_cols = 1,
53
- cmap = 'Reds_r', cmap_annotations = 'Set1', figsize = (3, 3), dpi = 100
55
+ cmap = 'reds', cmap_annotations = 'set1', figsize = (3, 3), dpi = 100
54
56
  ):
55
57
 
56
58
  import numpy as np
@@ -80,8 +82,8 @@ def cnmf_distance_usages(
80
82
 
81
83
  def cnmf_distance_modules(
82
84
  adata, k, nmf_slot = 'cnmf', metrics = 'cosine', downsample = 1, method = 'complete',
83
- annotations = None, cmap_annotations = 'Set1', show_indices = False,
84
- cmap = 'Reds_r', figsize = (3, 3), dpi = 100, legend_cols = 1
85
+ annotations = None, cmap_annotations = 'set1', show_indices = False,
86
+ cmap = 'reds', figsize = (3, 3), dpi = 100, legend_cols = 1
85
87
  ):
86
88
 
87
89
  import numpy as np
@@ -109,12 +111,12 @@ def cnmf_distance_modules(
109
111
 
110
112
  def matrix_plot(
111
113
  mat, labels = None, annotations = None,
112
- cmap = 'Reds_r', cmap_annotations = 'Set1',
114
+ cmap = 'reds', cmap_annotations = 'set1',
113
115
  show_indices = True,
114
116
  figsize = (3, 3), dpi = 100, legend_cols = 1
115
117
  ):
116
118
  fig = plt.figure(figsize = figsize, dpi = dpi)
117
- fig.gca().imshow(mat, cmap = cmap)
119
+ fig.gca().imshow(mat, cmap = mpl(cmap))
118
120
  ax = fig.gca()
119
121
  ax.set_yticks([])
120
122
  ax.set_xticks([])
@@ -130,9 +132,7 @@ def matrix_plot(
130
132
  annot_n = [annot_u.index(x) for x in annotations]
131
133
 
132
134
  from exprmat.plotting import palettes
133
- colors = list(palettes.linear_palette(palettes.all_palettes[cmap_annotations][
134
- list(palettes.all_palettes[cmap_annotations].keys())[-1]
135
- ], len(annot_u)))
135
+ colors = get_palette(cmap_annotations, len(annot_u))
136
136
  colormap = {x: y for x, y in zip(annot_u, colors)}
137
137
 
138
138
  ax_annot.set_xlim(-0.5, 0.5)
@@ -175,7 +175,7 @@ def matrix_plot(
175
175
  ncol = annotations.shape[1]
176
176
  ax_annot = ax.inset_axes([1.05, 0, max(0.3, 0.07 * ncol), 1], sharey = ax)
177
177
 
178
- ax_annot.imshow(annotations, cmap = cmap_annotations, aspect = 'auto', interpolation = 'nearest')
178
+ ax_annot.imshow(annotations, cmap = mpl(cmap_annotations), aspect = 'auto', interpolation = 'nearest')
179
179
  # ax_annot.set_yticks([])
180
180
  if xn:
181
181
  ax_annot.set_xticks([x for x in range(len(xn))])
@@ -5,6 +5,7 @@ import numpy as np
5
5
  import scanpy as sc
6
6
  from matplotlib.colors import Colormap, TwoSlopeNorm
7
7
  from exprmat.ansi import error
8
+ from exprmat.plotting.palettes import mpl
8
9
 
9
10
 
10
11
  def chromosome_heatmap(
@@ -66,7 +67,7 @@ def chromosome_heatmap(
66
67
  var_names = tmp_adata.var.index.values,
67
68
  groupby = groupby,
68
69
  figsize = figsize,
69
- cmap = cmap,
70
+ cmap = mpl(cmap),
70
71
  show_gene_labels = False,
71
72
  var_group_positions = var_group_positions,
72
73
  var_group_labels = list(chr_pos_dict.keys()),
@@ -139,7 +140,7 @@ def chromosome_heatmap_summary(
139
140
  var_names = tmp_adata.var.index.values,
140
141
  groupby = groupby,
141
142
  figsize = figsize,
142
- cmap = cmap,
143
+ cmap = mpl(cmap),
143
144
  show_gene_labels = False,
144
145
  var_group_positions = var_group_positions,
145
146
  var_group_labels = list(chr_pos_dict.keys()),
@@ -15,6 +15,7 @@ from matplotlib.colors import Normalize
15
15
  from matplotlib.category import UnitData
16
16
  from matplotlib.lines import Line2D
17
17
 
18
+ from exprmat.plotting.palettes import mpl
18
19
  from exprmat.ansi import error, info
19
20
 
20
21
 
@@ -218,7 +219,7 @@ class nesplot:
218
219
  mat[np.newaxis, :],
219
220
  rasterized = True,
220
221
  norm = midnorm,
221
- cmap = self.cmap,
222
+ cmap = mpl(self.cmap),
222
223
  )
223
224
 
224
225
  ax3.spines["bottom"].set_visible(False)
@@ -425,7 +426,7 @@ class heatmapplot(object):
425
426
 
426
427
  matrix = ax.pcolormesh(
427
428
  df.values,
428
- cmap = self.cmap,
429
+ cmap = mpl(self.cmap),
429
430
  norm = norm,
430
431
  rasterized=True,
431
432
  )
@@ -751,7 +752,7 @@ class dotplot(object):
751
752
  sc = ax.scatter(
752
753
  x = x, y = y, data = df,
753
754
  s = "area", edgecolors = "none",
754
- c = self.colname, cmap = self.cmap,
755
+ c = self.colname, cmap = mpl(self.cmap),
755
756
  vmin = vmin,
756
757
  vmax = vmax,
757
758
  marker = self.marker,
@@ -11,6 +11,7 @@ from exprmat.lr.utils import default_anndata_keys as K
11
11
  from exprmat.lr.utils import default_primary_columns as D
12
12
  from exprmat.lr.utils import default_params as V
13
13
  from exprmat.utils import error, warning, info
14
+ from exprmat.plotting.palettes import mpl
14
15
 
15
16
 
16
17
  def check_variable(liana_res, var_name, var):
@@ -434,7 +435,7 @@ def lr_dotplot(
434
435
 
435
436
  p = ax.scatter(
436
437
  x = 'x', y = 'y', s = 's',
437
- edgecolors = "lightgrey", c = 'c', cmap = cmap,
438
+ edgecolors = "lightgrey", c = 'c', cmap = mpl(cmap),
438
439
  data = pd.DataFrame(df), marker = 'o'
439
440
  )
440
441
 
@@ -517,7 +518,7 @@ def heatmap(
517
518
  sns.heatmap(
518
519
  pvt, ax = ax, annot = annotate, linewidths = .5,
519
520
  fmt = 'd' if pivot_mode == 'counts' else '.1f',
520
- cmap = cmap
521
+ cmap = mpl(cmap)
521
522
  )
522
523
 
523
524
  ax.set_xlabel('Receiver (receptors)')
@@ -1439,7 +1439,7 @@ d3 = {
1439
1439
  'category20c' : Category20c,
1440
1440
  }
1441
1441
 
1442
- mpl = {
1442
+ matpl = {
1443
1443
  'magma' : Magma,
1444
1444
  'inferno' : Inferno,
1445
1445
  'plasma' : Plasma,
@@ -1655,7 +1655,7 @@ def cividis(n: int) -> palette:
1655
1655
  def turbo(n: int) -> palette:
1656
1656
  return linear_palette(Turbo256, n)
1657
1657
 
1658
- def cmdiv_wyj(n: int) -> palette:
1658
+ def wyj(n: int) -> palette:
1659
1659
  return interp_palette(palette((
1660
1660
  rgb_color(78, 42, 135).to_hex(),
1661
1661
  rgb_color(162, 184, 198).to_hex(),
@@ -1722,12 +1722,13 @@ def demo_colormap(ncols = 6, dpi = 100):
1722
1722
  for i, feat in enumerate(list(all_palettes.keys())):
1723
1723
  if len(axes.shape) == 2:
1724
1724
  plot_colormap(
1725
- get_palette(feat, 256),
1725
+ get_palette(feat),
1726
1726
  axes[i // ncols, i % ncols],
1727
1727
  title = feat
1728
1728
  )
1729
+
1729
1730
  elif len(axes.shape) == 1:
1730
- plot_colormap(get_palette(feat, 256), axes[i], title = feat)
1731
+ plot_colormap(get_palette(feat), axes[i], title = feat)
1731
1732
 
1732
1733
  for icol in range(ncols):
1733
1734
  for irow in range(nrows):
@@ -1752,11 +1753,17 @@ def to_rgba_array(palette: palette):
1752
1753
  return rgba_array
1753
1754
 
1754
1755
 
1755
- def get_palette_tuple(name, n):
1756
+ def get_palette_tuple(name, n = None):
1756
1757
 
1757
1758
  if name not in all_palettes.keys():
1758
1759
  error(f'can not find a palette named `{name}`.')
1759
1760
 
1761
+ # find if there is a defined n set if n is None.
1762
+ if (n is None) and isinstance(all_palettes[name], dict):
1763
+ keys = list(all_palettes[name].keys())
1764
+ return all_palettes[name][keys[-1]]
1765
+ elif n is None: n = 256
1766
+
1760
1767
  if isinstance(all_palettes[name], dict):
1761
1768
  if n in all_palettes[name].keys():
1762
1769
  return all_palettes[name][n]
@@ -1764,10 +1771,74 @@ def get_palette_tuple(name, n):
1764
1771
  else: return interp_palette(all_palettes[name], n)
1765
1772
 
1766
1773
 
1767
- def get_palette(name, n):
1768
- return list(get_palette_tuple(name, n))
1774
+ def get_palette(name, n = None):
1775
+
1776
+ if '/' in name: name, suffix = name.split('/')
1777
+ else: suffix = None
1778
+
1779
+ pal = list(get_palette_tuple(name, n))
1780
+ if suffix: # modification suffices.
1781
+ if suffix == 'r': pal = pal[::-1]
1782
+
1783
+ return pal
1784
+
1785
+
1786
+ def mpl(name, n = 256):
1787
+ return to_matplotlib(get_palette(name, n))
1788
+
1769
1789
 
1770
- # custom palettes
1771
- all_palettes['cmdiv_wyj'] = cmdiv_wyj(256)
1772
1790
  all_palettes['modlight'] = modlight(256)
1773
- all_palettes['moddark'] = moddark(256)
1791
+ all_palettes['moddark'] = moddark(256)
1792
+
1793
+ # inherit from matplotlib
1794
+ import matplotlib
1795
+
1796
+ def get_mpl_discrete_colormap(name):
1797
+ l, names = len(matplotlib.colormaps[name].colors), matplotlib.colormaps[name].colors
1798
+ colors = []
1799
+ for i in range(l):
1800
+ r, g, b = names[i][0:3]
1801
+ colors.append(rgb_color(int(r * 255), int(g * 255), int(b * 255)).to_hex())
1802
+ return l, colors
1803
+
1804
+ def get_mpl_continuous_colormap(name):
1805
+ names = matplotlib.colormaps[name](np.linspace(0, 1, 256))
1806
+ colors = []
1807
+ for i in range(256):
1808
+ r, g, b = names[i, 0:3]
1809
+ colors.append(rgb_color(int(r * 255), int(g * 255), int(b * 255)).to_hex())
1810
+ return 256, colors
1811
+
1812
+ discretes = [
1813
+ 'tab10', 'tab20', 'tab20b', 'tab20c'
1814
+ ]
1815
+
1816
+ continuous = [
1817
+ # cyclic
1818
+ 'twilight', 'twilight_shifted', 'hsv',
1819
+
1820
+ # diverging
1821
+ 'PiYG', 'PRGn', 'BrBG', 'PuOr', 'RdGy', 'RdBu', 'RdYlBu', 'RdYlGn',
1822
+ 'Spectral', 'coolwarm', 'bwr', 'seismic', 'berlin', 'managua', 'vanimo',
1823
+
1824
+ # sequential
1825
+ 'bone', 'pink', 'spring', 'summer', 'autumn', 'winter', 'cool', 'Wistia',
1826
+ 'hot', 'afmhot', 'gist_heat', 'copper',
1827
+
1828
+ # misc
1829
+ 'flag', 'prism', 'ocean', 'gist_earth', 'terrain', 'gist_stern',
1830
+ 'gnuplot', 'gnuplot2', 'CMRmap', 'cubehelix', 'brg', 'gist_rainbow',
1831
+ 'rainbow', 'jet', 'gist_ncar', 'nipy_spectral'
1832
+ ]
1833
+
1834
+ for d in discretes:
1835
+ k, v = get_mpl_discrete_colormap(d)
1836
+ all_palettes[d.lower().replace('_', '.')] = { k : v }
1837
+
1838
+ for d in continuous:
1839
+ k, v = get_mpl_continuous_colormap(d)
1840
+ all_palettes[d.lower().replace('_', '.')] = v
1841
+
1842
+
1843
+ # custom palettes
1844
+ all_palettes['wyj'] = wyj(256)
@@ -6,7 +6,7 @@ import matplotlib.pyplot as plt
6
6
  import seaborn as sns
7
7
 
8
8
  from exprmat.ansi import error
9
- from exprmat.plotting.palettes import linear_palette, all_palettes
9
+ from exprmat.plotting.palettes import linear_palette, all_palettes, get_palette
10
10
 
11
11
 
12
12
  def check_data_matches_labels(labels, data, side):
@@ -69,9 +69,7 @@ def sankey(
69
69
  # if no colorDict given, make one
70
70
  if colors is None:
71
71
  colors = {}
72
- pal = linear_palette(all_palettes[cmap][
73
- list(all_palettes[cmap].keys())[-1]
74
- ], len(all_labels))
72
+ pal = get_palette(cmap, len(all_labels))
75
73
  for i, label in enumerate(all_labels):
76
74
  colors[label] = pal[i]
77
75
 
@@ -230,7 +230,7 @@ def gene_track(
230
230
  show_gene_name = True
231
231
  ):
232
232
  from exprmat.data.finders import get_genome, get_genome_model
233
- from exprmat.configuration import default as cfg
233
+ from exprmat import config as cfg
234
234
  model = get_genome_model(assembly)
235
235
  gtable = get_genome(cfg['taxa.reference'][assembly.lower()])
236
236
 
@@ -575,7 +575,7 @@ def genes(
575
575
  return fig
576
576
 
577
577
  elif where is not None:
578
- from exprmat.configuration import default as cfg
578
+ from exprmat import config as cfg
579
579
  gtable = get_genome(cfg['taxa.reference'][assembly.lower()])
580
580
  ens = gtable['id'].tolist()
581
581
  name = gtable['gene'].tolist()
@@ -606,7 +606,7 @@ def genes(
606
606
 
607
607
  def whereis(assembly, where, upstream = 10000, downstream = 10000):
608
608
 
609
- from exprmat.configuration import default as cfg
609
+ from exprmat import config as cfg
610
610
  from exprmat.data.finders import get_genome, get_genome_model
611
611
  from exprmat.ansi import error
612
612
 
@@ -3,6 +3,7 @@ import seaborn as sns
3
3
  import numpy as np
4
4
  import matplotlib.pyplot as plt
5
5
  import pandas as pd
6
+ from exprmat.plotting.palettes import mpl
6
7
 
7
8
 
8
9
  def linregress(
@@ -286,7 +287,7 @@ def density(
286
287
  y = yscale(y),
287
288
  s = size,
288
289
  c = clist,
289
- cmap = cmap,
290
+ cmap = mpl(cmap),
290
291
  alpha = alpha
291
292
  )
292
293
 
@@ -17,6 +17,7 @@ from exprmat.dynamics.moments import second_order_moments
17
17
  from exprmat.plotting import embedding
18
18
  from exprmat.utils import translate_variables
19
19
  from exprmat.ansi import error, warning, info
20
+ from exprmat.plotting.palettes import mpl
20
21
 
21
22
 
22
23
  def make_unique_list(key, allow_array = False):
@@ -499,7 +500,7 @@ def proportions(
499
500
  counts_layers = np.array([counts / counts_total for counts in counts_layers])
500
501
 
501
502
  gspec = pl.GridSpec(1, 2, pl.figure(None, figsize, dpi=dpi))
502
- colors = pl.get_cmap("tab20b")(np.linspace(0.10, 0.65, len(layers_keys)))
503
+ colors = mpl("tab20b")(np.linspace(0.10, 0.65, len(layers_keys)))
503
504
 
504
505
  # pie chart of total abundances
505
506
  ax = pl.subplot(gspec[0])
@@ -5,6 +5,7 @@ import scipy.sparse as sparse
5
5
  import pandas as pd
6
6
  import numba
7
7
  from numba import njit
8
+ import warnings
8
9
 
9
10
  from exprmat.ansi import warning, info, error
10
11
  import exprmat.snapatac as internal
@@ -96,9 +97,13 @@ def vscore(E, min_mean = 0, n_bins = 50, fit_percentile = 0.1, error_weight = 1)
96
97
  a = c / (1 + b) - 1
97
98
 
98
99
  v_scores = ff_gene / ((1 + a) * (1 + b) + b * mu_gene)
99
- cv_eff = np.sqrt((1 + a) * (1 + b) - 1)
100
- cv_input = np.sqrt(b)
101
100
 
101
+ with warnings.catch_warnings():
102
+ warnings.simplefilter('ignore')
103
+ # encounter invalid values (inf/nan)
104
+ cv_eff = np.sqrt((1 + a) * (1 + b) + 1e-300 - 1) # add a small sigma
105
+
106
+ cv_input = np.sqrt(b)
102
107
  return v_scores, cv_eff, cv_input, min_expr_filter, mu_gene, ff_gene, a, b
103
108
 
104
109