Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11"]

steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
Expand All @@ -28,7 +29,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
python -m pip install pip install git+https://github.com/CostaLab/scACCorDiON/
python -m pip install git+https://github.com/jsnagai/scACCorDiON/
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
Expand Down
Binary file added dist/scaccordion-0.2.1.5-py2.py3-none-any.whl
Binary file not shown.
Binary file added dist/scaccordion-0.2.1.5-py3-none-any.whl
Binary file not shown.
Binary file added dist/scaccordion-0.2.1.5.tar.gz
Binary file not shown.
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ include = [


[tool.poetry.dependencies]
python = "^3.10"
scikit-learn = "1.5.2"
matplotlib = "^3.9.1"
python = "^3.10"
seaborn = "0.13.2"
pot = "^0.9.4"
rpy2 = "3.5.10"
Expand All @@ -22,10 +22,11 @@ tqdm = "4.66.5"
tables = "^3.9.1"
skimpy = "^0.0.14"
phate = "^1.0.11"
conorm = "^1.2.0"
conorm = "1.2.0"
scipy = "^1.6.0"
numpy="^1.24"
genieclust="^1.1.5"
genieclust="1.1.5"
kmedoids = "^0.5.3.1"

[build-system]
requires = ["poetry-core"]
Expand Down
3,077 changes: 1,714 additions & 1,363 deletions requirements.txt

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions scaccordion/tools/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ def load_peng2019_metadata():
# This is a stream-like object. If you want the actual info, call
# stream.read()
import pandas as pd
stream = importlib.resources.path("scaccordion.data", 'Peng_PDAC_metaacc.h5ad')
stream = importlib.resources.files("scaccordion.data")/ 'Peng_PDAC_metaacc.h5ad'
return pd.read_hdf(stream)


def make_gl_ciclic_graph():
import pandas as pd
import networkx as nx
stream = importlib.resources.path("scaccordion.data", 'glexample.hdf')
stream = importlib.resources.files("scaccordion.data")/ 'glexample.hdf'
return (nx.from_pandas_edgelist(pd.read_hdf(stream),create_using=nx.DiGraph, edge_attr=True))
4 changes: 2 additions & 2 deletions scaccordion/tools/distances.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def getGRD(G,weight='weight',normalize=False, degnorm=False, axis=1):
"""
cond1 = type(G) is not nx.DiGraph
cond2 = isspmatrix(G)!=True
assert(cond1 or cond2, "Please make sure you have the correct input")
#assert(cond1 or cond2, "Please make sure you have the correct input")
if isspmatrix(G)==False:
G = nx.to_scipy_sparse_array(G)
X = directed_res(G,weight,normalize,axis)[0]
Expand Down Expand Up @@ -174,7 +174,7 @@ def normalizeAdj(G, axis):
row_sums = np.array(G.sum(axis=1)).flatten()
row_sums[row_sums == 0] = 1
G = G.multiply(1 / row_sums[:, np.newaxis])
elif normalize and axis==0:
elif axis==0:
sparse_matrix = G.tocsc()
# Compute column sums
sums = np.array(sparse_matrix.sum(axis=0)).flatten()
Expand Down