Skip to content

Commit ec1b033

Browse files
authored
Merge pull request #37 from broadinstitute/ziq
Ziq
2 parents 2883608 + a7fa47c commit ec1b033

File tree

3 files changed

+800
-963
lines changed

3 files changed

+800
-963
lines changed

environment.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ dependencies:
22
- python=3.8.5
33
- pip=20.2.2
44
- pytorch=1.4.0
5-
- pandas=1.1.0
6-
- numpy=1.19.1
75
- scipy=1.5.2
86
- matplotlib-base=3.3.1
97
- seaborn=0.11.1
108
- jupyterlab=2.2.6
119
- nb_conda=2.2.1
1210
- pip:
11+
- numpy==1.20
12+
- pandas==1.2.0
1313
- scanpy>=1.6.0
1414
- scikit-learn
15-
- tqdm
15+
- tqdm

tangram/utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,9 @@ def eval_metric(df_all_genes, test_genes=None):
718718
pol_xs = np.linspace(0, 1, 10) # x linearly spaced
719719
pol = np.poly1d(pol_cs) # build polynomial as function
720720
pol_ys = [pol(x) for x in pol_xs] # compute polys
721+
722+
if pol_ys[0] > 1:
723+
pol_ys[0] = 1
721724

722725
# if real root when y = 0, add point (x, 0):
723726
roots = pol.r
@@ -729,8 +732,8 @@ def eval_metric(df_all_genes, test_genes=None):
729732

730733
if root is not None:
731734
pol_xs = np.append(pol_xs, root)
732-
pol_ys = np.append(pol_ys, 0)
733-
735+
pol_ys = np.append(pol_ys, 0)
736+
734737
np.append(pol_xs, 1)
735738
np.append(pol_ys, pol(1))
736739

tutorial_sq_tangram.ipynb

Lines changed: 792 additions & 958 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)