exprmat 0.1.35__tar.gz → 0.1.36__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.35 → exprmat-0.1.36}/PKG-INFO +9 -5
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/__init__.py +49 -2
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/data/finders.py +37 -0
- exprmat-0.1.36/exprmat/deseq/dataset.py +1485 -0
- exprmat-0.1.36/exprmat/deseq/gridsearch.py +317 -0
- exprmat-0.1.36/exprmat/deseq/inference.py +650 -0
- exprmat-0.1.36/exprmat/deseq/preprocessing.py +104 -0
- exprmat-0.1.36/exprmat/deseq/stats.py +616 -0
- exprmat-0.1.36/exprmat/deseq/utils.py +1361 -0
- exprmat-0.1.36/exprmat/peaks/callpeak.py +359 -0
- exprmat-0.1.36/exprmat/peaks/idr/constants.py +26 -0
- exprmat-0.1.36/exprmat/peaks/idr/idr.py +686 -0
- exprmat-0.1.36/exprmat/peaks/idr/invcdf.pyx +108 -0
- exprmat-0.1.36/exprmat/peaks/idr/optimization.py +293 -0
- exprmat-0.1.36/exprmat/peaks/idr/utils.py +159 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/plotting/expression.py +19 -1
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/plotting/track.py +48 -10
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/preprocessing/qc.py +6 -3
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/reader/experiment.py +334 -57
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/reader/matcher.py +61 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/reader/spatial.py +24 -1
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/reader/static.py +375 -31
- exprmat-0.1.36/exprmat/transfer/__init__.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/utils.py +12 -0
- exprmat-0.1.36/license +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/pyproject.toml +13 -5
- {exprmat-0.1.35 → exprmat-0.1.36}/Cargo.lock +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/Cargo.toml +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/ansi.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/clustering/__init__.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/clustering/cnmf.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/clustering/dbscan.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/clustering/kmeans.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/clustering/leiden.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/clustering/nmf.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/clustering/rogue.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/clustering/seriation.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/clustering/spectral.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/clustering/utils.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/cnv/__init__.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/cnv/cnvscore.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/cnv/infercnv.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/configuration.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/data/__init__.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/data/cistarget.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/data/delim.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/data/geneset.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/data/gff.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/data/io.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/data/lr.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/data/presets.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/data/private.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/data/ranges.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/data/signature.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/data/tf.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/descriptive/__init__.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/descriptive/aggregate.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/descriptive/atac.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/descriptive/aucell.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/descriptive/de.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/descriptive/gse.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/descriptive/kde.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/descriptive/recovery.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/descriptive/summary.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/descriptive/tcr.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/dynamics/__init__.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/dynamics/generank.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/dynamics/linreg.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/dynamics/moments.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/dynamics/optimization.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/dynamics/parallel.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/dynamics/preprocess.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/dynamics/pseudotime.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/dynamics/transition.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/dynamics/utils.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/dynamics/velocity.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/grn/__init__.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/grn/infergrn.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/grn/modules.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/grn/prune.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/grn/regressors.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/grn/utils.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/image/__init__.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/image/align.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/lr/__init__.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/lr/aggregate.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/lr/method.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/lr/methods/__init__.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/lr/methods/cellchat.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/lr/methods/cellphonedb.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/lr/methods/connectome.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/lr/methods/geomean.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/lr/methods/logfc.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/lr/methods/natmi.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/lr/methods/rank_aggregate.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/lr/methods/scseqcomm.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/lr/methods/singlecellsignalr.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/lr/pipeline.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/lr/preprocess.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/lr/resources.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/lr/utils.py +0 -0
- {exprmat-0.1.35/exprmat/preprocessing/doublets → exprmat-0.1.36/exprmat/peaks}/__init__.py +0 -0
- {exprmat-0.1.35/exprmat/preprocessing/impute → exprmat-0.1.36/exprmat/peaks/idr}/__init__.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/plotting/__init__.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/plotting/atac.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/plotting/cnmf.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/plotting/cnv.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/plotting/de.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/plotting/gse.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/plotting/lr.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/plotting/palettes.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/plotting/sankey.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/plotting/summary.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/plotting/utils.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/plotting/velocity.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/preprocessing/__init__.py +0 -0
- {exprmat-0.1.35/exprmat/preprocessing/sctransform → exprmat-0.1.36/exprmat/preprocessing/doublets}/__init__.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/preprocessing/doublets/composite.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/preprocessing/doublets/scrublet.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/preprocessing/emptydrops.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/preprocessing/filter.py +0 -0
- {exprmat-0.1.35/exprmat/transfer → exprmat-0.1.36/exprmat/preprocessing/impute}/__init__.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/preprocessing/impute/magic.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/preprocessing/integrate.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/preprocessing/linear.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/preprocessing/normal.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/preprocessing/plot.py +0 -0
- /exprmat-0.1.35/license → /exprmat-0.1.36/exprmat/preprocessing/sctransform/__init__.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/preprocessing/sctransform/estimate.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/preprocessing/sctransform/ksmooth.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/preprocessing/sctransform/residual.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/preprocessing/sctransform/transform.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/preprocessing/sparse.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/preprocessing/uniform.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/reader/__init__.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/reader/metadata.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/reader/peaks.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/reduction/__init__.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/reduction/forceatlas.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/reduction/mde.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/reduction/nn.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/reduction/outliers.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/reduction/pca.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/reduction/plot.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/reduction/spectral.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/reduction/tsne.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/reduction/umap.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/trajectory/pcurve.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/exprmat/transfer/atlas.py +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/readme.md +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2/Cargo.toml +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2/license +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2/readme +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2/src/call_peaks.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2/src/embedding.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2/src/export.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2/src/knn.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2/src/lib.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2/src/motif.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2/src/network.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2/src/preprocessing.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2/src/utils/anndata.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2/src/utils.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/Cargo.toml +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/embedding.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/export.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/feature_count/counter.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/feature_count/data_iter.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/feature_count/matrix.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/feature_count/mod.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/genome.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/lib.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/motif.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/network.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/preprocessing/bam/flagstat.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/preprocessing/bam/header.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/preprocessing/bam/mark_duplicates.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/preprocessing/bam.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/preprocessing/import.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/preprocessing/mod.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/preprocessing/qc.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/utils/knn.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/utils/mod.rs +0 -0
- {exprmat-0.1.35 → exprmat-0.1.36}/snapatac2-core/src/utils/similarity.rs +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: exprmat
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.36
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
@@ -16,8 +16,8 @@ Requires-Dist: igraph>=0.10.3
|
|
|
16
16
|
Requires-Dist: pyarrow
|
|
17
17
|
Requires-Dist: pyfaidx>=0.7.0,<0.8.0
|
|
18
18
|
Requires-Dist: rustworkx
|
|
19
|
-
Requires-Dist: scipy>=1.
|
|
20
|
-
Requires-Dist: scikit-learn>=1.
|
|
19
|
+
Requires-Dist: scipy>=1.11,<2.0.0
|
|
20
|
+
Requires-Dist: scikit-learn>=1.1,<2.0.0
|
|
21
21
|
Requires-Dist: tqdm>=4.62
|
|
22
22
|
Requires-Dist: typeguard>=4.0
|
|
23
23
|
Requires-Dist: umap-learn>=0.5.0
|
|
@@ -55,6 +55,7 @@ Requires-Dist: hdbscan
|
|
|
55
55
|
Requires-Dist: graphtools
|
|
56
56
|
Requires-Dist: bincsync>=0.3.0
|
|
57
57
|
Requires-Dist: pybigwig
|
|
58
|
+
Requires-Dist: pybedgraph
|
|
58
59
|
Requires-Dist: loompy
|
|
59
60
|
Requires-Dist: squidpy
|
|
60
61
|
Requires-Dist: zarr
|
|
@@ -68,6 +69,11 @@ Requires-Dist: pyogrio>=0.7.2
|
|
|
68
69
|
Requires-Dist: pyproj>=3.3.0
|
|
69
70
|
Requires-Dist: geopandas
|
|
70
71
|
Requires-Dist: packaging
|
|
72
|
+
Requires-Dist: lightmotif
|
|
73
|
+
Requires-Dist: pymemesuite
|
|
74
|
+
Requires-Dist: formulaic>=1.0.2
|
|
75
|
+
Requires-Dist: formulaic-contrasts>=0.2.0
|
|
76
|
+
Requires-Dist: cython
|
|
71
77
|
Requires-Dist: sphinx ; extra == 'dev'
|
|
72
78
|
Requires-Dist: twine ; extra == 'dev'
|
|
73
79
|
Requires-Dist: ipykernel ; extra == 'dev'
|
|
@@ -75,9 +81,7 @@ Requires-Dist: ipytree ; extra == 'dev'
|
|
|
75
81
|
Provides-Extra: dev
|
|
76
82
|
License-File: license
|
|
77
83
|
Summary: exprmat: Routines for expression matrices
|
|
78
|
-
Author: Kai Zhang <kai@kzhang.org>
|
|
79
84
|
Author-email: Zheng Yang <xornent@outlook.com>
|
|
80
|
-
License: MIT
|
|
81
85
|
Requires-Python: >=3.9, <3.13
|
|
82
86
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
83
87
|
Project-URL: Repository, https://github.com/yang-z-03/exprmat
|
|
@@ -12,6 +12,50 @@ import pandas as pd
|
|
|
12
12
|
import pathlib
|
|
13
13
|
from PIL import Image
|
|
14
14
|
|
|
15
|
+
# build cython package
|
|
16
|
+
|
|
17
|
+
try: import exprmat.peaks.idr.invcdf
|
|
18
|
+
except ImportError:
|
|
19
|
+
|
|
20
|
+
from exprmat.ansi import info
|
|
21
|
+
info('seems to be your first use of exprmat. the C modules are not compiled yet.')
|
|
22
|
+
info('compiling cython extension modules ...')
|
|
23
|
+
|
|
24
|
+
from distutils.core import setup
|
|
25
|
+
from distutils.extension import Extension
|
|
26
|
+
from Cython.Distutils import build_ext
|
|
27
|
+
from Cython.Build import cythonize
|
|
28
|
+
import numpy
|
|
29
|
+
import sys
|
|
30
|
+
|
|
31
|
+
# change to the project source directory
|
|
32
|
+
# thus we can build the extension in the source directory.
|
|
33
|
+
sys.argv = ['', 'build_ext', '--inplace']
|
|
34
|
+
cwd = os.getcwd()
|
|
35
|
+
os.chdir(os.path.dirname(__file__))
|
|
36
|
+
info(f'entering working directory: {os.getcwd()}')
|
|
37
|
+
|
|
38
|
+
extensions = [
|
|
39
|
+
Extension(
|
|
40
|
+
'peaks.idr.invcdf',
|
|
41
|
+
[__file__.replace('__init__.py', os.path.join('peaks', 'idr', 'invcdf.pyx'))],
|
|
42
|
+
include_dirs = [numpy.get_include()],
|
|
43
|
+
define_macros = [('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION')]
|
|
44
|
+
)
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
setup(
|
|
48
|
+
name = 'peaks.idr.invcdf',
|
|
49
|
+
cmdclass = { 'build_ext': build_ext },
|
|
50
|
+
ext_modules = cythonize(extensions, language_level = 3, quiet = True)
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
os.chdir(cwd)
|
|
54
|
+
# remove the autogenerated build directory. since we compile inplace.
|
|
55
|
+
os.system(f'rm -r {os.path.join(os.path.dirname(__file__), "build")}')
|
|
56
|
+
info('compilation finished.')
|
|
57
|
+
|
|
58
|
+
|
|
15
59
|
from exprmat.configuration import default as config
|
|
16
60
|
from exprmat.ansi import warning, info
|
|
17
61
|
|
|
@@ -19,7 +63,7 @@ mu.set_options(pull_on_update = False)
|
|
|
19
63
|
Image.MAX_IMAGE_PIXELS = config['max.image']
|
|
20
64
|
|
|
21
65
|
DATABASE_SETUP_MESSAGE = """
|
|
22
|
-
The exprmat package do not come with
|
|
66
|
+
The exprmat package do not come with an included database after version 0.1.25,
|
|
23
67
|
due to the extensive size of the reference data. You need to setup the database
|
|
24
68
|
and configure it properly with configuration file `.exprmatrc` under your
|
|
25
69
|
user root or current working directory
|
|
@@ -39,9 +83,11 @@ default_finders = [
|
|
|
39
83
|
os.path.join(str(pathlib.Path.home()), '.exprmatrc')
|
|
40
84
|
]
|
|
41
85
|
|
|
86
|
+
DEFAULT_CONFIG = '[internals]'
|
|
42
87
|
for finder in default_finders:
|
|
43
88
|
if os.path.exists(finder):
|
|
44
|
-
|
|
89
|
+
DEFAULT_CONFIG = finder
|
|
90
|
+
if False: info(f'load configuration from {finder}')
|
|
45
91
|
with open(finder, 'r') as f:
|
|
46
92
|
import json
|
|
47
93
|
workspace_config = json.load(f)
|
|
@@ -94,6 +140,7 @@ def version():
|
|
|
94
140
|
MAJOR, MINOR, REVISION = [int(x) for x in ver_string.split('.')]
|
|
95
141
|
info(f'exprmat {MAJOR}.{MINOR}.{REVISION} / exprmat-db {db_ver if db_ver is not None else "(Not installed)"}')
|
|
96
142
|
info(f'os: {os.name} ({sys.platform}) platform version: {platform.release()}')
|
|
143
|
+
info(f'loaded configuration from {finder}')
|
|
97
144
|
info(f'current working directory: {os.getcwd()}')
|
|
98
145
|
info(f'current database directory: {config["data"]} ({db_ver if db_ver is not None else "(Not found)"})')
|
|
99
146
|
memory()
|
|
@@ -75,6 +75,43 @@ def get_genome_model(assembly):
|
|
|
75
75
|
return pandas.read_feather(path)
|
|
76
76
|
|
|
77
77
|
|
|
78
|
+
def get_genome_ranges(assembly, fname, as_grange = False):
|
|
79
|
+
|
|
80
|
+
taxa = cfg['taxa.reference'][assembly.lower()]
|
|
81
|
+
path = os.path.join(basepath, taxa, 'assemblies', assembly.lower(), f'{fname}.feather')
|
|
82
|
+
feather = pandas.read_feather(path)
|
|
83
|
+
|
|
84
|
+
if as_grange:
|
|
85
|
+
import genomicranges
|
|
86
|
+
return genomicranges.GenomicRanges.from_pandas(
|
|
87
|
+
feather[['ucsc', 'start', 'end', 'strand', 'gene']].rename(
|
|
88
|
+
columns = {'ucsc': 'seqnames', 'start': 'starts', 'end': 'ends'}
|
|
89
|
+
))
|
|
90
|
+
else: return feather
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def get_genome_first_exonic(assembly, as_grange = False):
|
|
94
|
+
return get_genome_ranges(assembly, 'first-exonic', as_grange = as_grange)
|
|
95
|
+
|
|
96
|
+
def get_genome_other_exonic(assembly, as_grange = False):
|
|
97
|
+
return get_genome_ranges(assembly, 'other-exonic', as_grange = as_grange)
|
|
98
|
+
|
|
99
|
+
def get_genome_first_intronic(assembly, as_grange = False):
|
|
100
|
+
return get_genome_ranges(assembly, 'first-intronic', as_grange = as_grange)
|
|
101
|
+
|
|
102
|
+
def get_genome_transcript(assembly, as_grange = False):
|
|
103
|
+
return get_genome_ranges(assembly, 'genebody', as_grange = as_grange)
|
|
104
|
+
|
|
105
|
+
def get_genome_promoters(assembly, as_grange = False):
|
|
106
|
+
return get_genome_ranges(assembly, 'promoters', as_grange = as_grange)
|
|
107
|
+
|
|
108
|
+
def get_genome_utr3(assembly, as_grange = False):
|
|
109
|
+
return get_genome_ranges(assembly, 'utr3', as_grange = as_grange)
|
|
110
|
+
|
|
111
|
+
def get_genome_utr5(assembly, as_grange = False):
|
|
112
|
+
return get_genome_ranges(assembly, 'utr5', as_grange = as_grange)
|
|
113
|
+
|
|
114
|
+
|
|
78
115
|
def get_mapper_name(taxa):
|
|
79
116
|
'''
|
|
80
117
|
Return a name mapper mapping from gene names to universal gene id across species.
|