Skip to content

Commit b5f72ce

Browse files
Merge pull request #31 from infocusp/scaLR-updates
Anndata_python_version_other updates
2 parents b97553b + 7a787d1 commit b5f72ce

20 files changed

Lines changed: 83 additions & 884 deletions

.github/workflows/docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313
- uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.10.20"
1416
- name: Install scalr requirements
1517
run: |
1618
pip install -r requirements.txt

.github/workflows/publish-to-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up Python
1616
uses: actions/setup-python@v5
1717
with:
18-
python-version: "3.9"
18+
python-version: "3.10.20"
1919
- name: Install pypa/build
2020
run: >-
2121
python3 -m

.github/workflows/run_isort.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010

1111
steps:
1212
- uses: actions/checkout@v2
13-
- name: Set up Python 3.9
13+
- name: Set up Python 3.10.20
1414
uses: actions/setup-python@v2
1515
with:
16-
python-version: 3.9
16+
python-version: "3.10.20"
1717
- name: Install isort
1818
run: pip install isort
1919
- name: Run isort

.github/workflows/run_pytest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: ["3.9"]
14+
python-version: ["3.10.20"]
1515

1616
steps:
1717
- uses: actions/checkout@v3

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
## Pre-requisites and installation scaLR
2828

2929

30-
- ScaLR can be installed using git or pip. It is tested in Python 3.10 and it is recommended to use that environment.
30+
- ScaLR can be installed using git or pip. It is tested in Python 3.10.20 and it is recommended to use that environment.
3131

3232
```
33-
conda create -n scaLR_env python=3.10
33+
conda create -n scaLR_env python=3.10.20
3434
3535
conda activate scaLR_env
3636
```
@@ -374,5 +374,4 @@ Performs evaluation of best model trained on user-defined metrics on the test se
374374
375375
## Citation
376376
377-
Jogani Saiyam, Anand Santosh Pol, Mayur Prajapati, Amit Samal, Kriti Bhatia, Jayendra Parmar, Urvik Patel, Falak Shah, Nisarg Vyas, and Saurabh Gupta. "scaLR: a low-resource deep neural network-based platform for single cell analysis and biomarker discovery." bioRxiv (2024): 2024-09.
378-
377+
Jogani, S., Pol, A. S., Prajapati, M., Samal, A., Bhatia, K., Parmar, J., ... & Gupta, S. (2025). scaLR: a low-resource deep neural network-based platform for single cell analysis and biomarker discovery. Briefings in Bioinformatics, 26(3), bbaf243.

config/config.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Config file for pipeline run.
22

33
# DEVICE SETUP.
4-
device: 'cuda'
4+
device: 'cpu'
55

66
# EXPERIMENT.
77
experiment:
@@ -16,8 +16,7 @@ data:
1616
num_workers: 1
1717

1818
train_val_test:
19-
full_datapath: '/path/to/anndata.h5ad'
20-
19+
full_datapath: 'path/to/adata.h5ad'
2120
splitter_config:
2221
name: GroupSplitter
2322
params:
@@ -35,7 +34,7 @@ data:
3534
# params:
3635
# **args
3736

38-
target: Cell_Type
37+
target: cell_type
3938

4039

4140
# FEATURE SELECTION.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ build-backend = "hatchling.build"
66

77
name = "pyscaLR"
88
version = "1.1.0"
9-
requires-python = ">=3.10"
9+
requires-python = ">=3.10.20"
1010
authors = [
1111
{ name="Infocusp", email="saurabh@infocusp.com" },
1212
]
1313
description = "scaLR: Single cell analysis using low resource."
1414
readme = "README.md"
1515
classifiers = [
16-
"Programming Language :: Python :: 3.9",
16+
"Programming Language :: Python :: 3.10",
1717
"Operating System :: OS Independent",
1818
"Intended Audience :: Science/Research"
1919
]

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
anndata==0.10.9
1+
anndata>=0.11.2,<0.12
22
isort==5.13.2
33
loky==3.4.1
44
memory-profiler==0.61.0
@@ -15,4 +15,4 @@ tensorboard==2.17.0
1515
toml==0.10.2
1616
torch==2.4.1 --index-url https://download.pytorch.org/whl/cu118
1717
tqdm==4.66.5
18-
yapf==0.40.2
18+
yapf==0.40.2

scalr/analysis/dge_lmem.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
from anndata import AnnData
1313
from anndata import ImplicitModificationWarning
14-
import anndata as ad
1514
from anndata.experimental import AnnCollection
1615
from joblib import delayed
1716
from joblib import Parallel

scalr/analysis/dge_pseudobulk.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
from os import path
55
from typing import Optional, Tuple, Union
66

7-
from anndata import AnnData
8-
import anndata as ad
7+
from anndata import AnnData, concat
98
from anndata.experimental import AnnCollection
109
import matplotlib.pyplot as plt
1110
import numpy as np
@@ -94,15 +93,15 @@ def _make_design_matrix(self, adata: AnnData, cell_type: str):
9493
for sum_sample in condition_subset.obs[self.sum_column].unique():
9594
sum_subset = condition_subset[condition_subset.obs[
9695
self.sum_column] == sum_sample]
97-
subdata = ad.AnnData(
96+
subdata = AnnData(
9897
X=sum_subset[:].X.sum(axis=0).reshape(
9998
1, len(sum_subset.var_names)),
10099
var=DataFrame(index=sum_subset.var_names),
101100
obs=DataFrame(index=[f'{sum_sample}_{condition}']))
102101
subdata.obs[self.design_factor_no_undrscr] = [condition]
103102
design_matrix_list.append(subdata)
104103

105-
design_matrix = ad.concat(design_matrix_list)
104+
design_matrix = concat(design_matrix_list)
106105
return design_matrix
107106

108107
def get_differential_expression_results(self, design_matrix: AnnData,

0 commit comments

Comments
 (0)