From f0bc933a8d25939478efdd6fc302927b5795f967 Mon Sep 17 00:00:00 2001 From: Abe Arab Date: Wed, 18 Dec 2024 23:43:44 -0800 Subject: [PATCH 1/5] add `**kwargs` --- screenpro/dashboard/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/screenpro/dashboard/__init__.py b/screenpro/dashboard/__init__.py index dee087f..7d383d0 100644 --- a/screenpro/dashboard/__init__.py +++ b/screenpro/dashboard/__init__.py @@ -220,6 +220,7 @@ def RhoVolcanoPlot( hit_label_col='rho_label', x_min=-2.5, x_max=2.5, y_min=0, y_max='auto', return_html=True, + **kwargs ): p = self._plot_scatter( x_source, y_source, @@ -227,6 +228,7 @@ def RhoVolcanoPlot( up_hit, down_hit, hit_label_col, x_min, x_max, y_min, y_max, + **kwargs ) if return_html: @@ -245,6 +247,7 @@ def GammaVolcanoPlot( hit_label_col='gamma_label', x_min=-2.5, x_max=2.5, y_min=0, y_max='auto', return_html=True, + **kwargs ): p = self._plot_scatter( x_source, y_source, @@ -252,6 +255,7 @@ def GammaVolcanoPlot( up_hit, down_hit, hit_label_col, x_min, x_max, y_min, y_max, + **kwargs ) if return_html: @@ -268,8 +272,9 @@ def RhoGammaScatter( yaxis_label='gamma score', up_hit='resistance_hit', down_hit='sensitivity_hit', hit_label_col='rho_label', - return_html=True, x_min=-2.5, x_max=2.5, y_min=-2.5, y_max=2.5, + return_html=True, + **kwargs ): p = self._plot_scatter( x_source, y_source, @@ -277,6 +282,7 @@ def RhoGammaScatter( up_hit, down_hit, hit_label_col, x_min, x_max, y_min, y_max, + **kwargs ) if return_html: From 1e27afc319b262a2961fe257ec120a60a10a5845 Mon Sep 17 00:00:00 2001 From: Abe Arab Date: Tue, 28 Jan 2025 16:09:11 -0800 Subject: [PATCH 2/5] mend --- screenpro/assays/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screenpro/assays/__init__.py b/screenpro/assays/__init__.py index 7e61487..dcc9988 100644 --- a/screenpro/assays/__init__.py +++ b/screenpro/assays/__init__.py @@ -262,7 +262,7 @@ def calculateDrugScreen(self, score_level: Literal["compare_reps", "compare_guid n_reps=self.n_reps, test=self.test, score_level=score_level, count_filter_threshold=count_filter_threshold, - count_filter_type=count_filter_type + count_filter_type=count_filter_type, **kwargs ) self._add_phenotype_results(run_name, f'tau:{tau_name}', tau) From 7c44a31ed4b7b25162afb8f3959f863153504ad2 Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 29 Jan 2025 14:56:26 -0800 Subject: [PATCH 3/5] Add comma so that bug is fixed --- screenpro/assays/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screenpro/assays/__init__.py b/screenpro/assays/__init__.py index 7e61487..dcc9988 100644 --- a/screenpro/assays/__init__.py +++ b/screenpro/assays/__init__.py @@ -262,7 +262,7 @@ def calculateDrugScreen(self, score_level: Literal["compare_reps", "compare_guid n_reps=self.n_reps, test=self.test, score_level=score_level, count_filter_threshold=count_filter_threshold, - count_filter_type=count_filter_type + count_filter_type=count_filter_type, **kwargs ) self._add_phenotype_results(run_name, f'tau:{tau_name}', tau) From 88d0e527b4a3974839569a0bf7a675fb89c1efb9 Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 29 Jan 2025 15:08:10 -0800 Subject: [PATCH 4/5] Add pytest to environment --- README.md | 4 ++++ environment.yml | 1 + 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 548c6cc..dfb4e03 100644 --- a/README.md +++ b/README.md @@ -339,3 +339,7 @@ by Abolfazl (Abe) Arab ([@abearab](https://github.com/abearab)) as a Research As If you use ScreenPro2 in your research, please cite the following paper. Coming soon... + +## Development +### Testing +Tests can be easily run using the `pytest` framework. diff --git a/environment.yml b/environment.yml index dc52bce..dff04a3 100644 --- a/environment.yml +++ b/environment.yml @@ -29,3 +29,4 @@ dependencies: - simple_colors - adjustText - watermark + - pytest From db55f4257a00c2b184e423ebd4282e7810876eea Mon Sep 17 00:00:00 2001 From: Abe Arab Date: Wed, 29 Jan 2025 21:12:20 -0800 Subject: [PATCH 5/5] Add pyproject.toml for Poetry configuration and remove setup.py --- pyproject.toml | 30 ++++++++++++++++++++++++++++++ screenpro/__init__.py | 5 ----- setup.py | 36 ------------------------------------ 3 files changed, 30 insertions(+), 41 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..f55322c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,30 @@ +[tool.poetry] +name = "ScreenPro2" +version = "0.5.0" +description = "Flexible analysis of high-content CRISPR screening" +authors = [ + "Abe Arab " +] +license = "MIT" +readme = "README.md" +homepage = "https://github.com/ArcInstitute/ScreenPro2" +repository = "https://github.com/ArcInstitute/ScreenPro2" +keywords = ["CRISPR", "screening", "bioinformatics"] +packages = [ + { include = "screenpro" }, + { include = "pyproject.toml" }, +] + +[tool.poetry.dependencies] +python = ">=3.9" + +[tool.poetry.scripts] +screenpro = "screenpro.main:main" + +[tool.poetry.group.test.dependencies] +pytest = "*" +tomli = "*" + +[build-system] +requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"] +build-backend = "poetry_dynamic_versioning.backend" \ No newline at end of file diff --git a/screenpro/__init__.py b/screenpro/__init__.py index 13123b4..7aa5592 100644 --- a/screenpro/__init__.py +++ b/screenpro/__init__.py @@ -29,8 +29,3 @@ from .ngs import GuideCounter from .assays import PooledScreens, GImaps from .dashboard import DrugScreenDashboard - - -__version__ = "0.4.18" -__author__ = "Abe Arab" -__email__ = 'abea@arcinstitute.org' # "abarbiology@gmail.com" diff --git a/setup.py b/setup.py deleted file mode 100644 index 973102f..0000000 --- a/setup.py +++ /dev/null @@ -1,36 +0,0 @@ -from setuptools import setup, find_packages -from screenpro.__init__ import __version__, __author__, __email__ -from pathlib import Path - -this_directory = Path(__file__).parent -long_description = (this_directory / "README.md").read_text() - -setup( - python_requires='>=3.9', - name='ScreenPro2', - description="Flexible analysis of high-content CRISPR screening", - long_description=long_description, - long_description_content_type='text/markdown', - license="MIT License", - - version=__version__, - author=__author__, - author_email=__email__, - maintainer=__author__, - maintainer_email=__email__, - - url='https://github.com/ArcInstitute/ScreenPro2', - packages=find_packages(include=['screenpro', 'screenpro.*']), - entry_points={ - "console_scripts": ["screenpro=screenpro.main:main"], - }, - classifiers=[ - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - - ] -)