From 667727db77464185ab33b02cb8447144ac6bc809 Mon Sep 17 00:00:00 2001 From: Tanish211413 <83411069+Tanish211413@users.noreply.github.com> Date: Thu, 6 Mar 2025 13:43:16 +0530 Subject: [PATCH 01/11] Update cli.py --- bioimage_quant/cli.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/bioimage_quant/cli.py b/bioimage_quant/cli.py index 68ac151..7167756 100644 --- a/bioimage_quant/cli.py +++ b/bioimage_quant/cli.py @@ -1,12 +1,15 @@ import argparse def cli(): + parser = argparse.ArgumentParser(description="GelQuant CLI") + parser.add_argument('test', nargs='?', help="Test argument (optional)") - parser = argparse.ArgumentParser() - parser.add_argument('test') - - args = parser.parse_args() - print(args.test) + try: + args = parser.parse_args() + print(args.test if args.test else "No argument provided") + except SystemExit: + print("Usage: gelquant ") if __name__ == "__main__": cli() + From e9c75c8714c74b53579a6c6ffff8803d720a8ec3 Mon Sep 17 00:00:00 2001 From: Tanish211413 <83411069+Tanish211413@users.noreply.github.com> Date: Thu, 6 Mar 2025 13:47:28 +0530 Subject: [PATCH 02/11] Update setup.py --- setup.py | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/setup.py b/setup.py index a8efd16..ad8175e 100644 --- a/setup.py +++ b/setup.py @@ -13,14 +13,14 @@ # Package meta-data. NAME = 'gelquant' -DESCRIPTION = 'gel analysis pipeline' +DESCRIPTION = 'Gel analysis pipeline' URL = 'https://github.com/jharman25/gelquant' EMAIL = 'josephharman25@gmail.com' AUTHOR = 'Joseph Harman' # What packages are required for this module to be executed? REQUIRED = [ - 'matplotlib', 'numpy', 'pandas' + 'matplotlib', 'numpy', 'pillow', 'pandas', 'natsort', 'scipy' ] # The rest you shouldn't have to touch too much :) @@ -32,13 +32,20 @@ # Import the README and use it as the long-description. # Note: this will only work if 'README.rst' is present in your MANIFEST.in file! -with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f: - long_description = '\n' + f.read() +try: + with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f: + long_description = '\n' + f.read() +except FileNotFoundError: + long_description = DESCRIPTION # Fallback to short description if README is missing # Load the package's __version__.py module as a dictionary. about = {} -with open(os.path.join(here, NAME, '__version__.py')) as f: - exec(f.read(), about) +version_path = os.path.join(here, NAME, '__version__.py') +if os.path.exists(version_path): + with open(version_path) as f: + exec(f.read(), about) +else: + about['__version__'] = '0.1.0' # Default version if file is missing class UploadCommand(Command): @@ -88,7 +95,7 @@ def run(self): # py_modules=['mypackage'], entry_points={ - 'console_scripts': ['test_prote=gelquant.cli:cli'], + 'console_scripts': ['gelquant=gelquant.cli:cli'], }, install_requires=REQUIRED, include_package_data=True, @@ -97,14 +104,15 @@ def run(self): # Trove classifiers # Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python', + 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Pywthon :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy' ], @@ -113,3 +121,4 @@ def run(self): 'upload': UploadCommand, }, ) + From 59e629e05599c02ec757d8e37ac8c8bd736c7c12 Mon Sep 17 00:00:00 2001 From: Tanish211413 <83411069+Tanish211413@users.noreply.github.com> Date: Thu, 6 Mar 2025 13:50:57 +0530 Subject: [PATCH 03/11] Update cli.py --- bioimage_quant/cli.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bioimage_quant/cli.py b/bioimage_quant/cli.py index 7167756..f84be29 100644 --- a/bioimage_quant/cli.py +++ b/bioimage_quant/cli.py @@ -2,14 +2,12 @@ def cli(): parser = argparse.ArgumentParser(description="GelQuant CLI") - parser.add_argument('test', nargs='?', help="Test argument (optional)") + parser.add_argument('test', nargs='?', help="Test argument (optional)", default="No argument provided") - try: - args = parser.parse_args() - print(args.test if args.test else "No argument provided") - except SystemExit: - print("Usage: gelquant ") + args = parser.parse_args() + print(args.test) if __name__ == "__main__": cli() + From 88dd8923ac538f844edc9d912585630b50a88694 Mon Sep 17 00:00:00 2001 From: Tanish211413 <83411069+Tanish211413@users.noreply.github.com> Date: Thu, 6 Mar 2025 13:57:29 +0530 Subject: [PATCH 04/11] Update setup.py --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index ad8175e..c74d995 100644 --- a/setup.py +++ b/setup.py @@ -104,7 +104,7 @@ def run(self): # Trove classifiers # Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python', + 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', @@ -121,4 +121,3 @@ def run(self): 'upload': UploadCommand, }, ) - From 4a43f5d9d5a1b7912fec1343a45e235397900c32 Mon Sep 17 00:00:00 2001 From: Tanish211413 <83411069+Tanish211413@users.noreply.github.com> Date: Thu, 6 Mar 2025 14:08:27 +0530 Subject: [PATCH 05/11] Create Use case(brief) --- Use case(brief) | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Use case(brief) diff --git a/Use case(brief) b/Use case(brief) new file mode 100644 index 0000000..d9257ed --- /dev/null +++ b/Use case(brief) @@ -0,0 +1,28 @@ +# GelQuant + +Simple band quantification software for protein and DNA gels/blots. + +## ** Overview** +GelQuant processes gel/blot images for quantification. The software allows users to: +- **Import and crop** gel images as desired. +- **Split the image** into user-specified vertical lanes. +- **Convert lanes to numerical data** using NumPy. +- **Calculate average RGB intensity** for each row in the lane. +- **Apply Gaussian weighting** to emphasize the middle of the lane while reducing edge interference. +- **Baseline correction** based on user-specified regions. +- **Plot the data** and perform band intensity quantification. + + +## ** Example Usage** +For an example of how GelQuant works, check out: + `notebook-example.ipynb` + `gel-example.png` + +--- + +## ** Installation +To install a **development version**, clone this repository and install it with `pip`: +```sh +git clone https://github.com/harmslab/gelquant.git +cd gelquant +pip install -e . From 839994f4ff4aaf5516c703bdd955cbbb4f53a5ed Mon Sep 17 00:00:00 2001 From: Tanish211413 <83411069+Tanish211413@users.noreply.github.com> Date: Thu, 6 Mar 2025 14:10:04 +0530 Subject: [PATCH 06/11] Update README.md --- README.md | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d7f4041..69fe175 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,29 @@ -Simple python-based quantification software for simple biological images. Currently implemented for protein and DNA gels/blots and yeast spotting assays. Takes an input image which gets cropped by the user and converts to a grayscale numpy array using the Python Image Library (PIL). Then splits image into user-specified lanes/boxes, and the average intensity of every pixel per lane/band/blot/spot is calculated. +@@ -0,0 +1,28 @@ +# GelQuant -For gels, intensities have the option to be gaussian-weighted so that the middle of the gel band contributes more to the average than the outer edges, as other lanes in gels sometimes bleed into the lane of interest. Data for each slice is baselined given a user-specified baselining region. This data is plotted and can be quantified for band intensities. +Simple band quantification software for protein and DNA gels/blots. -Note: updates needed for SDS-PAGE gel analysis (spotting assay approach is much faster/better implemented). The pipeline is functional and accurate but slow; old code is preserved to reflect analysis in https://elifesciences.org/articles/54100. +## ** Overview** +GelQuant processes gel/blot images for quantification. The software allows users to: +- **Import and crop** gel images as desired. +- **Split the image** into user-specified vertical lanes. +- **Convert lanes to numerical data** using NumPy. +- **Calculate average RGB intensity** for each row in the lane. +- **Apply Gaussian weighting** to emphasize the middle of the lane while reducing edge interference. +- **Baseline correction** based on user-specified regions. +- **Plot the data** and perform band intensity quantification. -See example .ipynb notebooks for details/example usage. -To install a development version, clone this repo and pip install: +## ** Example Usage** +For an example of how GelQuant works, check out: + `notebook-example.ipynb` + `gel-example.png` -pip install -e . +--- -Dependencies: matplotlib, numpy, PIL, pandas, os, natsort, scipy +## ** Installation +To install a **development version**, clone this repository and install it with `pip`: +```sh +git clone https://github.com/harmslab/gelquant.git +cd gelquant +pip install -e . From a7ccf714aef3d966fe47c1a2b4c9a9c997a5d5d6 Mon Sep 17 00:00:00 2001 From: Tanish211413 <83411069+Tanish211413@users.noreply.github.com> Date: Thu, 6 Mar 2025 14:10:39 +0530 Subject: [PATCH 07/11] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 69fe175..7b514ca 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Simple band quantification software for protein and DNA gels/blots. -## ** Overview** +## Overview GelQuant processes gel/blot images for quantification. The software allows users to: - **Import and crop** gel images as desired. - **Split the image** into user-specified vertical lanes. @@ -14,15 +14,15 @@ GelQuant processes gel/blot images for quantification. The software allows users - **Plot the data** and perform band intensity quantification. -## ** Example Usage** +## Example Usage For an example of how GelQuant works, check out: `notebook-example.ipynb` `gel-example.png` --- -## ** Installation -To install a **development version**, clone this repository and install it with `pip`: +## Installation +To install a development version, clone this repository and install it with `pip`: ```sh git clone https://github.com/harmslab/gelquant.git cd gelquant From cb2bf534ef084587554e44b122053ee9b0cf1689 Mon Sep 17 00:00:00 2001 From: Tanish211413 <83411069+Tanish211413@users.noreply.github.com> Date: Thu, 6 Mar 2025 14:12:55 +0530 Subject: [PATCH 08/11] Update README.md --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 7b514ca..cd25c07 100644 --- a/README.md +++ b/README.md @@ -27,3 +27,18 @@ To install a development version, clone this repository and install it with `pip git clone https://github.com/harmslab/gelquant.git cd gelquant pip install -e . + +## Dependencies + +GelQuant requires the following Python libraries: + +matplotlib +numpy +pillow (PIL) +pandas +os (built-in, no installation needed) +natsort +scipy + +To Install +pip install matplotlib numpy pillow pandas natsort scipy From 82eca348b93d5d7f56742125faec1271b23ce371 Mon Sep 17 00:00:00 2001 From: Tanish211413 <83411069+Tanish211413@users.noreply.github.com> Date: Thu, 6 Mar 2025 14:14:11 +0530 Subject: [PATCH 09/11] Update README.md --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cd25c07..4ec541a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -@@ -0,0 +1,28 @@ + # GelQuant Simple band quantification software for protein and DNA gels/blots. @@ -19,11 +19,9 @@ For an example of how GelQuant works, check out: `notebook-example.ipynb` `gel-example.png` ---- - ## Installation To install a development version, clone this repository and install it with `pip`: -```sh + git clone https://github.com/harmslab/gelquant.git cd gelquant pip install -e . From 03e4b3c734e573f1a21434d3c9d0444158c8521f Mon Sep 17 00:00:00 2001 From: Tanish211413 <83411069+Tanish211413@users.noreply.github.com> Date: Thu, 6 Mar 2025 14:14:57 +0530 Subject: [PATCH 10/11] Update README.md --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4ec541a..d6545ee 100644 --- a/README.md +++ b/README.md @@ -30,13 +30,13 @@ pip install -e . GelQuant requires the following Python libraries: -matplotlib -numpy -pillow (PIL) -pandas -os (built-in, no installation needed) -natsort -scipy +1)matplotlib +2)numpy +3)pillow (PIL) +4)pandas +5)os (built-in, no installation needed) +6)natsort +7)scipy To Install pip install matplotlib numpy pillow pandas natsort scipy From ad1401261846fac67ac3143654be1a356aa1ea59 Mon Sep 17 00:00:00 2001 From: Tanish211413 <83411069+Tanish211413@users.noreply.github.com> Date: Thu, 6 Mar 2025 14:16:24 +0530 Subject: [PATCH 11/11] Update README.md --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d6545ee..fbd1443 100644 --- a/README.md +++ b/README.md @@ -30,13 +30,15 @@ pip install -e . GelQuant requires the following Python libraries: -1)matplotlib -2)numpy -3)pillow (PIL) -4)pandas -5)os (built-in, no installation needed) -6)natsort -7)scipy +matplotlib +,numpy +,pillow (PIL) +,pandas +,os +,natsort +,scipy + +note: for os (built-in, no installation needed) To Install pip install matplotlib numpy pillow pandas natsort scipy