Skip to content

Commit 297ce8c

Browse files
committed
install options
1 parent 69b7173 commit 297ce8c

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ Refer to the preprint and the [project repository](https://github.com/YosefLab/c
1212
pip install csde
1313
```
1414

15+
By default, this installs JAX with CPU support. To enable GPU support (CUDA), install with the appropriate extra (e.g., for CUDA 12):
16+
```bash
17+
pip install "csde[cuda12]"
18+
```
19+
1520
## Data Requirements
1621

1722
`csde` requires two `AnnData` objects containing gene expression counts. Typically, these are obtained by splitting your full dataset into two groups:

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ dev = [
3333
"isort",
3434
"flake8",
3535
]
36+
cuda12 = ["jax[cuda12]"]
37+
cuda13 = ["jax[cuda13]"]
3638

3739
[tool.setuptools.packages.find]
3840
where = ["src"]

tests/test_csde.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77

88
class TestCSDE(unittest.TestCase):
99
def setUp(self):
10-
# Create synthetic data
1110
n_genes = 10
1211

13-
# adata_pred
1412
n_pred = 100
1513
X_pred = np.random.poisson(lam=2.0, size=(n_pred, n_genes)).astype(float)
1614
obs_pred = pd.DataFrame(
@@ -19,7 +17,6 @@ def setUp(self):
1917
self.adata_pred = anndata.AnnData(X=X_pred, obs=obs_pred)
2018
self.adata_pred.var_names = [f"Gene_{i}" for i in range(n_genes)]
2119

22-
# adata_gt
2320
n_gt = 50
2421
X_gt = np.random.poisson(lam=2.0, size=(n_gt, n_genes)).astype(float)
2522
obs_gt = pd.DataFrame(
@@ -31,8 +28,6 @@ def setUp(self):
3128
self.adata_gt = anndata.AnnData(X=X_gt, obs=obs_gt)
3229
self.adata_gt.var_names = [f"Gene_{i}" for i in range(n_genes)]
3330

34-
# Make sure cell types exist
35-
# Force at least one of each to avoid mapping errors in small random samples
3631
self.adata_pred.obs.iloc[0, 0] = "TypeA"
3732
self.adata_pred.obs.iloc[1, 0] = "TypeB"
3833
self.adata_gt.obs.iloc[0, 0] = "TypeA"

0 commit comments

Comments
 (0)