From 7e231642412605cbca8878beecaf8844f47c7828 Mon Sep 17 00:00:00 2001 From: Abolfazl Arab Date: Fri, 27 Feb 2026 13:39:18 -0800 Subject: [PATCH 01/10] update year to 2026 --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index f6c17e7..3584ade 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022-2024 ScreenPro2 Development Team. +Copyright (c) 2022-2026 ScreenPro2 Development Team. All rights reserved. Gilbart Lab, UCSF / Arc Institute. Multi-Omics Tech Center, Arc Insititue. From 1125ea65702348dc995ebbbb7e4333643121de9c Mon Sep 17 00:00:00 2001 From: Abolfazl Arab Date: Fri, 27 Feb 2026 13:45:05 -0800 Subject: [PATCH 02/10] Add DOI badge to README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dfb4e03..163b563 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ [![website](https://img.shields.io/badge/website-live-brightgreen)](https://arcinstitute.org/tools/screenpro2) +[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.18807935.svg)](https://doi.org/10.5281/zenodo.18807935) [![PyPI version](https://badge.fury.io/py/ScreenPro2.svg)](https://badge.fury.io/py/ScreenPro2) [![Documentation Status](https://readthedocs.org/projects/screenpro2/badge/?version=latest)](https://screenpro2.readthedocs.io/en/latest/?version=latest) [![Downloads](https://static.pepy.tech/badge/screenpro2)](https://pepy.tech/project/screenpro2) [![Downloads](https://static.pepy.tech/badge/screenpro2/month)](https://pepy.tech/project/screenpro2) -[![CodeQL](https://github.com/ArcInstitute/ScreenPro2/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/ArcInstitute/ScreenPro2/actions/workflows/github-code-scanning/codeql) + # ScreenPro2 ## Introduction From b98b91c1b82bbde3ddb2da852a5f743b5d100afb Mon Sep 17 00:00:00 2001 From: Abolfazl Arab Date: Fri, 27 Feb 2026 13:45:23 -0800 Subject: [PATCH 03/10] bump version to 0.6.0 and update authors in pyproject.toml --- pyproject.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a344ce9..bd4efdd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,10 @@ [tool.poetry] name = "ScreenPro2" description = "Flexible analysis of high-content CRISPR screening" -version = "0.5.1" +version = "0.6.0" authors = [ - "Abe Arab " + "Abolfazl Arab ", + "Nick Youngblut ", ] license = "MIT" readme = "README.md" From 7c4c388495cf584ab1d752b07dabe6b30fb41bf0 Mon Sep 17 00:00:00 2001 From: Abolfazl Arab Date: Thu, 5 Mar 2026 15:18:48 -0800 Subject: [PATCH 04/10] simplify mapped reads readability Refactor mapped reads calculations to simplify code and improve readability. --- screenpro/ngs/cas9.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/screenpro/ngs/cas9.py b/screenpro/ngs/cas9.py index 6f07804..98b3709 100644 --- a/screenpro/ngs/cas9.py +++ b/screenpro/ngs/cas9.py @@ -154,10 +154,9 @@ def map_to_library_single_guide(df_count, library, return_type='all', verbose=Fa ) if verbose: - print("% mapped reads", - 100 * \ - res_map.to_pandas()['count'].fillna(0).sum() / \ - int(res.select(pl.sum("count")).to_pandas()['count']) + print("% mapped reads", 100 * \ + res_map['count'].sum() / \ + res["count"].sum() ) if return_type == 'unmapped': @@ -221,8 +220,8 @@ def map_to_library_dual_guide(df_count, library, get_recombinant=False, return_t if verbose: print("% mapped reads", 100 * \ - res_map.to_pandas()['count'].fillna(0).sum() / \ - int(res.select(pl.sum("count")).to_pandas()['count']) + res_map['count'].sum() / \ + res["count"].sum() ) if get_recombinant: @@ -230,8 +229,8 @@ def map_to_library_dual_guide(df_count, library, get_recombinant=False, return_t if verbose: print("% unmapped reads", 100 * \ - res_unmap.to_pandas()['count'].fillna(0).sum() / \ - int(res.select(pl.sum("count")).to_pandas()['count']) + res_unmap['count'].sum() / \ + res["count"].sum() ) sgRNA_table = pd.concat([ @@ -253,8 +252,8 @@ def map_to_library_dual_guide(df_count, library, get_recombinant=False, return_t if verbose: print("% fully remapped recombination events", 100 * \ - res_recomb_events.drop_nulls().to_pandas()['count'].fillna(0).sum() / \ - int(res.select(pl.sum("count")).to_pandas()['count']) + res_recomb_events.drop_nulls()['count'].sum() / \ + res['count'].sum() ) if return_type == 'unmapped': From f3c9160fe2aafe87dba028e4a0e905701c6c96ee Mon Sep 17 00:00:00 2001 From: Abolfazl Arab Date: Thu, 5 Mar 2026 15:25:18 -0800 Subject: [PATCH 05/10] update workflow Update GitHub Actions workflow to remove master branch support and improve caching for pip dependencies --- .github/workflows/python-package.yml | 69 +++++++++++++--------------- 1 file changed, 33 insertions(+), 36 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index a8c211c..8c5afc2 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -2,13 +2,12 @@ name: Python package on: push: - branches: [ "main", "master" ] + branches: [ "main" ] pull_request: - branches: [ "main", "master" ] + branches: [ "main" ] jobs: build: - runs-on: ${{ matrix.os-version }} name: ${{ matrix.os-version }} (${{ matrix.python-version }}) @@ -16,38 +15,36 @@ jobs: fail-fast: false matrix: os-version: ["ubuntu-latest"] - python-version: ["3.9", "3.10", "3.11"] #, "3.12"] + python-version: ["3.9", "3.10", "3.11"] steps: - - uses: actions/checkout@v3 - - name: "Set up Python ${{ matrix.python-version }}" - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - cache: 'pip' - - name: "Install flake8" - run: | - pip install flake8 - - name: "Lint with flake8" - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: "Install miniconda" - uses: conda-incubator/setup-miniconda@v3 - with: - miniconda-version: "latest" - auto-update-conda: true - python-version: ${{ matrix.python-version }} - channels: conda-forge,bioconda - environment-file: environment.yml - # - name: "Install pytest" - # shell: bash -l {0} - # run: | - # python -m pip install --upgrade pip - # pip install setuptools wheel build pytest - # - name: "Test with pytest" - # shell: bash -l {0} - # run: | - # pytest -s + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + + - name: Cache pip dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt', 'environment.yml') }} + + - name: Install flake8 + run: pip install flake8 + + - name: Lint with flake8 + run: | + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + + - name: Install miniconda + uses: conda-incubator/setup-miniconda@v3 + with: + miniconda-version: "latest" + auto-update-conda: true + python-version: ${{ matrix.python-version }} + channels: conda-forge,bioconda + environment-file: environment.yml From 9dd0528e253558bbb0b3344ee1857a3c3390a89a Mon Sep 17 00:00:00 2001 From: Abolfazl Arab Date: Thu, 5 Mar 2026 15:42:03 -0800 Subject: [PATCH 06/10] mend Remove pip cache configuration from Python workflow --- .github/workflows/python-package.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 8c5afc2..bd718d9 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -24,7 +24,6 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - cache: 'pip' - name: Cache pip dependencies uses: actions/cache@v4 From 78cf1044dffd21260327411bd7aa188fb902afaf Mon Sep 17 00:00:00 2001 From: Abolfazl Arab Date: Thu, 5 Mar 2026 15:43:27 -0800 Subject: [PATCH 07/10] Update screenpro/ngs/cas9.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- screenpro/ngs/cas9.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/screenpro/ngs/cas9.py b/screenpro/ngs/cas9.py index 98b3709..23e0173 100644 --- a/screenpro/ngs/cas9.py +++ b/screenpro/ngs/cas9.py @@ -154,9 +154,9 @@ def map_to_library_single_guide(df_count, library, return_type='all', verbose=Fa ) if verbose: - print("% mapped reads", 100 * \ - res_map['count'].sum() / \ - res["count"].sum() + print( + "% mapped reads", + 100 * res_map['count'].sum() / res["count"].sum() ) if return_type == 'unmapped': From 0fc302b60e47adec4d55180bb5874aeb858030e5 Mon Sep 17 00:00:00 2001 From: Abolfazl Arab Date: Thu, 5 Mar 2026 16:38:01 -0800 Subject: [PATCH 08/10] Fix indexing method for db_untreated and db_treated in PooledScreens class --- screenpro/assays/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/screenpro/assays/__init__.py b/screenpro/assays/__init__.py index dcc9988..714c592 100644 --- a/screenpro/assays/__init__.py +++ b/screenpro/assays/__init__.py @@ -71,8 +71,8 @@ def _calculateGrowthFactor(self, untreated, treated, db_rate_col): growth_factors = [] # calculate growth factor for gamma, tau, or rho score per replicates for replicate in adat.obs.replicate.unique(): - db_untreated = adat.obs.query(f'condition == "{untreated}" & replicate == {str(replicate)}')[db_rate_col][0] - db_treated = adat.obs.query(f'condition == "{treated}" & replicate == {str(replicate)}')[db_rate_col][0] + db_untreated = adat.obs.query(f'condition == "{untreated}" & replicate == {str(replicate)}')[db_rate_col].iloc[0] + db_treated = adat.obs.query(f'condition == "{treated}" & replicate == {str(replicate)}')[db_rate_col].iloc[0] growth_factors.append(('gamma', db_untreated, replicate, f'gamma_replicate_{replicate}')) growth_factors.append(('tau', db_treated, replicate, f'tau_replicate_{replicate}')) From dacf6049e769d4a0dea8c1a0fbf411f201d0b95c Mon Sep 17 00:00:00 2001 From: Abolfazl Arab Date: Thu, 5 Mar 2026 18:29:29 -0800 Subject: [PATCH 09/10] update python version matrix --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index bd718d9..40f589d 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,7 +15,7 @@ jobs: fail-fast: false matrix: os-version: ["ubuntu-latest"] - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.11"] steps: - uses: actions/checkout@v3 From 3ea4fb21aab603262ad09deb3ea1bd86ea67dfea Mon Sep 17 00:00:00 2001 From: Abolfazl Arab Date: Thu, 5 Mar 2026 20:57:35 -0800 Subject: [PATCH 10/10] bump version to 0.6.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bd4efdd..3e1949d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "ScreenPro2" description = "Flexible analysis of high-content CRISPR screening" -version = "0.6.0" +version = "0.6.1" authors = [ "Abolfazl Arab ", "Nick Youngblut ",