Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into batch_correct
Browse files Browse the repository at this point in the history
  • Loading branch information
yihming committed Jan 20, 2024
2 parents dfb98c7 + 40e6ef5 commit 525af8d
Show file tree
Hide file tree
Showing 46 changed files with 1,864 additions and 490 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.7', '3.8', '3.9']
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -48,10 +48,6 @@ jobs:
- name: One sample input test
run: |
bash tests/run_one_sample.sh
- name: Hashing CITE-Seq pipeline test
run: |
bash tests/run_hashing_citeseq.sh
pytest tests/test_hashing_citeseq.py
- name: iNMF test
run: |
bash tests/run_inmf.sh
Expand Down
33 changes: 31 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
image: latest
os: ubuntu-22.04
tools:
python: "3.9"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
version: 3.8
install:
- requirements: docs/requirements.txt
1 change: 1 addition & 0 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Cluster Algorithms
cluster
louvain
leiden
split_one_cluster
spectral_louvain
spectral_leiden

Expand Down
8 changes: 4 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@
# -- Project information -----------------------------------------------------

project = "Pegasus"
copyright = "2022 Genentech, Inc. All rights reserved."
copyright = "2024 Genentech, Inc. All rights reserved."
author = (
"Yiming Yang, Joshua Gould and Bo Li"
)

# The short X.Y version
version = "1.7"
version = "1.9"
# The full version, including alpha/beta/rc tags
release = "1.7.1"
release = "1.9.0"


# -- General configuration ---------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
#needs_sphinx = '1.7'
#needs_sphinx = '1.8'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Release Highlights in Current Stable
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. include:: release_notes/version_1_7.rst
.. include:: release_notes/version_1_9.rst

.. toctree::
:maxdepth: 1
Expand Down
10 changes: 10 additions & 0 deletions docs/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ Release Notes
.. note::
Also see the release notes of `PegasusIO <https://pegasusio.readthedocs.io/en/stable/release_notes.html>`__.

Version 1.9
~~~~~~~~~~~~~

.. include:: release_notes/version_1_9.rst

Version 1.8
~~~~~~~~~~~~~

.. include:: release_notes/version_1_8.rst

Version 1.7
~~~~~~~~~~~~~

Expand Down
21 changes: 21 additions & 0 deletions docs/release_notes/version_1_8.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
1.8.1 :small:`August 23, 2023`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

* Bug fix in cell marker JSON files for ``infer_cell_types`` function.

1.8.0 :small:`July 21, 2023`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

**New Feature and Improvement**

* Updata ``human_immune`` and ``human_lung`` marker sets.
* Add ``mouse_liver`` marker set.
* Add `split_one_cluster <./api/pegasus.split_one_cluster.html>`_ function to subcluster one cluster into a specified number of subclusters.
* Update **neighbors** function to set ``use_cache=False`` by default, and adjust K to ``min(K, int(sqrt(n_samples)))``. [PR `272 <https://github.com/lilab-bcb/pegasus/pull/272>`_]
* In **infer_doublets** function, argument ``manual_correction`` now accepts a float number threshold specified by users for cut-off. [PR `275 <https://github.com/lilab-bcb/pegasus/pull/275>`_]

**Bug Fix**

* Fix divide by zero issue in ``integrative_nmf`` function. [PR `258 <https://github.com/lilab-bcb/pegasus/pull/258>`_]
* Compatibility with Pandas v2.0. [PR `261 <https://github.com/lilab-bcb/pegasus/pull/261>`_]
* Allow ``infer_doublets`` to use any count matrix with key name specified by users. [PR `268 <https://github.com/lilab-bcb/pegasus/pull/268>`_ Thanks to `Donghoon Lee <https://github.com/hoondy>`_]
14 changes: 14 additions & 0 deletions docs/release_notes/version_1_9.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
1.9.0 :small:`January 19, 2024`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

**New Feature and Improvement**

* ``calculate_z_score`` works with sparse count matrix. [PR `276 <https://github.com/lilab-bcb/pegasus/pull/276>`_ Thanks to `Jayaram Kancherla <https://github.com/jkanche>`_]
* Plotting functions (``scatter``, ``dotplot``, ``violin``, ``heatmap``) now give warnings on genes/attributes not existing in the data, and skip them in the plots.
* Improve ``heatmap``:

* Add ``show_sample_name`` parameter for cases of pseudo-bulk data, nanoString DSP data, etc.
* Use Scipy's linkage (``scipy.cluster.hierarchy.linkage``) for dendrograms to use its optimal ordering feature for better results (see ``groupby_optimal_ordering`` parameter).

* Update human lung and mouse immune markers used by ``infer_cell_types`` function.
* Expose ``online_batch_size`` parameter in ``nmf`` and ``integrative_nmf`` functions.
1 change: 0 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ natsort
joblib
psutil
numba
importlib_metadata; python_version < '3.8'
umap-learn
forceatlas2-python
pyarrow
Expand Down
1 change: 1 addition & 0 deletions pegasus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
de_analysis,
markers,
write_results_to_excel,
cluster_specific_markers,
find_markers,
infer_path,
calc_signature_score,
Expand Down
6 changes: 5 additions & 1 deletion pegasus/annotate_cluster/annotate_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@ def infer_cell_types(
* ``'mouse_immune'`` for mouse immune cells;
* ``'human_brain'`` for human brain cells;
* ``'mouse_brain'`` for mouse brain cells;
* ``'human_lung'`` for human lung cells.
* ``'human_lung'`` for human lung cells;
* ``'mouse_lung'`` for mouse lung cells;
* ``'mouse_liver'`` for mouse liver cells.
* If ``Dict``, it refers to a Python dictionary describing the markers.
de_test: ``str``, optional, default: ``"mwu"``
Expand Down Expand Up @@ -320,6 +322,8 @@ def infer_cell_types(
human_brain="human_brain_cell_markers.json",
mouse_brain="mouse_brain_cell_markers.json",
human_lung="human_lung_cell_markers.json",
mouse_lung="mouse_lung_cell_markers.json",
mouse_liver="mouse_liver_cell_markers.json",
)

if isinstance(markers, str):
Expand Down
Loading

0 comments on commit 525af8d

Please sign in to comment.