Skip to content

Commit 0426120

Browse files
authored
Merge pull request #11 from ChoBioLab/qa
2.0.1
2 parents c64d5b2 + de99f54 commit 0426120

74 files changed

Lines changed: 40628 additions & 24555 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ var/
2929
wheels/
3030
share/python-wheels/
3131
*.egg-info/
32+
*.wolf*.py
3233
.installed.cfg
3334
*.egg
3435
MANIFEST

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,36 @@ with desired environment name):
2323
`git clone https://github.com/ChoBioLab/corescpy.git`, or
2424
look above for the green "Code" button and press it for instructions.
2525

26-
5. Naviate to the repository directory (replace <DIRECTORY> with your path):
26+
5. Navigate to the repository directory (replace <DIRECTORY> with your path):
2727
`cd <DIRECTORY>`
2828

2929
6. Install the package with pip. (Ensure you have pip installed.)
3030
`pip install .`
3131

32+
7. If you have issues with resolving/finding the most up-to-date version of the `spatialdata` and/or `spatialdata-io` packages, try running:
33+
```
34+
pip install git+https://github.com/scverse/spatialdata
35+
pip install git+https://github.com/scverse/spatialdata-io
36+
```
37+
in your terminal while in your conda environment, then re-try step (6).
38+
39+
8. If you're planning to use this environment with Jupyter notebooks, run `conda install nb_conda_kernels`, then `pip install ipykernel`.
40+
41+
42+
** Note: To use GPU resources, use `conda install -c rapidsai -c nvidia -c conda-forge cugraph cuml cudf` and install the gpu version of coreSCpy (which should `pip install scanpy[rapids]`).
43+
44+
** Tip: If you run out of space, run:
45+
```
46+
pip cache purge
47+
conda clean -i
48+
conda clean -t
49+
```
50+
51+
If you have issues seeing the environment when choosing the kernel for your Jupyter notebook:
52+
```
53+
conda install nb_conda_kernels
54+
```
55+
3256
## Usage
3357

3458
1. You can now load `corescpy` like any other distributed Python package.
@@ -64,7 +88,7 @@ Here are the methods (applicable to scRNA-seq generally, not just perturbations)
6488

6589
* `self.preprocess(...)`: Perform filtering, normalization, scaling, quality control analysis, selection for highly variable genes, regressing out confounds, and intial exploration of the data (e.g., cell counts, mitochondrial counts, etc.).
6690
* `self.cluster(...)`: Perform dimensionality reduction (e.g., PCA) and clustering (Louvain or Leiden), as well as related visualization.
67-
* `self.plot(...)`: Create additional basic plots (e.g., dot, matrix, and violin gene expression plots).
91+
* `self.plot(...)`: Create additional basic plots (e.g., dot, matrix, and violin gene expression plots). Use `self.plot_compare(...)` to make plots comparing gene expression across groups.
6892

6993
The following perturbation-specific methods can be executed optionally and in any order:
7094

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Build & Install Package (& Test if desired)
33

44
# python3 -m build
5-
# pip install dist/corescpy-0.1.0.tar.gz
5+
# pip install dist/corescpy-0.2.0.tar.gz
66
# python3 setup.py install
77
# python3 setup.py develop
88

corescpy/__init__.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
11
# __init__.py
22
# pylint: disable=unused-import
33

4+
import sys
5+
from .class_sc import Omics
6+
from .class_crispr import Crispr
7+
from .class_spatial import Spatial
48
from . import utils as tl
59
from . import processing as pp
610
from . import analysis as ax
711
from . import visualization as pl
8-
from .class_sc import Omics
9-
from .class_crispr import Crispr
10-
from .class_spatial import Spatial
12+
from . import class_crispr, class_sc, class_spatial
1113

12-
import sys
14+
mod = ["ax", "pl", "pp", "tl", "Omics", "Crispr", "Spatial"]
15+
sys.modules.update({f"{__name__}.{m}": globals()[m] for m in mod})
16+
17+
18+
def get_panel_constants(**kwargs):
19+
from .constants import get_panel_constants as gpc # noqa: E402
20+
return gpc(**kwargs)
1321

14-
sys.modules.update({f"{__name__}.{m}": globals()[m]
15-
for m in ["ax", "pl", "pp", "tl",
16-
"Omics", "Crispr", "Spatial"]})
1722

1823
__all__ = [
19-
"ax", "pl", "pp", "tl", "Omics", "Crispr", "Spatial"
24+
"ax", "pl", "pp", "tl", "Omics", "Crispr", "Spatial",
25+
"processing", "analysis", "visualization", "utils",
26+
"class_sc", "class_crispr", "class_spatial", "defaults",
27+
"get_panel_constants"
2028
]

corescpy/analysis/__init__.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,21 @@
66
perform_mixscape, perform_augur, perform_differential_prioritization,
77
compute_distance, perform_gsea, perform_gsea_pt,
88
perform_pathway_interference, perform_dea, calculate_dea_deseq2)
9-
from .clustering import cluster, find_marker_genes, perform_celltypist
9+
from .clustering import (cluster, find_marker_genes, make_marker_genes_df,
10+
perform_celltypist, annotate_by_markers,
11+
print_marker_info)
1012
from .composition import analyze_composition
11-
from .communication import analyze_receptor_ligand, analyze_causal_network
13+
from .communication import (analyze_receptor_ligand, analyze_causal_network)
14+
from .quantification import (classify_gex_cells, classify_coex_cells,
15+
classify_tx)
1216

1317
__all__ = [
1418
"perform_mixscape", "perform_augur",
1519
"perform_differential_prioritization", "compute_distance",
1620
"perform_gsea", "perform_gsea_pt", "perform_pathway_interference",
17-
"perform_dea", "calculate_dea_deseq2", "cluster", "find_marker_genes",
18-
"perform_celltypist", "analyze_composition",
19-
"analyze_receptor_ligand", "analyze_causal_network"
21+
"perform_dea", "calculate_dea_deseq2", "cluster",
22+
"find_marker_genes", "make_marker_genes_df", "print_marker_info",
23+
"perform_celltypist", "annotate_by_markers", "analyze_composition",
24+
"analyze_receptor_ligand", "analyze_causal_network",
25+
"classify_gex_cells", "classify_coex_cells", "classify_tx"
2026
]

0 commit comments

Comments
 (0)