Skip to content

Commit a660368

Browse files
authored
Merge pull request #2 from jsnagai/main
Test update
2 parents ed7f8b3 + 4bb9178 commit a660368

8 files changed

Lines changed: 1725 additions & 1372 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.10", "3.11", "3.12"]
19+
python-version: ["3.10", "3.11"]
2020

2121
steps:
2222
- uses: actions/checkout@v4
23+
- uses: r-lib/actions/setup-r@v2
2324
- name: Set up Python ${{ matrix.python-version }}
2425
uses: actions/setup-python@v3
2526
with:
@@ -28,7 +29,7 @@ jobs:
2829
run: |
2930
python -m pip install --upgrade pip
3031
python -m pip install flake8 pytest
31-
python -m pip install pip install git+https://github.com/CostaLab/scACCorDiON/
32+
python -m pip install git+https://github.com/jsnagai/scACCorDiON/
3233
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
3334
- name: Lint with flake8
3435
run: |
43.2 MB
Binary file not shown.
43.2 MB
Binary file not shown.

dist/scaccordion-0.2.1.5.tar.gz

43.2 MB
Binary file not shown.

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ include = [
1010

1111

1212
[tool.poetry.dependencies]
13-
python = "^3.10"
1413
scikit-learn = "1.5.2"
1514
matplotlib = "^3.9.1"
15+
python = "^3.10"
1616
seaborn = "0.13.2"
1717
pot = "^0.9.4"
1818
rpy2 = "3.5.10"
@@ -22,10 +22,11 @@ tqdm = "4.66.5"
2222
tables = "^3.9.1"
2323
skimpy = "^0.0.14"
2424
phate = "^1.0.11"
25-
conorm = "^1.2.0"
25+
conorm = "1.2.0"
2626
scipy = "^1.6.0"
2727
numpy="^1.24"
28-
genieclust="^1.1.5"
28+
genieclust="1.1.5"
29+
kmedoids = "^0.5.3.1"
2930

3031
[build-system]
3132
requires = ["poetry-core"]

requirements.txt

Lines changed: 1714 additions & 1363 deletions
Large diffs are not rendered by default.

scaccordion/tools/datasets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ def load_peng2019_metadata():
2424
# This is a stream-like object. If you want the actual info, call
2525
# stream.read()
2626
import pandas as pd
27-
stream = importlib.resources.path("scaccordion.data", 'Peng_PDAC_metaacc.h5ad')
27+
stream = importlib.resources.files("scaccordion.data")/ 'Peng_PDAC_metaacc.h5ad'
2828
return pd.read_hdf(stream)
2929

3030

3131
def make_gl_ciclic_graph():
3232
import pandas as pd
3333
import networkx as nx
34-
stream = importlib.resources.path("scaccordion.data", 'glexample.hdf')
34+
stream = importlib.resources.files("scaccordion.data")/ 'glexample.hdf'
3535
return (nx.from_pandas_edgelist(pd.read_hdf(stream),create_using=nx.DiGraph, edge_attr=True))

scaccordion/tools/distances.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def getGRD(G,weight='weight',normalize=False, degnorm=False, axis=1):
7070
"""
7171
cond1 = type(G) is not nx.DiGraph
7272
cond2 = isspmatrix(G)!=True
73-
assert(cond1 or cond2, "Please make sure you have the correct input")
73+
#assert(cond1 or cond2, "Please make sure you have the correct input")
7474
if isspmatrix(G)==False:
7575
G = nx.to_scipy_sparse_array(G)
7676
X = directed_res(G,weight,normalize,axis)[0]
@@ -174,7 +174,7 @@ def normalizeAdj(G, axis):
174174
row_sums = np.array(G.sum(axis=1)).flatten()
175175
row_sums[row_sums == 0] = 1
176176
G = G.multiply(1 / row_sums[:, np.newaxis])
177-
elif normalize and axis==0:
177+
elif axis==0:
178178
sparse_matrix = G.tocsc()
179179
# Compute column sums
180180
sums = np.array(sparse_matrix.sum(axis=0)).flatten()

0 commit comments

Comments
 (0)