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