From a81c4d4b90e2932dcf5cdba30c5ea6525fe32245 Mon Sep 17 00:00:00 2001 From: rraadd88 Date: Thu, 23 Nov 2023 18:24:56 -0500 Subject: [PATCH] updates --- .gitignore | 7 +++++++ CITATION.cff | 2 +- examples/io_read_nd2.ipynb | 3 ++- .../protein_abundance_by_marker_location.ipynb | 18 ++++++++++++++++++ htsimaging/viz/image.py | 6 ++++++ setup.py | 5 +++-- 6 files changed, 37 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index ed5c5ca..322472c 100755 --- a/.gitignore +++ b/.gitignore @@ -78,3 +78,10 @@ target/ 6 *.bak +examples/*/* +examples/*.npy +examples/*test* +examples/_* +examples/_*/ +_*/ +examples/*demo_data* diff --git a/CITATION.cff b/CITATION.cff index 2ac2af3..08c390d 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -15,4 +15,4 @@ identifiers: value: 10.5281/zenodo.8264035 repository-code: 'https://github.com/rraadd88/htsimaging' version: 1.0.4 -date-released: '2023-08-10' \ No newline at end of file +date-released: '2023-08-10' diff --git a/examples/io_read_nd2.ipynb b/examples/io_read_nd2.ipynb index f69fee9..5c8aa1c 100755 --- a/examples/io_read_nd2.ipynb +++ b/examples/io_read_nd2.ipynb @@ -25,7 +25,8 @@ "from os.path import dirname,splitext\n", "from os import makedirs\n", "\n", - "import nd2\n", + "#!pip install nd2\n", + "import nd2 \n", "import numpy as np" ] }, diff --git a/examples/protein_abundance_by_marker_location.ipynb b/examples/protein_abundance_by_marker_location.ipynb index ed8a6d1..2232f54 100755 --- a/examples/protein_abundance_by_marker_location.ipynb +++ b/examples/protein_abundance_by_marker_location.ipynb @@ -425,6 +425,24 @@ "df1.head(1)" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "f505f151-7c92-4021-b4b6-da9eb76a4274", + "metadata": {}, + "outputs": [], + "source": [ + "to_table(df1,f\"{output_dir_path}/01_gfpby_pixels.pqt\") # saved as a parquet file because of its potentially large size " + ] + }, + { + "cell_type": "markdown", + "id": "f2607927-9ed2-4dfb-831a-4f8a1ae73a60", + "metadata": {}, + "source": [ + "### Aggregation" + ] + }, { "cell_type": "code", "execution_count": 13, diff --git a/htsimaging/viz/image.py b/htsimaging/viz/image.py index 67ebb3d..71464b0 100755 --- a/htsimaging/viz/image.py +++ b/htsimaging/viz/image.py @@ -47,6 +47,12 @@ def image_background( N=50, ) ax=plt.subplot(111) if ax is None else ax + # TODO preprocess + # if not rotation is None: + # assert rotation%90 ==0: + # img=numpy.rot90(img,3) + # img_region=numpy.rot90(img_region,3) + if not img is None: ax_img=ax.imshow( img, diff --git a/setup.py b/setup.py index a6f13ef..277beb9 100755 --- a/setup.py +++ b/setup.py @@ -25,6 +25,7 @@ 'scikit-image', # image processing. 'argh', # for command-line convinience 'seaborn', + 'fastparquet', ], 'spt':[ 'pims==0.4.1', @@ -66,7 +67,7 @@ author='rraadd88', author_email='rohanadandage@gmail.com', license='General Public License v. 3', - packages=setuptools.find_packages('.',exclude=['test','tests', 'unit','deps','data','examples']), + packages=setuptools.find_packages('.',exclude=['test', 'unit','deps', 'data']), classifiers=[ 'Programming Language :: Python', 'Programming Language :: Python :: 3', @@ -82,4 +83,4 @@ # 'console_scripts': ['htsimaging = htsimaging.run:parser.dispatch',], # }, python_requires='>=3.7, <4', -) +) \ No newline at end of file