exprmat 0.2.77__tar.gz → 0.2.78__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 (467) hide show
  1. {exprmat-0.2.77 → exprmat-0.2.78}/PKG-INFO +1 -1
  2. exprmat-0.2.78/exprmat/data/__init__.py +6 -0
  3. exprmat-0.2.78/exprmat/data/cistarget.py +697 -0
  4. exprmat-0.2.78/exprmat/data/cre.py +111 -0
  5. exprmat-0.2.78/exprmat/data/decoupler.py +139 -0
  6. exprmat-0.2.78/exprmat/data/finders.py +291 -0
  7. exprmat-0.2.78/exprmat/data/geneset.py +145 -0
  8. exprmat-0.2.78/exprmat/data/icnet.py +74 -0
  9. exprmat-0.2.78/exprmat/data/io.py +8 -0
  10. exprmat-0.2.78/exprmat/data/lr.py +161 -0
  11. exprmat-0.2.78/exprmat/data/orthologs.py +107 -0
  12. exprmat-0.2.78/exprmat/data/presets.py +79 -0
  13. exprmat-0.2.78/exprmat/data/repertoire.py +59 -0
  14. exprmat-0.2.78/exprmat/data/signature.py +325 -0
  15. exprmat-0.2.78/exprmat/data/tf.py +36 -0
  16. exprmat-0.2.78/exprmat/plotting/data/A.pk +0 -0
  17. exprmat-0.2.78/exprmat/plotting/data/B.pk +0 -0
  18. exprmat-0.2.78/exprmat/plotting/data/C.pk +0 -0
  19. exprmat-0.2.78/exprmat/plotting/data/D.pk +0 -0
  20. exprmat-0.2.78/exprmat/plotting/data/E.pk +0 -0
  21. exprmat-0.2.78/exprmat/plotting/data/F.pk +0 -0
  22. exprmat-0.2.78/exprmat/plotting/data/G.pk +0 -0
  23. exprmat-0.2.78/exprmat/plotting/data/H.pk +0 -0
  24. exprmat-0.2.78/exprmat/plotting/data/I.pk +0 -0
  25. exprmat-0.2.78/exprmat/plotting/data/J.pk +0 -0
  26. exprmat-0.2.78/exprmat/plotting/data/K.pk +0 -0
  27. exprmat-0.2.78/exprmat/plotting/data/L.pk +0 -0
  28. exprmat-0.2.78/exprmat/plotting/data/M.pk +0 -0
  29. exprmat-0.2.78/exprmat/plotting/data/N.pk +0 -0
  30. exprmat-0.2.78/exprmat/plotting/data/O.pk +0 -0
  31. exprmat-0.2.78/exprmat/plotting/data/P.pk +0 -0
  32. exprmat-0.2.78/exprmat/plotting/data/Q.pk +0 -0
  33. exprmat-0.2.78/exprmat/plotting/data/R.pk +0 -0
  34. exprmat-0.2.78/exprmat/plotting/data/S.pk +0 -0
  35. exprmat-0.2.78/exprmat/plotting/data/T.pk +0 -0
  36. exprmat-0.2.78/exprmat/plotting/data/U.pk +0 -0
  37. exprmat-0.2.78/exprmat/plotting/data/V.pk +0 -0
  38. exprmat-0.2.78/exprmat/plotting/data/W.pk +0 -0
  39. exprmat-0.2.78/exprmat/plotting/data/X.pk +0 -0
  40. exprmat-0.2.78/exprmat/plotting/data/Y.pk +0 -0
  41. exprmat-0.2.78/exprmat/plotting/data/Z.pk +0 -0
  42. {exprmat-0.2.77 → exprmat-0.2.78}/pyproject.toml +1 -1
  43. {exprmat-0.2.77 → exprmat-0.2.78}/Cargo.lock +0 -0
  44. {exprmat-0.2.77 → exprmat-0.2.78}/Cargo.toml +0 -0
  45. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/__init__.py +0 -0
  46. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/ansi.py +0 -0
  47. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/clustering/__init__.py +0 -0
  48. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/clustering/cnmf.py +0 -0
  49. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/clustering/dbscan.py +0 -0
  50. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/clustering/gating.py +0 -0
  51. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/clustering/kmeans.py +0 -0
  52. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/clustering/leiden.py +0 -0
  53. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/clustering/nmf.py +0 -0
  54. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/clustering/rogue.py +0 -0
  55. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/clustering/sc3.py +0 -0
  56. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/clustering/seriation.py +0 -0
  57. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/clustering/spectral.py +0 -0
  58. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/clustering/utils.py +0 -0
  59. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/cnv/__init__.py +0 -0
  60. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/cnv/cnvscore.py +0 -0
  61. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/cnv/infercnv.py +0 -0
  62. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/configuration.py +0 -0
  63. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/deconv/__init__.py +0 -0
  64. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/deconv/deconv.py +0 -0
  65. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/deconv/simulation.py +0 -0
  66. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/deconv/tangram/__init__.py +0 -0
  67. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/deconv/tangram/mapping.py +0 -0
  68. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/deconv/tangram/optimizer.py +0 -0
  69. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/deconv/tangram/spatial.py +0 -0
  70. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/deconv/tangram/utils.py +0 -0
  71. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/descriptive/__init__.py +0 -0
  72. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/descriptive/aggregate.py +0 -0
  73. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/descriptive/atac.py +0 -0
  74. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/descriptive/aucell.py +0 -0
  75. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/descriptive/composition.py +0 -0
  76. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/descriptive/covar.py +0 -0
  77. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/descriptive/de.py +0 -0
  78. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/descriptive/geneset.py +0 -0
  79. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/descriptive/gse.py +0 -0
  80. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/descriptive/kde.py +0 -0
  81. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/descriptive/recovery.py +0 -0
  82. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/descriptive/sccoda.py +0 -0
  83. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/descriptive/summary.py +0 -0
  84. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/descriptive/tcr.py +0 -0
  85. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/deseq/dataset.py +0 -0
  86. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/deseq/gridsearch.py +0 -0
  87. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/deseq/inference.py +0 -0
  88. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/deseq/preprocessing.py +0 -0
  89. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/deseq/stats.py +0 -0
  90. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/deseq/utils.py +0 -0
  91. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/__init__.py +0 -0
  92. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/deepst/__init__.py +0 -0
  93. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/deepst/adjacency.py +0 -0
  94. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/deepst/api.py +0 -0
  95. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/deepst/augment.py +0 -0
  96. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/deepst/image_features.py +0 -0
  97. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/deepst/model.py +0 -0
  98. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/deepst/runner.py +0 -0
  99. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/deepst/trainer.py +0 -0
  100. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/spagcn/__init__.py +0 -0
  101. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/spagcn/adjacency.py +0 -0
  102. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/spagcn/api.py +0 -0
  103. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/spagcn/layers.py +0 -0
  104. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/spagcn/models.py +0 -0
  105. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/spagcn/morans.py +0 -0
  106. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/spagcn/spagcn.py +0 -0
  107. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/spagcn/svg.py +0 -0
  108. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/spatialde/__init__.py +0 -0
  109. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/spatialde/api.py +0 -0
  110. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/spatialde/kernels.py +0 -0
  111. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/domain/spatialde/score_test.py +0 -0
  112. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/dynamics/__init__.py +0 -0
  113. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/dynamics/generank.py +0 -0
  114. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/dynamics/linreg.py +0 -0
  115. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/dynamics/moments.py +0 -0
  116. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/dynamics/optimization.py +0 -0
  117. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/dynamics/parallel.py +0 -0
  118. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/dynamics/preprocess.py +0 -0
  119. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/dynamics/pseudotime.py +0 -0
  120. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/dynamics/transition.py +0 -0
  121. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/dynamics/utils.py +0 -0
  122. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/dynamics/velocity.py +0 -0
  123. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/grn/__init__.py +0 -0
  124. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/grn/infergrn.py +0 -0
  125. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/grn/modules.py +0 -0
  126. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/grn/prune.py +0 -0
  127. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/grn/regressors.py +0 -0
  128. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/grn/utils.py +0 -0
  129. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/help.py +0 -0
  130. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/image/__init__.py +0 -0
  131. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/image/augment.py +0 -0
  132. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/image/axis.py +0 -0
  133. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/image/channel.py +0 -0
  134. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/image/compensation.py +0 -0
  135. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/image/density.py +0 -0
  136. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/image/segmentation.py +0 -0
  137. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/image/tissue.py +0 -0
  138. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/image/transform.py +0 -0
  139. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/__init__.py +0 -0
  140. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/aggregate.py +0 -0
  141. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/cellnest/__init__.py +0 -0
  142. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/cellnest/api.py +0 -0
  143. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/cellnest/gat.py +0 -0
  144. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/cellnest/intra.py +0 -0
  145. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/cellnest/model.py +0 -0
  146. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/cellnest/plotting.py +0 -0
  147. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/cellnest/postprocess.py +0 -0
  148. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/cellnest/preprocess.py +0 -0
  149. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/cellnest/relay.py +0 -0
  150. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/cellnest/stats.py +0 -0
  151. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/cellnest/train.py +0 -0
  152. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/cellnest/utils.py +0 -0
  153. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/icnet/__init__.py +0 -0
  154. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/icnet/construction.py +0 -0
  155. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/icnet/importance.py +0 -0
  156. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/icnet/ligand.py +0 -0
  157. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/icnet/metrics.py +0 -0
  158. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/icnet/pagerank.py +0 -0
  159. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/method.py +0 -0
  160. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/methods/__init__.py +0 -0
  161. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/methods/cellchat.py +0 -0
  162. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/methods/cellphonedb.py +0 -0
  163. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/methods/connectome.py +0 -0
  164. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/methods/geomean.py +0 -0
  165. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/methods/logfc.py +0 -0
  166. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/methods/natmi.py +0 -0
  167. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/methods/rank_aggregate.py +0 -0
  168. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/methods/scseqcomm.py +0 -0
  169. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/methods/singlecellsignalr.py +0 -0
  170. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/pipeline.py +0 -0
  171. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/preprocess.py +0 -0
  172. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/resources.py +0 -0
  173. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/lr/utils.py +0 -0
  174. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/metacell/__init__.py +0 -0
  175. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/metacell/engine.py +0 -0
  176. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/metacell/model.py +0 -0
  177. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/metacell/utils.py +0 -0
  178. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/__init__.py +0 -0
  179. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/factorization/__init__.py +0 -0
  180. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/factorization/bd.py +0 -0
  181. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/factorization/bmf.py +0 -0
  182. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/factorization/icm.py +0 -0
  183. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/factorization/lfnmf.py +0 -0
  184. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/factorization/lsnmf.py +0 -0
  185. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/factorization/nmf.py +0 -0
  186. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/factorization/nsnmf.py +0 -0
  187. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/factorization/pmf.py +0 -0
  188. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/factorization/pmfcc.py +0 -0
  189. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/factorization/psmf.py +0 -0
  190. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/factorization/sepnmf.py +0 -0
  191. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/factorization/snmf.py +0 -0
  192. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/factorization/snmnmf.py +0 -0
  193. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/seeding/__init__.py +0 -0
  194. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/seeding/fixed.py +0 -0
  195. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/seeding/nndsvd.py +0 -0
  196. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/seeding/random.py +0 -0
  197. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/seeding/random_c.py +0 -0
  198. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/methods/seeding/random_vcol.py +0 -0
  199. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/models/__init__.py +0 -0
  200. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/models/mf_fit.py +0 -0
  201. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/models/mf_track.py +0 -0
  202. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/models/nmf.py +0 -0
  203. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/models/nmf_mm.py +0 -0
  204. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/models/nmf_ns.py +0 -0
  205. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/models/nmf_std.py +0 -0
  206. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/models/smf.py +0 -0
  207. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/utils/__init__.py +0 -0
  208. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/utils/linalg.py +0 -0
  209. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/nmf/utils/utils.py +0 -0
  210. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/parser/__init__.py +0 -0
  211. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/parser/converter.py +0 -0
  212. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/parser/rds.py +0 -0
  213. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/parser/seurat.py +0 -0
  214. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/peaks/__init__.py +0 -0
  215. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/peaks/callpeak.py +0 -0
  216. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/peaks/common.py +0 -0
  217. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/peaks/coverage.py +0 -0
  218. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/peaks/footprint.py +0 -0
  219. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/peaks/idr/__init__.py +0 -0
  220. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/peaks/idr/constants.py +0 -0
  221. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/peaks/idr/idr.py +0 -0
  222. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/peaks/idr/invcdf.pyx +0 -0
  223. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/peaks/idr/optimization.py +0 -0
  224. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/peaks/idr/utils.py +0 -0
  225. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/peaks/linkage.py +0 -0
  226. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/peaks/motif.py +0 -0
  227. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/peaks/sequence.py +0 -0
  228. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/__init__.py +0 -0
  229. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/atac.py +0 -0
  230. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/cnmf.py +0 -0
  231. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/cnv.py +0 -0
  232. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/de.py +0 -0
  233. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/expression.py +0 -0
  234. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/gse.py +0 -0
  235. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/icnet.py +0 -0
  236. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/knee.py +0 -0
  237. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/lr.py +0 -0
  238. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/matrix.py +0 -0
  239. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/milestone.py +0 -0
  240. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/network.py +0 -0
  241. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/order.py +0 -0
  242. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/palettes.py +0 -0
  243. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/proximity.py +0 -0
  244. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/sankey.py +0 -0
  245. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/sequence.py +0 -0
  246. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/summary.py +0 -0
  247. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/track.py +0 -0
  248. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/trajectory.py +0 -0
  249. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/utils.py +0 -0
  250. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/velocity.py +0 -0
  251. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/plotting/wgcna.py +0 -0
  252. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/__init__.py +0 -0
  253. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/background/__init__.py +0 -0
  254. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/background/correction.py +0 -0
  255. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/background/dirichlet_multinomial.py +0 -0
  256. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/background/emptydrops.py +0 -0
  257. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/background/estimation.py +0 -0
  258. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/background/multinomial.py +0 -0
  259. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/background/sgt.py +0 -0
  260. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/background/soupx.py +0 -0
  261. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/doublets/__init__.py +0 -0
  262. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/doublets/composite.py +0 -0
  263. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/doublets/ddetect.py +0 -0
  264. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/doublets/scrublet.py +0 -0
  265. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/emptydrops.py +0 -0
  266. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/filter.py +0 -0
  267. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/impute/__init__.py +0 -0
  268. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/impute/magic.py +0 -0
  269. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/integrate.py +0 -0
  270. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/linear.py +0 -0
  271. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/normal.py +0 -0
  272. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/plot.py +0 -0
  273. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/qc.py +0 -0
  274. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/sctransform/__init__.py +0 -0
  275. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/sctransform/estimate.py +0 -0
  276. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/sctransform/ksmooth.py +0 -0
  277. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/sctransform/residual.py +0 -0
  278. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/sctransform/transform.py +0 -0
  279. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/sparse.py +0 -0
  280. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/preprocessing/uniform.py +0 -0
  281. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/__init__.py +0 -0
  282. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/accessor.py +0 -0
  283. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/atac/__init__.py +0 -0
  284. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/atac/derive.py +0 -0
  285. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/atac/peaks.py +0 -0
  286. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/atac/preprocessing.py +0 -0
  287. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/cite/__init__.py +0 -0
  288. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/cite/preprocessing.py +0 -0
  289. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/conversions.py +0 -0
  290. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/data-structure.txt +0 -0
  291. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/experiment.py +0 -0
  292. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/general/__init__.py +0 -0
  293. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/history.py +0 -0
  294. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/introspect.py +0 -0
  295. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/introspective.txt +0 -0
  296. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/matcher.py +0 -0
  297. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/metadata.py +0 -0
  298. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/rna/__init__.py +0 -0
  299. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/rna/atlas.py +0 -0
  300. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/rna/bulk.py +0 -0
  301. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/rna/cnv.py +0 -0
  302. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/rna/geneset.py +0 -0
  303. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/rna/getter.py +0 -0
  304. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/rna/impute.py +0 -0
  305. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/rna/interaction.py +0 -0
  306. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/rna/markers.py +0 -0
  307. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/rna/nmf.py +0 -0
  308. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/rna/proportion.py +0 -0
  309. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/rna/qc.py +0 -0
  310. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/rna/reduction.py +0 -0
  311. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/rna/repertoire.py +0 -0
  312. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/rna/summarize.py +0 -0
  313. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/rna/trajectory.py +0 -0
  314. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/schema.py +0 -0
  315. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/spatial/__init__.py +0 -0
  316. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/spatial/classifier.py +0 -0
  317. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/spatial/coordinates.py +0 -0
  318. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/spatial/deconv.py +0 -0
  319. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/spatial/density.py +0 -0
  320. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/spatial/domains.py +0 -0
  321. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/spatial/getter.py +0 -0
  322. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/spatial/graph.py +0 -0
  323. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/spatial/image.py +0 -0
  324. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/spatial/lr.py +0 -0
  325. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/spatial/proximity.py +0 -0
  326. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/spatial/qc.py +0 -0
  327. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/spatial/segmentation.py +0 -0
  328. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/spatial/snn.py +0 -0
  329. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/spatial/tmap.py +0 -0
  330. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/spatial/transform.py +0 -0
  331. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/static.py +0 -0
  332. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reader/updater.py +0 -0
  333. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reduction/__init__.py +0 -0
  334. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reduction/diffmap.py +0 -0
  335. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reduction/forceatlas.py +0 -0
  336. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reduction/mde.py +0 -0
  337. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reduction/nn.py +0 -0
  338. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reduction/outliers.py +0 -0
  339. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reduction/pca.py +0 -0
  340. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reduction/plot.py +0 -0
  341. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reduction/scvi.py +0 -0
  342. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reduction/spectral.py +0 -0
  343. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reduction/tsne.py +0 -0
  344. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reduction/umap.py +0 -0
  345. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reduction/wnn/__init__.py +0 -0
  346. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reduction/wnn/landmarks.py +0 -0
  347. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reduction/wnn/plan.md +0 -0
  348. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reduction/wnn/projection.py +0 -0
  349. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reduction/wnn/refinement.py +0 -0
  350. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reduction/wnn/sampling.py +0 -0
  351. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/reduction/wnn/umap_landmarks.py +0 -0
  352. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/repertoire/__init__.py +0 -0
  353. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/repertoire/analysis.py +0 -0
  354. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/repertoire/convergence.py +0 -0
  355. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/repertoire/distance.py +0 -0
  356. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/repertoire/plotting.py +0 -0
  357. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/repertoire/reference.py +0 -0
  358. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/__init__.py +0 -0
  359. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/datatype.py +0 -0
  360. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/download.py +0 -0
  361. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/log.py +0 -0
  362. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/method.py +0 -0
  363. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/methods/__init__.py +0 -0
  364. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/methods/aucell.py +0 -0
  365. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/methods/consensus.py +0 -0
  366. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/methods/decouple.py +0 -0
  367. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/methods/gsea.py +0 -0
  368. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/methods/gsva.py +0 -0
  369. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/methods/mdt.py +0 -0
  370. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/methods/mlm.py +0 -0
  371. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/methods/ora.py +0 -0
  372. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/methods/pv.py +0 -0
  373. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/methods/query_set.py +0 -0
  374. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/methods/registry.py +0 -0
  375. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/methods/run.py +0 -0
  376. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/methods/udt.py +0 -0
  377. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/methods/ulm.py +0 -0
  378. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/methods/viper.py +0 -0
  379. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/methods/waggr.py +0 -0
  380. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/methods/zscore.py +0 -0
  381. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/odeps.py +0 -0
  382. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/plotter.py +0 -0
  383. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/plotting/__init__.py +0 -0
  384. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/plotting/barplot.py +0 -0
  385. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/plotting/dotplot.py +0 -0
  386. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/plotting/filter_by_expr.py +0 -0
  387. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/plotting/filter_by_prop.py +0 -0
  388. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/plotting/filter_samples.py +0 -0
  389. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/plotting/leading_edge.py +0 -0
  390. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/plotting/network.py +0 -0
  391. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/plotting/obsbar.py +0 -0
  392. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/plotting/obsm.py +0 -0
  393. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/plotting/order.py +0 -0
  394. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/plotting/order_targets.py +0 -0
  395. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/plotting/source_targets.py +0 -0
  396. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/plotting/volcano.py +0 -0
  397. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/utils/__init__.py +0 -0
  398. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/utils/anndata.py +0 -0
  399. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/utils/data.py +0 -0
  400. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/utils/net.py +0 -0
  401. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/utils/rankby_group.py +0 -0
  402. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/utils/rankby_obsm.py +0 -0
  403. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/signature/utils/rankby_order.py +0 -0
  404. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/spatial/__init__.py +0 -0
  405. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/spatial/classifier.py +0 -0
  406. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/spatial/hd.py +0 -0
  407. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/spatial/interac.py +0 -0
  408. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/spatial/ligrec.py +0 -0
  409. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/spatial/mif.py +0 -0
  410. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/spatial/nhood.py +0 -0
  411. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/spatial/niche.py +0 -0
  412. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/spatial/ometiff.py +0 -0
  413. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/spatial/pattern.py +0 -0
  414. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/spatial/ripley.py +0 -0
  415. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/spatial/snn.py +0 -0
  416. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/spatial/tmap.py +0 -0
  417. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/spatial/utils.py +0 -0
  418. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/spatial/visium.py +0 -0
  419. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/spatial/xenium.py +0 -0
  420. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/trajectory/__init__.py +0 -0
  421. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/trajectory/cytotrace.py +0 -0
  422. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/trajectory/elpi.py +0 -0
  423. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/trajectory/pcurve.py +0 -0
  424. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/trajectory/pseudotime.py +0 -0
  425. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/trajectory/root.py +0 -0
  426. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/trajectory/trace.py +0 -0
  427. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/transfer/__init__.py +0 -0
  428. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/transfer/atlas.py +0 -0
  429. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/utils.py +0 -0
  430. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/wgcna/__init__.py +0 -0
  431. {exprmat-0.2.77 → exprmat-0.2.78}/exprmat/wgcna/core.py +0 -0
  432. {exprmat-0.2.77 → exprmat-0.2.78}/license +0 -0
  433. {exprmat-0.2.77 → exprmat-0.2.78}/readme.md +0 -0
  434. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2/Cargo.toml +0 -0
  435. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2/license +0 -0
  436. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2/readme +0 -0
  437. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2/src/call_peaks.rs +0 -0
  438. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2/src/embedding.rs +0 -0
  439. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2/src/export.rs +0 -0
  440. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2/src/knn.rs +0 -0
  441. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2/src/lib.rs +0 -0
  442. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2/src/motif.rs +0 -0
  443. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2/src/network.rs +0 -0
  444. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2/src/preprocessing.rs +0 -0
  445. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2/src/utils/anndata.rs +0 -0
  446. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2/src/utils.rs +0 -0
  447. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/Cargo.toml +0 -0
  448. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/src/embedding.rs +0 -0
  449. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/src/export.rs +0 -0
  450. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/src/feature_count/counter.rs +0 -0
  451. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/src/feature_count/data_iter.rs +0 -0
  452. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/src/feature_count/matrix.rs +0 -0
  453. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/src/feature_count/mod.rs +0 -0
  454. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/src/genome.rs +0 -0
  455. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/src/lib.rs +0 -0
  456. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/src/motif.rs +0 -0
  457. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/src/network.rs +0 -0
  458. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/src/preprocessing/bam/flagstat.rs +0 -0
  459. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/src/preprocessing/bam/header.rs +0 -0
  460. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/src/preprocessing/bam/mark_duplicates.rs +0 -0
  461. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/src/preprocessing/bam.rs +0 -0
  462. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/src/preprocessing/import.rs +0 -0
  463. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/src/preprocessing/mod.rs +0 -0
  464. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/src/preprocessing/qc.rs +0 -0
  465. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/src/utils/knn.rs +0 -0
  466. {exprmat-0.2.77 → exprmat-0.2.78}/snapatac2-core/src/utils/mod.rs +0 -0
  467. {exprmat-0.2.77 → exprmat-0.2.78}/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.2.77
