exprmat 0.1.4__tar.gz → 0.1.5__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.4 → exprmat-0.1.5}/PKG-INFO +2 -2
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/plotting/expression.py +31 -2
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/reader/experiment.py +18 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/utils.py +2 -2
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat.egg-info/PKG-INFO +2 -2
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat.egg-info/SOURCES.txt +1 -1
- exprmat-0.1.5/exprmat.egg-info/requires.txt +22 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/setup.py +1 -1
- exprmat-0.1.4/exprmat/data/mmu/gencode.tsv.gz +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/__init__.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/ansi.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/clustering/__init__.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/clustering/leiden.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/clustering/spectral.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/clustering/utils.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/cnv/__init__.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/cnv/cnvscore.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/cnv/infercnv.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/configuration.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/data/__init__.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/data/delim.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/data/finders.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/data/gff.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/data/hsa/genome.tsv.gz +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/data/mmu/genome.tsv.gz +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/data/private.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/data/ranges.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/descriptive/__init__.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/descriptive/de.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/descriptive/kde.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/plotting/__init__.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/plotting/cnv.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/plotting/de.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/plotting/palettes.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/preprocessing/__init__.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/preprocessing/doublets/__init__.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/preprocessing/doublets/composite.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/preprocessing/doublets/scrublet.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/preprocessing/filter.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/preprocessing/integrate.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/preprocessing/linear.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/preprocessing/normal.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/preprocessing/plot.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/preprocessing/qc.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/preprocessing/sctransform/__init__.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/preprocessing/sctransform/estimate.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/preprocessing/sctransform/ksmooth.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/preprocessing/sctransform/residual.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/preprocessing/sctransform/transform.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/preprocessing/sparse.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/preprocessing/uniform.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/reader/__init__.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/reader/matcher.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/reader/metadata.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/reduction/__init__.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/reduction/forceatlas.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/reduction/mde.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/reduction/nn.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/reduction/pca.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/reduction/plot.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/reduction/pumap.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/reduction/tsne.py +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat/reduction/umap.py +0 -0
- /exprmat-0.1.4/exprmat.egg-info/requires.txt → /exprmat-0.1.5/exprmat.egg-info/.ipynb_checkpoints/requires-checkpoint.txt +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat.egg-info/dependency_links.txt +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat.egg-info/not-zip-safe +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/exprmat.egg-info/top_level.txt +0 -0
- {exprmat-0.1.4 → exprmat-0.1.5}/setup.cfg +0 -0
|
@@ -16,7 +16,7 @@ def barplot(
|
|
|
16
16
|
colnames = ['logc' + x for x in [gene]]
|
|
17
17
|
cellnames = ['c' + str(i) for i in range(len(adata.obs_names.tolist()))]
|
|
18
18
|
lognorm = find_variable(adata, gene, layer = slot)
|
|
19
|
-
data = pd.DataFrame(lognorm
|
|
19
|
+
data = pd.DataFrame(lognorm)
|
|
20
20
|
|
|
21
21
|
data.columns = colnames
|
|
22
22
|
if split == None: data['split'] = 'default.split'
|
|
@@ -61,7 +61,36 @@ def barplot(
|
|
|
61
61
|
axes.set_ylabel(gene)
|
|
62
62
|
axes.set_xticks(selected_groups)
|
|
63
63
|
axes.set_yticks([0.0, 2.5])
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
# axes.set_xticklabels(selected_groups, rotation = 45)
|
|
66
|
+
|
|
67
|
+
from scipy import stats
|
|
68
|
+
# here, we will run the wilcox test
|
|
69
|
+
gene_data = dropzeros.loc[dropzeros['name'] == gene,:]
|
|
70
|
+
if group != None:
|
|
71
|
+
xtl = []
|
|
72
|
+
for ct in selected_groups:
|
|
73
|
+
cell_data = gene_data.loc[gene_data['row'] == ct,:]
|
|
74
|
+
groups = [x for _, x in cell_data.groupby(cell_data['split'])]
|
|
75
|
+
values = [x['logc'].tolist() for x in groups]
|
|
76
|
+
if len(values) == 2:
|
|
77
|
+
w = stats.mannwhitneyu(values[0], values[1])
|
|
78
|
+
xtl += [ct + '\n{:.3f}'.format(w.pvalue)]
|
|
79
|
+
else: xtl += [ct]
|
|
80
|
+
|
|
81
|
+
axes.set_xticks(selected_groups)
|
|
82
|
+
axes.set_xticklabels(xtl, rotation = 45)
|
|
83
|
+
|
|
84
|
+
else:
|
|
85
|
+
groups = [x for _, x in gene_data.groupby(gene_data['split'])]
|
|
86
|
+
values = [x['logc'].tolist() for x in groups]
|
|
87
|
+
xtl = 'whole'
|
|
88
|
+
if len(values) == 2:
|
|
89
|
+
w = stats.mannwhitneyu(values[0], values[1])
|
|
90
|
+
xtl = 'whole\n{:.3f}'.format(w.pvalue)
|
|
91
|
+
axes.set_xticklabels([xtl], rotation = 45)
|
|
92
|
+
pass
|
|
93
|
+
|
|
65
94
|
axes.spines[['left', 'top']].set_visible(False)
|
|
66
95
|
axes.yaxis.set_major_formatter(ticker.StrMethodFormatter("{x:.1f}"))
|
|
67
96
|
fig.tight_layout()
|
|
@@ -711,6 +711,21 @@ class experiment:
|
|
|
711
711
|
return pl.fig
|
|
712
712
|
|
|
713
713
|
|
|
714
|
+
@staticmethod
|
|
715
|
+
def rna_plot_expression_bar(
|
|
716
|
+
adata, sample_name, gene, group, split = None,
|
|
717
|
+
slot = 'X', selected_groups = None, palette = ['red', 'black'],
|
|
718
|
+
figsize = (6,3), dpi = 100
|
|
719
|
+
):
|
|
720
|
+
from exprmat.plotting.expression import barplot
|
|
721
|
+
pl = barplot(
|
|
722
|
+
adata, gene = gene, slot = slot, group = group,
|
|
723
|
+
split = split, selected_groups = selected_groups, palette = palette,
|
|
724
|
+
size = figsize, dpi = dpi
|
|
725
|
+
)
|
|
726
|
+
return pl
|
|
727
|
+
|
|
728
|
+
|
|
714
729
|
@staticmethod
|
|
715
730
|
def rna_plot_proportion(
|
|
716
731
|
adata, sample_name, major, minor, plot = 'bar', cmap = 'Turbo',
|
|
@@ -1010,6 +1025,9 @@ class experiment:
|
|
|
1010
1025
|
def plot_rna_cnv_matrix(self, run_on_samples = False, **kwargs):
|
|
1011
1026
|
return self.plot_for_rna(run_on_samples, experiment.rna_plot_cnv_matrix, **kwargs)
|
|
1012
1027
|
|
|
1028
|
+
def plot_rna_expression_bar(self, run_on_samples = False, **kwargs):
|
|
1029
|
+
return self.plot_for_rna(run_on_samples, experiment.rna_plot_expression_bar, **kwargs)
|
|
1030
|
+
|
|
1013
1031
|
|
|
1014
1032
|
# accessor wrappers
|
|
1015
1033
|
|
|
@@ -11,11 +11,11 @@ from exprmat.ansi import error
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
plotting_styles = {
|
|
14
|
-
'font_name': ['
|
|
14
|
+
'font_name': ['Helvetica Neue LT Std', 'Helvetica', 'Arial', 'Ubuntu', 'Verdana'],
|
|
15
15
|
'backend': 'TkAgg'
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
def setup_styles(font_name = '
|
|
18
|
+
def setup_styles(font_name = 'Helvetica Neue LT Std', backend = 'TkAgg'):
|
|
19
19
|
|
|
20
20
|
import matplotlib as mpl
|
|
21
21
|
import matplotlib.pyplot as plt
|
|
@@ -9,6 +9,7 @@ exprmat.egg-info/dependency_links.txt
|
|
|
9
9
|
exprmat.egg-info/not-zip-safe
|
|
10
10
|
exprmat.egg-info/requires.txt
|
|
11
11
|
exprmat.egg-info/top_level.txt
|
|
12
|
+
exprmat.egg-info/.ipynb_checkpoints/requires-checkpoint.txt
|
|
12
13
|
exprmat/clustering/__init__.py
|
|
13
14
|
exprmat/clustering/leiden.py
|
|
14
15
|
exprmat/clustering/spectral.py
|
|
@@ -23,7 +24,6 @@ exprmat/data/gff.py
|
|
|
23
24
|
exprmat/data/private.py
|
|
24
25
|
exprmat/data/ranges.py
|
|
25
26
|
exprmat/data/hsa/genome.tsv.gz
|
|
26
|
-
exprmat/data/mmu/gencode.tsv.gz
|
|
27
27
|
exprmat/data/mmu/genome.tsv.gz
|
|
28
28
|
exprmat/descriptive/__init__.py
|
|
29
29
|
exprmat/descriptive/de.py
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
umap-learn>=0.5.0
|
|
2
|
+
scvi-tools>=1.3.0
|
|
3
|
+
scanpy
|
|
4
|
+
anndata
|
|
5
|
+
mudata
|
|
6
|
+
pandas
|
|
7
|
+
numpy
|
|
8
|
+
matplotlib
|
|
9
|
+
seaborn
|
|
10
|
+
torch>=2.0
|
|
11
|
+
annoy
|
|
12
|
+
scikit-image
|
|
13
|
+
scikit-misc
|
|
14
|
+
igraph
|
|
15
|
+
bbknn
|
|
16
|
+
scanorama
|
|
17
|
+
harmonypy
|
|
18
|
+
pymde
|
|
19
|
+
datashader
|
|
20
|
+
fa2_modified
|
|
21
|
+
pynndescent
|
|
22
|
+
gseapy
|
|
Binary file
|
|
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
|