Skip to content

Commit 7a787d1

Browse files
author
saurabhinfocusp
committed
updated_python_version_for_pydentic_test_and_anndata
1 parent 14cb60a commit 7a787d1

18 files changed

Lines changed: 27 additions & 30 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: 2 additions & 2 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
```

config/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ data:
1616
num_workers: 1
1717

1818
train_val_test:
19-
full_datapath: 'data/modified_adata.h5ad'
19+
full_datapath: 'path/to/adata.h5ad'
2020
splitter_config:
2121
name: GroupSplitter
2222
params:

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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)