exprmat 0.2.77__tar.gz → 0.2.79__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.
- {exprmat-0.2.77 → exprmat-0.2.79}/PKG-INFO +1 -1
- exprmat-0.2.79/exprmat/data/__init__.py +6 -0
- exprmat-0.2.79/exprmat/data/cistarget.py +697 -0
- exprmat-0.2.79/exprmat/data/cre.py +111 -0
- exprmat-0.2.79/exprmat/data/decoupler.py +139 -0
- exprmat-0.2.79/exprmat/data/finders.py +291 -0
- exprmat-0.2.79/exprmat/data/geneset.py +145 -0
- exprmat-0.2.79/exprmat/data/icnet.py +74 -0
- exprmat-0.2.79/exprmat/data/io.py +8 -0
- exprmat-0.2.79/exprmat/data/lr.py +161 -0
- exprmat-0.2.79/exprmat/data/orthologs.py +107 -0
- exprmat-0.2.79/exprmat/data/presets.py +79 -0
- exprmat-0.2.79/exprmat/data/repertoire.py +59 -0
- exprmat-0.2.79/exprmat/data/signature.py +325 -0
- exprmat-0.2.79/exprmat/data/tf.py +36 -0
- exprmat-0.2.79/exprmat/plotting/data/A.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/B.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/C.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/D.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/E.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/F.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/G.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/H.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/I.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/J.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/K.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/L.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/M.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/N.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/O.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/P.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/Q.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/R.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/S.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/T.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/U.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/V.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/W.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/X.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/Y.pk +0 -0
- exprmat-0.2.79/exprmat/plotting/data/Z.pk +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/rna/proportion.py +2 -2
- {exprmat-0.2.77 → exprmat-0.2.79}/pyproject.toml +1 -1
- {exprmat-0.2.77 → exprmat-0.2.79}/Cargo.lock +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/Cargo.toml +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/ansi.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/clustering/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/clustering/cnmf.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/clustering/dbscan.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/clustering/gating.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/clustering/kmeans.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/clustering/leiden.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/clustering/nmf.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/clustering/rogue.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/clustering/sc3.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/clustering/seriation.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/clustering/spectral.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/clustering/utils.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/cnv/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/cnv/cnvscore.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/cnv/infercnv.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/configuration.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/deconv/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/deconv/deconv.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/deconv/simulation.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/deconv/tangram/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/deconv/tangram/mapping.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/deconv/tangram/optimizer.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/deconv/tangram/spatial.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/deconv/tangram/utils.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/descriptive/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/descriptive/aggregate.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/descriptive/atac.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/descriptive/aucell.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/descriptive/composition.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/descriptive/covar.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/descriptive/de.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/descriptive/geneset.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/descriptive/gse.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/descriptive/kde.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/descriptive/recovery.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/descriptive/sccoda.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/descriptive/summary.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/descriptive/tcr.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/deseq/dataset.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/deseq/gridsearch.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/deseq/inference.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/deseq/preprocessing.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/deseq/stats.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/deseq/utils.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/deepst/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/deepst/adjacency.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/deepst/api.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/deepst/augment.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/deepst/image_features.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/deepst/model.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/deepst/runner.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/deepst/trainer.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/spagcn/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/spagcn/adjacency.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/spagcn/api.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/spagcn/layers.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/spagcn/models.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/spagcn/morans.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/spagcn/spagcn.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/spagcn/svg.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/spatialde/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/spatialde/api.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/spatialde/kernels.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/domain/spatialde/score_test.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/dynamics/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/dynamics/generank.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/dynamics/linreg.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/dynamics/moments.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/dynamics/optimization.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/dynamics/parallel.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/dynamics/preprocess.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/dynamics/pseudotime.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/dynamics/transition.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/dynamics/utils.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/dynamics/velocity.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/grn/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/grn/infergrn.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/grn/modules.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/grn/prune.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/grn/regressors.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/grn/utils.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/help.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/image/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/image/augment.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/image/axis.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/image/channel.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/image/compensation.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/image/density.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/image/segmentation.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/image/tissue.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/image/transform.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/aggregate.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/cellnest/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/cellnest/api.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/cellnest/gat.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/cellnest/intra.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/cellnest/model.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/cellnest/plotting.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/cellnest/postprocess.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/cellnest/preprocess.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/cellnest/relay.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/cellnest/stats.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/cellnest/train.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/cellnest/utils.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/icnet/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/icnet/construction.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/icnet/importance.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/icnet/ligand.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/icnet/metrics.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/icnet/pagerank.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/method.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/methods/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/methods/cellchat.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/methods/cellphonedb.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/methods/connectome.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/methods/geomean.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/methods/logfc.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/methods/natmi.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/methods/rank_aggregate.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/methods/scseqcomm.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/methods/singlecellsignalr.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/pipeline.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/preprocess.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/resources.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/lr/utils.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/metacell/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/metacell/engine.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/metacell/model.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/metacell/utils.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/factorization/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/factorization/bd.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/factorization/bmf.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/factorization/icm.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/factorization/lfnmf.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/factorization/lsnmf.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/factorization/nmf.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/factorization/nsnmf.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/factorization/pmf.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/factorization/pmfcc.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/factorization/psmf.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/factorization/sepnmf.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/factorization/snmf.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/factorization/snmnmf.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/seeding/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/seeding/fixed.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/seeding/nndsvd.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/seeding/random.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/seeding/random_c.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/methods/seeding/random_vcol.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/models/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/models/mf_fit.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/models/mf_track.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/models/nmf.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/models/nmf_mm.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/models/nmf_ns.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/models/nmf_std.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/models/smf.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/utils/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/utils/linalg.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/nmf/utils/utils.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/parser/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/parser/converter.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/parser/rds.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/parser/seurat.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/peaks/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/peaks/callpeak.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/peaks/common.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/peaks/coverage.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/peaks/footprint.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/peaks/idr/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/peaks/idr/constants.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/peaks/idr/idr.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/peaks/idr/invcdf.pyx +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/peaks/idr/optimization.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/peaks/idr/utils.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/peaks/linkage.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/peaks/motif.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/peaks/sequence.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/atac.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/cnmf.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/cnv.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/de.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/expression.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/gse.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/icnet.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/knee.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/lr.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/matrix.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/milestone.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/network.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/order.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/palettes.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/proximity.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/sankey.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/sequence.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/summary.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/track.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/trajectory.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/utils.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/velocity.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/plotting/wgcna.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/background/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/background/correction.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/background/dirichlet_multinomial.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/background/emptydrops.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/background/estimation.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/background/multinomial.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/background/sgt.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/background/soupx.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/doublets/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/doublets/composite.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/doublets/ddetect.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/doublets/scrublet.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/emptydrops.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/filter.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/impute/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/impute/magic.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/integrate.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/linear.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/normal.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/plot.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/qc.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/sctransform/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/sctransform/estimate.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/sctransform/ksmooth.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/sctransform/residual.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/sctransform/transform.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/sparse.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/preprocessing/uniform.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/accessor.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/atac/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/atac/derive.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/atac/peaks.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/atac/preprocessing.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/cite/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/cite/preprocessing.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/conversions.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/data-structure.txt +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/experiment.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/general/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/history.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/introspect.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/introspective.txt +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/matcher.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/metadata.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/rna/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/rna/atlas.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/rna/bulk.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/rna/cnv.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/rna/geneset.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/rna/getter.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/rna/impute.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/rna/interaction.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/rna/markers.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/rna/nmf.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/rna/qc.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/rna/reduction.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/rna/repertoire.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/rna/summarize.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/rna/trajectory.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/schema.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/spatial/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/spatial/classifier.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/spatial/coordinates.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/spatial/deconv.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/spatial/density.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/spatial/domains.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/spatial/getter.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/spatial/graph.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/spatial/image.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/spatial/lr.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/spatial/proximity.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/spatial/qc.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/spatial/segmentation.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/spatial/snn.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/spatial/tmap.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/spatial/transform.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/static.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reader/updater.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reduction/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reduction/diffmap.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reduction/forceatlas.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reduction/mde.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reduction/nn.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reduction/outliers.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reduction/pca.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reduction/plot.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reduction/scvi.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reduction/spectral.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reduction/tsne.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reduction/umap.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reduction/wnn/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reduction/wnn/landmarks.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reduction/wnn/plan.md +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reduction/wnn/projection.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reduction/wnn/refinement.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reduction/wnn/sampling.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/reduction/wnn/umap_landmarks.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/repertoire/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/repertoire/analysis.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/repertoire/convergence.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/repertoire/distance.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/repertoire/plotting.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/repertoire/reference.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/datatype.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/download.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/log.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/method.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/methods/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/methods/aucell.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/methods/consensus.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/methods/decouple.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/methods/gsea.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/methods/gsva.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/methods/mdt.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/methods/mlm.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/methods/ora.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/methods/pv.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/methods/query_set.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/methods/registry.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/methods/run.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/methods/udt.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/methods/ulm.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/methods/viper.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/methods/waggr.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/methods/zscore.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/odeps.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/plotter.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/plotting/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/plotting/barplot.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/plotting/dotplot.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/plotting/filter_by_expr.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/plotting/filter_by_prop.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/plotting/filter_samples.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/plotting/leading_edge.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/plotting/network.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/plotting/obsbar.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/plotting/obsm.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/plotting/order.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/plotting/order_targets.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/plotting/source_targets.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/plotting/volcano.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/utils/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/utils/anndata.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/utils/data.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/utils/net.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/utils/rankby_group.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/utils/rankby_obsm.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/signature/utils/rankby_order.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/spatial/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/spatial/classifier.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/spatial/hd.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/spatial/interac.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/spatial/ligrec.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/spatial/mif.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/spatial/nhood.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/spatial/niche.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/spatial/ometiff.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/spatial/pattern.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/spatial/ripley.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/spatial/snn.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/spatial/tmap.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/spatial/utils.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/spatial/visium.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/spatial/xenium.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/trajectory/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/trajectory/cytotrace.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/trajectory/elpi.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/trajectory/pcurve.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/trajectory/pseudotime.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/trajectory/root.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/trajectory/trace.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/transfer/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/transfer/atlas.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/utils.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/wgcna/__init__.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/exprmat/wgcna/core.py +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/license +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/readme.md +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2/Cargo.toml +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2/license +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2/readme +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2/src/call_peaks.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2/src/embedding.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2/src/export.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2/src/knn.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2/src/lib.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2/src/motif.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2/src/network.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2/src/preprocessing.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2/src/utils/anndata.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2/src/utils.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/Cargo.toml +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/embedding.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/export.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/feature_count/counter.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/feature_count/data_iter.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/feature_count/matrix.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/feature_count/mod.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/genome.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/lib.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/motif.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/network.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/preprocessing/bam/flagstat.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/preprocessing/bam/header.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/preprocessing/bam/mark_duplicates.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/preprocessing/bam.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/preprocessing/import.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/preprocessing/mod.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/preprocessing/qc.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/utils/knn.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/utils/mod.rs +0 -0
- {exprmat-0.2.77 → exprmat-0.2.79}/snapatac2-core/src/utils/similarity.rs +0 -0
|
@@ -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.')
|