3
+ Version: 0.2.78
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -0,0 +1,6 @@
1
+
2
+ from exprmat.data.finders import (
3
+ get_genome, get_mapper_ensembl, get_mapper_name,
4
+ save_genome_changes, refresh_genome
5
+ )
6
+ from exprmat.data.repertoire import read_repertoire_reference
@@ -0,0 +1,697 @@
1
+
2
+ import os
3
+ import re
4
+ from enum import Enum, unique
5
+ from typing import Optional, Tuple, Type, Union, Set
6
+ from abc import ABCMeta, abstractmethod
7
+ from cytoolz import memoize
8
+
9
+ import numpy as np
10
+ import pandas as pd
11
+ import pyarrow as pa
12
+ import pyarrow.dataset as ds
13
+ import pyarrow.feather as pf
14
+
15
+ from exprmat.data.signature import signature
16
+ from exprmat.ansi import error, warning
17
+
18
+
19
+ @unique
20
+ class region_type(Enum):
21
+ REGIONS = "regions"
22
+ GENES = "genes"
23
+
24
+
25
+ @unique
26
+ class cistrome_type(Enum):
27
+ MOTIFS = "motifs"
28
+ TRACKS = "tracks"
29
+
30
+
31
+ @unique
32
+ class cistarget_db_format(Enum):
33
+ SCORES = "scores"
34
+ RANKINGS = "rankings"
35
+
36
+
37
+ class region_index:
38
+
39
+ @staticmethod
40
+ def get_regions_from_bed(
41
+ bed_filename: str,
42
+ gene_regex: Optional[str] = None,
43
+ ):
44
+ gene_ids = list()
45
+ region_ids = list()
46
+ gene_ids_set = set()
47
+ region_ids_set = set()
48
+
49
+ with open(bed_filename, mode = "r", encoding = "utf-8") as fh:
50
+ for line in fh:
51
+ if line and not line.startswith("#"):
52
+ columns = line.strip().split("\t")
53
+
54
+ if len(columns) < 4:
55
+ error('bed files must contain at least 4 columns.')
56
+
57
+ # region index from column 4 of the bed file.
58
+ region_id = columns[3]
59
+
60
+ if gene_regex:
61
+ gene_id = re.sub(gene_regex, "", region_id)
62
+ if gene_id not in gene_ids_set:
63
+ gene_ids.append(gene_id)
64
+ gene_ids_set.add(gene_id)
65
+
66
+ else:
67
+ # if not matching genes, each region should have unique names,
68
+ # genes are commonly notated as prefixes to regions.
69
+ if region_id in region_ids_set:
70
+ error('region names should be unique.')
71
+ else:
72
+ region_ids.append(region_id)
73
+ region_ids_set.add(region_id)
74
+
75
+ if gene_regex: return region_index(
76
+ region_or_gene_ids = gene_ids,
77
+ regions_or_genes_type = region_type.GENES)
78
+
79
+ else: return region_index(
80
+ region_or_gene_ids = region_ids,
81
+ regions_or_genes_type = region_type.REGIONS)
82
+
83
+
84
+ @staticmethod
85
+ def get_regions_from_fasta(
86
+ fasta_filename: str,
87
+ gene_regex: Optional[str] = None,
88
+ ):
89
+
90
+ gene_ids = list()
91
+ region_ids = list()
92
+ gene_ids_set = set()
93
+ region_ids_set = set()
94
+
95
+ with open(fasta_filename, mode = "r", encoding = "utf-8") as fh:
96
+ for line in fh:
97
+ if line.startswith(">"):
98
+ region_id = line[1:].split(maxsplit = 1)[0]
99
+
100
+ if gene_regex:
101
+ gene_id = re.sub(gene_regex, "", region_id)
102
+ if gene_id not in gene_ids_set:
103
+ gene_ids.append(gene_id)
104
+ gene_ids_set.add(gene_id)
105
+
106
+ else:
107
+ if region_id in region_ids:
108
+ error('region names should be unique.')
109
+ else:
110
+ region_ids.append(region_id)
111
+ region_ids_set.add(region_id)
112
+
113
+
114
+ if gene_regex: return region_index(
115
+ region_or_gene_ids = gene_ids,
116
+ regions_or_genes_type = region_type.GENES)
117
+
118
+ else: return region_index(
119
+ region_or_gene_ids = region_ids,
120
+ regions_or_genes_type = region_type.REGIONS)
121
+
122
+
123
+ def __init__(
124
+ self, region_or_gene_ids,
125
+ regions_or_genes_type,
126
+ ):
127
+
128
+ if isinstance(region_or_gene_ids, set):
129
+ region_or_gene_ids = sorted(region_or_gene_ids)
130
+
131
+ # collapse duplicates, keep order, and add sort value.
132
+ self.ids_dict = {rg_id: idx for idx, rg_id in enumerate(region_or_gene_ids)}
133
+
134
+ if len(region_or_gene_ids) != len(self.ids_dict):
135
+ # recreate dict if region id or gene id's contained duplicates.
136
+ self.ids_dict = {rg_id: idx for idx, rg_id in enumerate(self.ids_dict)}
137
+
138
+ self.ids = tuple(self.ids_dict)
139
+ self.ids_set = set(self.ids_dict)
140
+ self.type = region_type(regions_or_genes_type)
141
+
142
+
143
+ def __eq__(self, other: object) -> bool:
144
+ if not isinstance(other, region_index): return NotImplemented
145
+ return self.type == other.type and self.ids_set == other.ids_set
146
+
147
+ def __len__(self) -> int: return len(self.ids)
148
+
149
+ def __getitem__(self, items):
150
+ if isinstance(items, int): return region_index((self.ids[items],), self.type)
151
+ return region_index(self.ids[items], self.type)
152
+
153
+
154
+ def difference(self, other):
155
+
156
+ if not isinstance(other, region_index): return NotImplemented
157
+ assert self.type == other.type, "cannot compare regions or genes index that is not of the same type"
158
+ return region_index(
159
+ region_or_gene_ids = sorted(
160
+ self.ids_set.difference(other.ids_set), key = lambda x: self.ids_dict[x]),
161
+ regions_or_genes_type = self.type
162
+ )
163
+
164
+
165
+ def intersection(self, other):
166
+
167
+ if not isinstance(other, region_index): return NotImplemented
168
+ assert self.type == other.type, "cannot compare regions or genes index that is not of the same type"
169
+ return region_index(
170
+ region_or_gene_ids = sorted(
171
+ self.ids_set.intersection(other.ids_set), key = lambda x: self.ids_dict[x]),
172
+ regions_or_genes_type = self.type,
173
+ )
174
+
175
+
176
+ def issubset(self, other) -> bool:
177
+ """
178
+ Check if all region or gene IDs in the current object are at least
179
+ present in the other object.
180
+ """
181
+ if not isinstance(other, region_index): return NotImplemented
182
+ assert self.type == other.type, "cannot compare regions or genes index that is not of the same type"
183
+ return self.ids_set.issubset(other.ids_set)
184
+
185
+
186
+ def issuperset(self, other) -> bool:
187
+ """
188
+ Check if all region or gene IDs in the other object are at least
189
+ present in the current object.
190
+ """
191
+ if not isinstance(other, region_index): return NotImplemented
192
+ assert self.type == other.type, "cannot compare regions or genes index that is not of the same type"
193
+ return self.ids_set.issuperset(other.ids_set)
194
+
195
+
196
+ def sort(self):
197
+ return region_index(sorted(self.ids), self.type)
198
+
199
+
200
+ def union(self, other):
201
+
202
+ if not isinstance(other, region_index): return NotImplemented
203
+ assert self.type == other.type, "cannot compare regions or genes index that is not of the same type"
204
+ return region_index(
205
+ region_or_gene_ids = sorted(
206
+ self.ids_set.union(other.ids_set),
207
+ regions_or_genes_type = self.type,
208
+ key = lambda x: (
209
+ self.ids_dict.get(x, len(self.ids) + 1),
210
+ other.ids_dict.get(x, 0),
211
+ )
212
+ )
213
+ )
214
+
215
+
216
+ def is_genes(self) -> bool:
217
+ return self.type == region_type.GENES
218
+
219
+ def is_regions(self) -> bool:
220
+ return self.type == region_type.REGIONS
221
+
222
+
223
+ class cistrome_index:
224
+ """
225
+ MotifOrTrackIDs class represents a unique sorted tuple of motif IDs or track IDs
226
+ for constructing a Pndas dataframe index for a cisTarget database.
227
+ """
228
+
229
+ def __init__(
230
+ self, motif_or_track_ids,
231
+ motifs_or_tracks_type,
232
+ ):
233
+
234
+ if isinstance(motif_or_track_ids, set):
235
+ motif_or_track_ids = sorted(motif_or_track_ids)
236
+
237
+ # collapse duplicates, keep order, and add sort value.
238
+ self.ids_dict = {rg_id: idx for idx, rg_id in enumerate(motif_or_track_ids)}
239
+
240
+ if len(motif_or_track_ids) != len(self.ids_dict):
241
+ # recreate dict if motif IDs or track IDs contained duplicates.
242
+ self.ids_dict = {mt_id: idx for idx, mt_id in enumerate(self.ids_dict)}
243
+
244
+ self.ids = tuple(self.ids_dict)
245
+ self.ids_set = set(self.ids_dict)
246
+ self.type = cistrome_type(motifs_or_tracks_type)
247
+
248
+
249
+ def __eq__(self, other: object):
250
+ if not isinstance(other, cistrome_index): return NotImplemented
251
+ return self.type == other.type and self.ids_set == other.ids_set
252
+
253
+ def __len__(self): return len(self.ids)
254
+
255
+ def __getitem__(self, items):
256
+ if isinstance(items, int): return cistrome_index((self.ids[items],), self.type)
257
+ return cistrome_index(self.ids[items], self.type)
258
+
259
+ def sort(self):
260
+ return cistrome_index(sorted(self.ids), self.type)
261
+
262
+ def is_motifs(self):
263
+ return self.type == cistrome_type.MOTIFS
264
+
265
+ def is_tracks(self):
266
+ return self.type == cistrome_type.TRACKS
267
+
268
+
269
+ class cistarget_db:
270
+ """
271
+ CisTargetDatabase class for reading rankings or scores for regions or genes from a
272
+ cis-target scores or rankings database. The database is a ranking or score table
273
+ (commonly stored in feather or anndata format for disk space efficiency).
274
+ """
275
+
276
+ @staticmethod
277
+ def init_ct_db(
278
+ ct_db_filename,
279
+ expected_score_or_ranking = 'rankings',
280
+ expected_row_type = 'motifs',
281
+ expected_column_type = 'genes',
282
+ engine = 'pyarrow',
283
+ ):
284
+ # get column names from the feather file with pyarrow without loading the whole database.
285
+ # the lazy loading is implemented in prefetch.
286
+ schema = ds.dataset(ct_db_filename, format = "feather").schema
287
+ column_names = schema.names
288
+ dtypes = schema.types
289
+
290
+ index_column_idx: Optional[int] = None
291
+ index_column_name: Optional[str] = None
292
+
293
+ # get database index column ("motifs", "tracks", "regions" or "genes" depending of the database type).
294
+ # Start with the last column (as the index column normally should be the latest).
295
+ for column_idx, column_name in zip(
296
+ range(len(column_names) - 1, -1, -1), column_names[::-1]
297
+ ):
298
+ if column_name in {"motifs", "tracks", "regions", "genes"}:
299
+ index_column_idx = column_idx
300
+ index_column_name = column_name
301
+
302
+ row_names = (
303
+ pf.read_table(
304
+ source = ct_db_filename,
305
+ columns = [column_idx],
306
+ memory_map = False,
307
+ use_threads = False,
308
+ )
309
+ .column(0)
310
+ .to_pylist()
311
+ )
312
+
313
+ if not index_column_name or not index_column_idx:
314
+ warning(f'no columns named "motifs", "tracks", "regions" or "genes" in the data frame.')
315
+ error(f'{ct_db_filename} is not a cistarget feather database.')
316
+
317
+ # get all column names without index column name.
318
+ column_names = (
319
+ column_names[0:index_column_idx] + column_names[index_column_idx + 1 :]
320
+ )
321
+
322
+ # get dtype for those columns (should be the same for all of them).
323
+ column_dtype = list(
324
+ set(dtypes[0:index_column_idx] +
325
+ dtypes[index_column_idx + 1 :])
326
+ )
327
+
328
+ if len(column_dtype) != 1:
329
+ error(f"only one dtype is allowed for {column_names[0:3]} ...: {column_dtype}")
330
+
331
+ column_dtype = column_dtype[0]
332
+ dtype: Union[Type[np.int16], Type[np.int32], Type[np.float32]]
333
+
334
+ # infer content from data type.
335
+ if column_dtype == pa.int16():
336
+ scores_or_rankings = "rankings"
337
+ dtype = np.int16
338
+ elif column_dtype == pa.int32():
339
+ scores_or_rankings = "rankings"
340
+ dtype = np.int32
341
+ elif column_dtype == pa.float32():
342
+ scores_or_rankings = "scores"
343
+ dtype = np.float32
344
+ else: error(f'unsupported dtype "{column_dtype}" for cistarget database.')
345
+
346
+ # get cistarget database type from cisTarget database filename extension.
347
+
348
+ row_kind = index_column_name
349
+ if expected_score_or_ranking != scores_or_rankings:
350
+ error('unexpected dtype from your specified content mode.')
351
+ if expected_row_type != row_kind:
352
+ error('unexpected row type (motifs or tracks) from your content and assertions.')
353
+
354
+ # Assume column kind is correct if the other values were correct.
355
+ column_kind = expected_column_type
356
+
357
+ if column_kind in ("regions", "genes"):
358
+ # Create cisTarget database object if the correct database was provided.
359
+ return cistarget_db(
360
+
361
+ ct_db_filename = ct_db_filename,
362
+
363
+ region_or_gene_ids = region_index(
364
+ region_or_gene_ids = column_names,
365
+ regions_or_genes_type = column_kind,
366
+ ),
367
+
368
+ motif_or_track_ids = cistrome_index(
369
+ motif_or_track_ids = row_names,
370
+ motifs_or_tracks_type = row_kind
371
+ ),
372
+
373
+ scores_or_rankings = scores_or_rankings,
374
+ dtype = dtype,
375
+ engine = engine,
376
+ )
377
+
378
+ else: error('invalid cistarget database.')
379
+
380
+
381
+ def __init__(
382
+ self, ct_db_filename,
383
+ region_or_gene_ids: region_index,
384
+ motif_or_track_ids: cistrome_index,
385
+ scores_or_rankings: cistarget_db_format,
386
+ dtype, engine = 'pyarrow'
387
+ ):
388
+
389
+ # cisTarget scores or rankings database file.
390
+ self.ct_db_filename = ct_db_filename
391
+
392
+ self.all_region_or_gene_ids: region_index = region_or_gene_ids
393
+ self.all_motif_or_track_ids: cistrome_index = motif_or_track_ids
394
+ self.scores_or_rankings: cistarget_db_format = scores_or_rankings
395
+ self.dtype: Type[Union[np.int16, np.int32, np.float32]] = dtype
396
+ self.engine = engine
397
+
398
+ # count number of region IDs or gene IDs.
399
+ self.n_regions = len(self.all_region_or_gene_ids)
400
+ # count number of motif IDs or track IDs.
401
+ self.n_cistromes = len(self.all_motif_or_track_ids)
402
+
403
+ # pyarrow table with scores or rankings for those region IDs or gene IDs that where loaded
404
+ # with prefetch(). this acts as a cache.
405
+ self.df_cached = None
406
+
407
+ # keep track for which region ids or gene ids, scores or rankings are
408
+ # loaded with prefetch().
409
+ self.region_or_gene_ids_loaded: Optional[region_index] = None
410
+
411
+
412
+ @property
413
+ def is_row_genes(self) -> bool:
414
+ return self.all_region_or_gene_ids.type == region_type.GENES
415
+
416
+ @property
417
+ def is_row_regions(self) -> bool:
418
+ return self.all_region_or_gene_ids.type == region_type.REGIONS
419
+
420
+ @property
421
+ def is_column_motifs(self) -> bool:
422
+ return self.all_motif_or_track_ids.type == cistrome_type.MOTIFS
423
+
424
+ @property
425
+ def is_column_tracks(self) -> bool:
426
+ return self.all_motif_or_track_ids.type == cistrome_type.TRACKS
427
+
428
+ @property
429
+ def is_scores(self) -> bool:
430
+ return self.scores_or_rankings == cistarget_db_format.SCORES
431
+
432
+ @property
433
+ def is_rankings(self) -> bool:
434
+ return self.scores_or_rankings == cistarget_db_format.RANKINGS
435
+
436
+
437
+ def is_regions_found(
438
+ self, region_or_gene_ids: region_index
439
+ ):
440
+ """
441
+ Check if all input regions or genes are found in the database.
442
+
443
+ Returns
444
+ -------
445
+ - A boolean indicates whether all requested features are found.
446
+ - Found features in index.
447
+ - Unfound features in index.
448
+ """
449
+
450
+ if region_or_gene_ids.issubset(self.all_region_or_gene_ids): return (
451
+ True, region_or_gene_ids, region_index([], region_or_gene_ids.type))
452
+ else: return (
453
+ False, region_or_gene_ids.intersection(self.all_region_or_gene_ids),
454
+ region_or_gene_ids.difference(self.all_region_or_gene_ids)
455
+ )
456
+
457
+
458
+ def clear_cache(self):
459
+
460
+ self.df_cached = None
461
+ self.region_or_gene_ids_loaded = None
462
+
463
+
464
+ def prefetch_pyarrow(
465
+ self, region_or_gene_ids: region_index, sort=False
466
+ ) -> None:
467
+
468
+ have_all, found_regions, notfound_regions = self.is_regions_found(region_or_gene_ids)
469
+ if have_all is False: error('you requested for regions that do not exist.')
470
+
471
+ if not self.df_cached or not isinstance(self.df_cached, pa.Table):
472
+ self.df_cached = pf.read_table(
473
+ source = self.ct_db_filename,
474
+ columns = (
475
+ found_regions.sort().ids
476
+ if sort else found_regions.ids
477
+ ) + (self.all_motif_or_track_ids.type.value,),
478
+ memory_map = False,
479
+ use_threads = True,
480
+ )
481
+
482
+ self.region_or_gene_ids_loaded = found_regions
483
+
484
+ else:
485
+ # get region IDs or gene IDs subset for which no scores/rankings were loaded before.
486
+ region_or_gene_ids_to_load = found_regions.difference(
487
+ self.region_or_gene_ids_loaded)
488
+
489
+ # check if new region IDs or gene IDs need to be loaded.
490
+ if len(region_or_gene_ids_to_load) != 0:
491
+ # get region IDs or gene IDs subset columns with scores/rankings
492
+ # from cistarget feather file as a pyarrow Table.
493
+ pa_table_subset = pf.read_table(
494
+ source = self.ct_db_filename,
495
+ columns = region_or_gene_ids_to_load.ids,
496
+ memory_map = False,
497
+ use_threads = True,
498
+ )
499
+
500
+ # get current loaded pyarrow table.
501
+ pa_table = self.df_cached
502
+
503
+ for column in pa_table_subset.itercolumns():
504
+ # Append column with region IDs or gene IDs scores/rankings to existing pyarrow Table.
505
+ pa_table = pa_table.append_column(column._name, column)
506
+
507
+ # Keep track of loaded region IDs or gene IDs scores/rankings.
508
+ self.region_or_gene_ids_loaded = found_regions.union(
509
+ self.region_or_gene_ids_loaded
510
+ )
511
+
512
+ # Store new pyarrow Table with previously and newly loaded region IDs or gene IDs scores/rankings.
513
+ self.df_cached = pa_table.select((
514
+ self.region_or_gene_ids_loaded.sort().ids
515
+ if sort else self.region_or_gene_ids_loaded.ids
516
+ ) + (self.all_motif_or_track_ids.type.value,)
517
+ )
518
+
519
+
520
+ def prefetch(
521
+ self,
522
+ region_or_gene_ids: region_index,
523
+ engine = None,
524
+ sort: bool = False,
525
+ ):
526
+ have_all, found_regions, nfound_regions = self.is_regions_found(region_or_gene_ids)
527
+ if have_all is False: error('you requested for regions that do not exist.')
528
+
529
+ engine = engine if engine else self.engine
530
+ self.prefetch_pyarrow(region_or_gene_ids = region_or_gene_ids, sort = sort)
531
+
532
+
533
+ def subset_to_pandas(
534
+ self, region_or_gene_ids: region_index, engine = None,
535
+ ):
536
+ have_all, found_regions, nfound_regions = self.is_regions_found(region_or_gene_ids)
537
+ if have_all is False: error('you requested for regions that do not exist.')
538
+ engine = engine if engine else self.engine
539
+
540
+ # fetch scores or rankings for input region IDs or gene IDs from cistarget database
541
+ # file for region IDs or gene IDs which were not prefetched in previous calls.
542
+ self.prefetch(region_or_gene_ids = region_or_gene_ids, engine = engine, sort = True)
543
+ if not self.df_cached: error('prefetch failed.')
544
+
545
+ pd_df = pd.DataFrame(
546
+ data = self.df_cached.select(
547
+ found_regions.ids
548
+ + (("motifs",) if self.is_column_motifs else ("tracks",))
549
+ ).to_pandas()
550
+ )
551
+
552
+ # set motifs or tracks column as index (inplace to avoid extra copy).
553
+ pd_df.set_index("motifs" if self.is_column_motifs else "tracks", inplace = True)
554
+
555
+ # add "regions" or "genes" as column index name.
556
+ pd_df.rename_axis(
557
+ columns = "regions" if self.is_row_regions else "genes", inplace = True
558
+ )
559
+
560
+ return pd_df
561
+
562
+
563
+
564
+ class ranking_db(metaclass = ABCMeta):
565
+ """
566
+ A class of a database of whole genome rankings. The whole genome is ranked for
567
+ regulatory features of interest, e.g. motifs for a transcription factor.
568
+ The rankings of the genes are 0-based.
569
+ """
570
+
571
+ def __init__(self, name: str):
572
+ self._name = name
573
+
574
+ @property
575
+ def name(self) -> str:
576
+ return self._name
577
+
578
+ @property
579
+ @abstractmethod
580
+ def n_genes(self) -> int:
581
+ pass
582
+
583
+ @property
584
+ @abstractmethod
585
+ def genes(self) -> Tuple[str]:
586
+ pass
587
+
588
+ @property
589
+ @memoize
590
+ def geneset(self) -> Set[str]:
591
+ return set(self.genes)
592
+
593
+ @abstractmethod
594
+ def load_full(self) -> pd.DataFrame:
595
+ pass
596
+
597
+ @abstractmethod
598
+ def load(self, gs: signature) -> pd.DataFrame:
599
+ pass
600
+
601
+ def __str__(self):
602
+ return self.name
603
+
604
+
605
+ class ranking_db_feather(ranking_db):
606
+
607
+ def __init__(
608
+ self, fname: str, name: str,
609
+ expected_score_or_ranking: str = 'rankings',
610
+ expected_row_type: str = 'motifs',
611
+ expected_column_type: str = 'genes'
612
+ ):
613
+ super().__init__(name = name)
614
+ if not os.path.isfile(fname): error(f'invalid file attempt to be loaded. ({fname})')
615
+
616
+ self._fname = fname
617
+ self.ct_db = cistarget_db.init_ct_db(
618
+ ct_db_filename = self._fname, engine = "pyarrow",
619
+ expected_column_type = expected_column_type,
620
+ expected_row_type = expected_row_type,
621
+ expected_score_or_ranking = expected_score_or_ranking
622
+ )
623
+
624
+
625
+ @property
626
+ @memoize
627
+ def n_genes(self) -> int:
628
+ return self.ct_db.n_regions
629
+
630
+
631
+ @property
632
+ @memoize
633
+ def genes(self) -> Tuple[str]:
634
+ return self.ct_db.all_region_or_gene_ids.ids
635
+
636
+
637
+ def load_full(self) -> pd.DataFrame:
638
+ return self.ct_db.subset_to_pandas(
639
+ region_or_gene_ids = self.ct_db.all_region_or_gene_ids
640
+ )
641
+
642
+
643
+ def load(self, gs: signature) -> pd.DataFrame:
644
+ # for some genes in the signature there might not be a rank
645
+ # available in the database.
646
+ gene_set = self.geneset.intersection(set(gs.genes))
647
+ return self.ct_db.subset_to_pandas(
648
+ region_or_gene_ids = region_index(
649
+ region_or_gene_ids = gene_set,
650
+ regions_or_genes_type = self.ct_db.all_region_or_gene_ids.type,
651
+ )
652
+ )
653
+
654
+
655
+ class inmemory(ranking_db):
656
+ """
657
+ A decorator for a ranking database which loads the entire database in memory.
658
+ """
659
+
660
+ def __init__(self, db: ranking_db):
661
+ assert db, "database should be supplied."
662
+ self._db = db
663
+ self._df = db.load_full()
664
+ super().__init__(db.name)
665
+
666
+ @property
667
+ def n_genes(self) -> int:
668
+ return self._db.n_genes
669
+
670
+ @property
671
+ def genes(self) -> Tuple[str]:
672
+ return self._db.genes
673
+
674
+ def load_full(self) -> pd.DataFrame:
675
+ return self._df
676
+
677
+ def load(self, gs: signature) -> pd.DataFrame:
678
+ return self._df.loc[:, self._df.columns.isin(gs.genes)]
679
+
680
+
681
+ def opendb(
682
+ fname: str, name: str,
683
+ expected_score_or_ranking: str = 'rankings',
684
+ expected_row_type: str = 'motifs',
685
+ expected_column_type: str = 'genes'
686
+ ) -> ranking_db:
687
+
688
+ extension = os.path.splitext(fname)[1]
689
+ if extension == ".feather":
690
+ return ranking_db_feather(
691
+ fname, name = name,
692
+ expected_column_type = expected_column_type,
693
+ expected_row_type = expected_row_type,
694
+ expected_score_or_ranking = expected_score_or_ranking
695
+ )
696
+
697
+ else: error('invalid database format.')