diff --git a/5.data_packaging/constants.py b/5.data_packaging/constants.py index e458443..19f39e9 100644 --- a/5.data_packaging/constants.py +++ b/5.data_packaging/constants.py @@ -31,7 +31,7 @@ ] ] -PACKAGING_FILES = ["5.data_packaging/location_and_ch5_frame_image_data.parquet"] +PACKAGING_DATASETS = ["5.data_packaging/location_and_ch5_frame_image_data"] # FTP resources for accessing IDR # See here for more: diff --git a/5.data_packaging/create_lancedb.py b/5.data_packaging/create_lancedb.py index 2cdd9a4..5d4c7d7 100644 --- a/5.data_packaging/create_lancedb.py +++ b/5.data_packaging/create_lancedb.py @@ -8,7 +8,7 @@ import lancedb import pandas as pd import pyarrow as pa -from constants import DATA_FILES_W_COLNAMES, PACKAGING_FILES +from constants import DATA_FILES_W_COLNAMES, PACKAGING_DATASETS from pyarrow import parquet # specify a dir where the lancedb database may go and create lancedb client @@ -59,10 +59,10 @@ def get_arrow_tbl_from_csv(filename_read: str) -> str: mode="overwrite", ) -for filename in PACKAGING_FILES: - table = parquet.read_table(source=filename) +for dir in PACKAGING_DATASETS: + table = parquet.ParquetDataset(path_or_paths=dir).read() ldb.create_table( - name=f"{filename.replace('/','.')}", + name=f"{dir.replace('/','.')}", data=table, schema=table.schema, mode="overwrite", diff --git a/5.data_packaging/gather_images.py b/5.data_packaging/gather_images.py index cd5e9b2..3c7c601 100644 --- a/5.data_packaging/gather_images.py +++ b/5.data_packaging/gather_images.py @@ -4,14 +4,18 @@ import os import pathlib +import warnings from ftplib import FTP from typing import List -import awkward as ak import docker import duckdb +import h5py +import numpy as np import pyarrow as pa -import tifffile +import pyarrow.compute as pc +import pybasic +import skimage from constants import ( DOCKER_PLATFORM, FTP_IDR_MITOCHECK_CH5_DIR, @@ -48,25 +52,27 @@ def retrieve_ftp_file( A string indicating the path to the downloaded file. """ - try: - # Connect to the FTP server - with FTP(ftp_url) as ftp: - # Log in to the FTP server - ftp.login(user=ftp_user, passwd=ftp_pass) + # Specify the file to download + download_filepath = f"{download_dir}/{pathlib.Path(ftp_file).name}" - # Specify the file to download - download_filepath = f"{download_dir}/{pathlib.Path(ftp_file).name}" + # if we don't already have the file, download it + if not pathlib.Path(download_filepath).is_file(): + try: + # Connect to the FTP server + with FTP(ftp_url) as ftp: + # Log in to the FTP server + ftp.login(user=ftp_user, passwd=ftp_pass) - # Open a local file for writing in binary mode - with open(download_filepath, "wb") as local_file: - # Download the file from the FTP server - ftp.retrbinary(f"RETR {ftp_file}", local_file.write) + # Open a local file for writing in binary mode + with open(download_filepath, "wb") as local_file: + # Download the file from the FTP server + ftp.retrbinary(f"RETR {ftp_file}", local_file.write) - # return the download filepath - return download_filepath + except Exception as e: + print("An error occurred:", e) - except Exception as e: - print("An error occurred:", e) + # return the download filepath + return download_filepath def get_image_union_table() -> pa.Table: @@ -112,7 +118,9 @@ def get_image_union_table() -> pa.Table: '/hdf5/00', format('{{:03d}}', locations_union."Well Number"), '_01.ch5' - ) AS IDR_FTP_ch5_location + ) AS IDR_FTP_ch5_location, + 'TARGET_FRAME' as Frame_type, + ''::BLOB as Frame_tiff FROM locations_union LEFT JOIN read_csv('1.idr_streams/stream_files/idr0013-screenA-plates-w-colnames.tsv') as plates ON plates.Plate = locations_union.Plate @@ -176,7 +184,61 @@ def run_dockerfile_container( print(line.decode("utf-8").strip()) -def get_frame_tiff_from_idr_ch5(frame: str, ftp_file: str, local_frame_tif: str) -> str: +def find_frame_len(ch5_file: str): + """ + Find the length of the 'time_lapse' dataset within an HDF5 file. + + This function recursively searches for a dataset named 'time_lapse' within + the provided HDF5 (or HDF5-like) file. Once found, it returns the size of + the dataset, which represents the number of frames. + + Args: + ch5_file (str): The path to the HDF5 file to be searched. + + Returns: + int: The length of the 'time_lapse' dataset (number of frames). + + Example: + >>> find_frame_len('example.h5') + 100 + + Note: + This function returns None if the 'time_lapse' dataset is not found + within the HDF5 file. + """ + + def find_time_lapse_len(name, obj): + """ + Recursively search for a dataset named "time_lapse" + within an HDF5 (or HDF5-like) file. + + Return the dataset object when found. + """ + + if isinstance(obj, h5py.Dataset): + if "sample" in name and "time_lapse" in name: + print("Found 'time_lapse' dataset at:", obj.name) + # Return the dataset object + return obj.size + + elif isinstance(obj, h5py.Group): + # Traverse the group's children recursively + for key, value in obj.items(): + # Recursively search within the group + result = find_time_lapse_len(name, value) + if result is not None: + # If "time_lapse" is found in a subgroup, return the result + return result + + # Open the HDF5 file in read-only mode + with h5py.File(ch5_file, "r") as f: + # Start the search from the root group + return f.visititems(find_time_lapse_len) + + +def get_frame_tiff_from_idr_ch5( + frame: str, local_ch5_file: str, local_frame_tif: str +) -> str: """ Gather IDR ch5 file and extract a frame as a TIFF, returning the local filepath and cleaning up the ch5 afterwards. @@ -184,8 +246,8 @@ def get_frame_tiff_from_idr_ch5(frame: str, ftp_file: str, local_frame_tif: str) Args: frame (str): The frame number to extract from the IDR ch5 file. - ftp_file (str): - The name of the IDR ch5 file to retrieve. + local_ch5_file (str): + The local filepath where the ch5 file may be referenced. local_frame_tif (str): The local filepath where the extracted TIFF will be saved. @@ -195,61 +257,268 @@ def get_frame_tiff_from_idr_ch5(frame: str, ftp_file: str, local_frame_tif: str) """ print( - "Working on ", + "Working on", f"frame: {frame}", - f"ftp file: {ftp_file}", f"tiff: {local_frame_tif}", ) - # download the ch5 file - local_ch5_file = retrieve_ftp_file( - ftp_file=str(ftp_file), download_dir=image_download_dir - ) - # extract a frame from the ch5 file using bfconvert through a docker container - run_dockerfile_container( - dockerfile="./5.data_packaging/Dockerfile.bfconvert", - image_name="ome_bfconvert", - volumes=[f"{os.getcwd()}/5.data_packaging/images/extracted_frame:/app"], - command=f"-timepoint {frame} {pathlib.Path(local_ch5_file).name} {str(local_frame_tif)}", - ) + # if we don't already have a file, create it + if not pathlib.Path(local_frame_tif).is_file(): + # extract a frame from the ch5 file using bfconvert through a docker container + run_dockerfile_container( + dockerfile="./5.data_packaging/Dockerfile.bfconvert", + image_name="ome_bfconvert", + volumes=[f"{os.getcwd()}:/app"], + command=( + f"-timepoint {frame} {local_ch5_file} {str(local_frame_tif)}" + " -overwrite" + ), + ) + + return local_frame_tif + + +# modified from: +# https://github.com/WayScience/IDR_stream/blob/main/idrstream/preprocess.py#L194C1-L227C76 +def get_ic_context_frames(target_frame: int, movie_len: int) -> List[int]: + """ + Gather additional non-target frames for use with PyBasic IC. - # remove the ch5 file as we no longer need it - pathlib.Path(local_ch5_file).unlink() + This function returns a list of three frames: one frame before the target frame, + the target frame itself, and one frame after the target frame. The frames are + 0-indexed, while the movie length is not. If the target frame is the first frame + (0), it returns the target frame and the next two frames. If the target frame is + the last frame, it returns the target frame and the two preceding frames. + + Args: + target_frame (int): + The index of the target frame (0-indexed). + movie_len (int): + The length of the movie (1-indexed). + + Returns: + List[int]: + A list of three frame indices for context. + + Example: + >>> get_ic_context_frames(2, 5) + [1, 2, 3] + + >>> get_ic_context_frames(0, 5) + [0, 1, 2] + + >>> get_ic_context_frames(4, 5) + [2, 3, 4] + """ + + # "sandwich" the frames using one frame before and one frame after + # the target frame provided from frame_num. + if target_frame + 1 <= movie_len: + return [target_frame - 1, target_frame, target_frame + 1] - return f"{image_download_dir}/{str(local_frame_tif)}" + # else if we have the first frame, use two frames after + elif target_frame == 0: + return [target_frame, target_frame + 1, target_frame + 2] + + # otherwise we have the last frame, so use two frames prior + else: + return [target_frame - 2, target_frame - 1, target_frame] + + +# referenced with modifications +# from: https://github.com/WayScience/IDR_stream/blob/main/idrstream/preprocess.py#L114 +def pybasic_IC_target_frame_to_tiff( + frames_as_arrays: List[np.ndarray], target_frame: int, destination_filename: str +): + """ + PyBaSiC Illumination correction as described in http://www.nature.com/articles/ncomms14836 + + Parameters + ---------- + frames_as_arrays : List[np.ndarray] + array of frames to perform illumination correction on + target_frame : int + target frame within the context of the frames_as_arrays + to return. + destination_filename : str + export the target_frame to a destination filepath specified + through this parameter. + + Returns + ------- + str + filepath with the IC image as tiff + """ + # capture pybasic warnings + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + flatfield, darkfield = pybasic.basic( + frames_as_arrays, darkfield=True, verbosity=False + ) + baseflour = pybasic.background_timelapse( + images_list=frames_as_arrays, + flatfield=flatfield, + darkfield=darkfield, + verbosity=False, + ) + brightfield_images_corrected_original = pybasic.correct_illumination( + images_list=frames_as_arrays, + flatfield=flatfield, + darkfield=darkfield, + background_timelapse=baseflour, + ) + + # convert corrected images to numpy array, normalize, and convert to uint8 + brightfield_images_corrected = np.array(brightfield_images_corrected_original) + brightfield_images_corrected[brightfield_images_corrected < 0] = ( + 0 # make negatives 0 + ) + brightfield_images_corrected = brightfield_images_corrected / np.max( + brightfield_images_corrected + ) # normalize the data to 0 - 1 + brightfield_images_corrected = ( + 255 * brightfield_images_corrected + ) # Now scale by 255 + corrected_movie = brightfield_images_corrected.astype(np.uint8) + + # export the target frame to file + skimage.io.imsave(fname=destination_filename, arr=corrected_movie[target_frame]) + + # return the filepath + return destination_filename + + +def read_image_as_binary(image_path: str) -> bytes: + """ + Reads an image file and returns its content as binary data. + We read image data files as bytearrays in order to retain their + full representation within the data package without data loss or + transformation. + + Args: + image_path (str): The path to the image file to be read. + + Returns: + bytes: The binary content of the image file. + + Example: + binary_data = read_image_as_binary("path/to/image.jpg") + print(binary_data) + """ + with open(image_path, "rb") as f: + return f.read() # specify an image download dir and create it image_download_dir = "./5.data_packaging/images/extracted_frame" pathlib.Path(image_download_dir).mkdir(parents=True, exist_ok=True) +# specify an export dir and create it +export_dir = "./5.data_packaging/location_and_ch5_frame_image_data" +pathlib.Path(export_dir).mkdir(parents=True, exist_ok=True) + # get a table of image-relevant data table = get_image_union_table() -# create a new table from awkward array to help join the multi-dim image data -table = ak.to_arrow_table( - # join a pyarrow table as an awkward array with a new field for multi-dim tiff data - ak.with_field( - array=ak.from_arrow(array=table), - what=[ - # read the tiff as a numpy array - tifffile.imread( - # gather tiff frame from ch5 for every row in location union data - get_frame_tiff_from_idr_ch5( - frame=frame, ftp_file=ftp_file, local_frame_tif=local_frame_tif +# iterate through location union data +for unique_file in pc.unique(table["IDR_FTP_ch5_location"]).to_pylist(): + + # download the ch5 file + local_ch5_file = retrieve_ftp_file( + ftp_file=unique_file, download_dir=image_download_dir + ) + + # find the movie length + movie_length = find_frame_len(ch5_file=local_ch5_file) + + # reference rows with the same ch5 file + for batch in table.filter( + pc.equal(table["IDR_FTP_ch5_location"], unique_file) + ).to_batches(max_chunksize=1): + + # convert to a dictionary for the row, where the dictionary + # elements include the column name as key and + # value as the value from a single row in the table. + row = batch.to_pydict() + + # reference a target frame as an integer + target_frame = int(row["Frames"][0]) + + # loop through frames to extract them + frames_to_tiffs = { + # for each frame, extract a tiff from the ch5 + str(frame): get_frame_tiff_from_idr_ch5( + frame=frame, + local_ch5_file=local_ch5_file, + local_frame_tif=( + f"{image_download_dir}/" + + row["DNA_dotted_notation"][0].replace( + f"_{target_frame}.tif", f"_{frame}.tif" + ) + ), + ) + # gather all frames based on a target frame + for frame in get_ic_context_frames( + target_frame=target_frame, movie_len=movie_length + ) + } + + # read the tiffs as arrays for use with pybasic + # and then add the IC image filepath as a new + # element along with the others + frames_to_tiffs[f"{target_frame}_IC"] = pybasic_IC_target_frame_to_tiff( + frames_as_arrays=[ + skimage.io.imread(fname=tiff_file) + for tiff_file in frames_to_tiffs.values() + ], + target_frame=list( + idx + for idx, frame in enumerate(frames_to_tiffs.keys()) + if frame == str(target_frame) + )[0], + destination_filename=( + f"{image_download_dir}/" + + row["DNA_dotted_notation"][0].replace( + f"_{target_frame}.tif", f"_{target_frame}_IC.tif" ) + ), + ) + + # create record batches from the frames_to_tiffs + rows = [ + pa.RecordBatch.from_pydict( + # retain data from original row if our frame matches the original + { + **row, + "Frame_tiff": [read_image_as_binary(image_path=frame_tiff)], + } + if row["Frames"][0] == str(frame_number) + # otherwise, create new rows with relevant IC-focused frame data + else { + **row, + "Frames": [str(frame_number)], + "DNA_dotted_notation": [frame_tiff], + "Frame_type": ( + ["IC_FRAME"] + if "_IC" not in frame_number + else ["IC_TARGET_FRAME"] + ), + "Frame_tiff": [read_image_as_binary(image_path=frame_tiff)], + } ) - # iterate through location union data - for (frame,), (ftp_file,), (local_frame_tif,) in table.select( - ["Frames", "IDR_FTP_ch5_location", "DNA_dotted_notation"] - ).to_batches(max_chunksize=1) - ], - # name the new field / column - where="ch5_frame_tiff_unaltered", - ) -) + for frame_number, frame_tiff in frames_to_tiffs.items() + ] -# write the table to parquet file -parquet.write_table( - table=table, where="5.data_packaging/location_and_ch5_frame_image_data.parquet" -) + # write a table with the row baches + parquet.write_table( + # create a table from the row batches + table=pa.Table.from_batches(rows), + where=f"{export_dir}/{pathlib.Path(local_ch5_file).stem}.frame_{row['Frames'][0]}.parquet", + ) + + # remove the tiff files as we no longer need them + """for tiff in frames_to_tiffs.values(): + pathlib.Path(tiff).unlink()""" + + # remove the ch5 file as we no longer need it + # pathlib.Path(local_ch5_file).unlink() diff --git a/poetry.lock b/poetry.lock index c4b9d36..4453f0e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "annotated-types" @@ -30,80 +30,6 @@ tests = ["attrs[tests-no-zope]", "zope-interface"] tests-mypy = ["mypy (>=1.6)", "pytest-mypy-plugins"] tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist[psutil]"] -[[package]] -name = "awkward" -version = "2.6.3" -description = "Manipulate JSON-like data with NumPy-like idioms." -optional = false -python-versions = ">=3.8" -files = [ - {file = "awkward-2.6.3-py3-none-any.whl", hash = "sha256:2a87dccc13de843600f09b16561e689a3cdcdb5d13ebcbb69c80bfa525179cbb"}, - {file = "awkward-2.6.3.tar.gz", hash = "sha256:481a1640760aa174cd34bf60d45920f70cfe8b555403962c4e5864929b0548e8"}, -] - -[package.dependencies] -awkward-cpp = "32" -fsspec = ">=2022.11.0" -importlib-metadata = {version = ">=4.13.0", markers = "python_version < \"3.12\""} -numpy = ">=1.18.0" -packaging = "*" - -[[package]] -name = "awkward-cpp" -version = "32" -description = "CPU kernels and compiled extensions for Awkward Array" -optional = false -python-versions = ">=3.8" -files = [ - {file = "awkward-cpp-32.tar.gz", hash = "sha256:ad8c5af86206fb0f434b16749cc5cca69a15a88e16ca43e91e56c5cca77421f0"}, - {file = "awkward_cpp-32-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:478182d275d020f76e85c461be9b297075267ce78fa7395db1206d1e69b46366"}, - {file = "awkward_cpp-32-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:cb75345214f1c773b0c61eb02a850bbf560390bdd8c973827119432b971ec2b0"}, - {file = "awkward_cpp-32-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:06e666e8ebe5a0d6769a5995366306073647b17446b28062807f70a7904dd3b9"}, - {file = "awkward_cpp-32-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c452da573de52b92f4f66819aa74521225543bf028b2f6d7b1477cbac52063f"}, - {file = "awkward_cpp-32-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:7b347e5283703b188fde4baea32408cf5c5d9569173d7a7f4e8183d9fe070153"}, - {file = "awkward_cpp-32-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2a083bb1cc458b2cfb2bcf371bab47ac07054c211fa38b633815e3748e9c9832"}, - {file = "awkward_cpp-32-cp310-cp310-win_amd64.whl", hash = "sha256:0c80213069e4c80c568dcae9c29b8c4f973ae59bb9bc2b09af372f1e6929cc28"}, - {file = "awkward_cpp-32-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:cf43a6a90adb96c366ac6234320e2c6117a8b662e12b01b0e11441c188eeb121"}, - {file = "awkward_cpp-32-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:91b583980e947a397358b4de484204a2d7e8558296cf8be3b321a8b19abb8ec0"}, - {file = "awkward_cpp-32-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3686d45c3c7775679fad8f3de25ce298f8dca36ab025f41dfd68c24d7cdb5178"}, - {file = "awkward_cpp-32-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:37decc9a65e81a9e71ce5d90090b669a2aed2c25d689c5d7547f84979cc08cbb"}, - {file = "awkward_cpp-32-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:7fdd9b91433f4c1f8a3dd92a19646e305632df6982f49a48b7e3cfaeeadfa690"}, - {file = "awkward_cpp-32-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:abd521e015c376409e45a1490dea208b2e6d11d5706d62801d63c93b75f102e3"}, - {file = "awkward_cpp-32-cp311-cp311-win_amd64.whl", hash = "sha256:a28879cc09e907fe30389a1c965f07174ec3135f96e90cc9e1201dad4eea6284"}, - {file = "awkward_cpp-32-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0be90b78ea46cbbf0eb666e9ca5841a13ee17c8efdc54b25c65b8f0f2629ec64"}, - {file = "awkward_cpp-32-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:13a2194e26177db16e1185ba5fbf739bc6c22d6fa980ee65708a572f9dda1043"}, - {file = "awkward_cpp-32-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:01ec097ee682c5ddef548289f2e64ed76e0c97aa4def3531767560c16d4856cd"}, - {file = "awkward_cpp-32-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc0dc0822c4a96ff7b803486e090bd7cf1cb57a0a7eb671822628ac32a06b38c"}, - {file = "awkward_cpp-32-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d8bc60081c3ea9208c28a7e0202d553164c72a7d7c5c95e27803396a9bc9399b"}, - {file = "awkward_cpp-32-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:093402c045d39a226081d24ebbc9f026860d52f3f7924bc5b27b00ed8a3400f9"}, - {file = "awkward_cpp-32-cp312-cp312-win_amd64.whl", hash = "sha256:1fb40099ef94ab6d860a8e6f8fd8100cdcc08260289dcbecc00acd383b6ef324"}, - {file = "awkward_cpp-32-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:d5ea4c9dea75b46c31421677d3a13e593620abaf99edf50d432364ff5f593b0c"}, - {file = "awkward_cpp-32-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:23f09805c3bb48eb5095ed59e775717d90e3f5afe2c48774b8b431bba0e4c4fc"}, - {file = "awkward_cpp-32-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:231b764dfef4283ff1629e675e6ed36f5d57516b12e86779c0bbf622281e45aa"}, - {file = "awkward_cpp-32-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c685f31d738f220a101eb190ec0e7755613f6f3e1cb77d24a6f11ea30153c99a"}, - {file = "awkward_cpp-32-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:dbb21befb2196de769eae2454de495dc92a1696c38d5d0b002ee7123cfd6abbc"}, - {file = "awkward_cpp-32-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:dbf6aa671bc6499d9c50691ae8184b3570fb192c7181c9781f342f566b779620"}, - {file = "awkward_cpp-32-cp38-cp38-win32.whl", hash = "sha256:04d31a86f976979b4f778ecfe71c8e52052d354755050bbde21fa14310cf824f"}, - {file = "awkward_cpp-32-cp38-cp38-win_amd64.whl", hash = "sha256:97af36657c6e9d2181b3d7293d1a9680268c9110a21a3bd5377c31567e062e31"}, - {file = "awkward_cpp-32-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:1e13f22f85e019b30f9bfeb269bb79d6d56cd27820527dc8628f4e0a2869075a"}, - {file = "awkward_cpp-32-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:0c36c2b5d35b0dfcab44362b42b5e5903f87d553995efe7d5d0b8273d15eb861"}, - {file = "awkward_cpp-32-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:46b3ac7db0016ea64ba49b35ca1a72e8ce2ed74f6dfa56ba3539e4f92079d716"}, - {file = "awkward_cpp-32-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6a411b93f889ea82ee424b4938fe935bfe00d9333c8d1a657ca607758a77b8e1"}, - {file = "awkward_cpp-32-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:5b26828ba35ca1f5fd497f3fcdb536468d7a9410c71a9c4eb61d9b624c801b6c"}, - {file = "awkward_cpp-32-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5d60428504ba063e4ad5e5150dbcd12a353370a2806079574ddc0c0cef640f88"}, - {file = "awkward_cpp-32-cp39-cp39-win32.whl", hash = "sha256:9f0f72490fc7aecb3c20e939dbcea8cefeadac016fc3be3772da45f6d8fce806"}, - {file = "awkward_cpp-32-cp39-cp39-win_amd64.whl", hash = "sha256:3df95196c43cb1f2c1071596d5011af620cf3da7e9e797ba734fdb251fe7333e"}, - {file = "awkward_cpp-32-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:4d79f5f477b75c3617002cbb7e23550a7accdb657a5b160ee1cac4bd0d17fc32"}, - {file = "awkward_cpp-32-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:565c10a38fc1f56c02a9cc0538c9285e5722ddbbec566c8c526f38c9f3b44358"}, - {file = "awkward_cpp-32-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:76d545c872ca0ed0ab09890e60336b57a8255d731fb4c95efeec7005649ef058"}, - {file = "awkward_cpp-32-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:526ab7546a002feeaac91fc7779dfe419420bf74ca036c4dba59970dc6e4022f"}, - {file = "awkward_cpp-32-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:15e829dd6156e76d2390e348b24da9e54bebe7c66240338d4bff83c099402dba"}, - {file = "awkward_cpp-32-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:292f6552e74cbb076a4d9871426661c232196d31a4111ce392bb2be49b5694c1"}, -] - -[package.dependencies] -numpy = ">=1.18.0" - [[package]] name = "cachetools" version = "5.3.3" @@ -353,39 +279,37 @@ files = [ ] [[package]] -name = "fsspec" -version = "2024.3.1" -description = "File-system specification" +name = "h5py" +version = "3.11.0" +description = "Read and write HDF5 files from Python" optional = false python-versions = ">=3.8" files = [ - {file = "fsspec-2024.3.1-py3-none-any.whl", hash = "sha256:918d18d41bf73f0e2b261824baeb1b124bcf771767e3a26425cd7dec3332f512"}, - {file = "fsspec-2024.3.1.tar.gz", hash = "sha256:f39780e282d7d117ffb42bb96992f8a90795e4d0fb0f661a70ca39fe9c43ded9"}, + {file = "h5py-3.11.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1625fd24ad6cfc9c1ccd44a66dac2396e7ee74940776792772819fc69f3a3731"}, + {file = "h5py-3.11.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c072655ad1d5fe9ef462445d3e77a8166cbfa5e599045f8aa3c19b75315f10e5"}, + {file = "h5py-3.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77b19a40788e3e362b54af4dcf9e6fde59ca016db2c61360aa30b47c7b7cef00"}, + {file = "h5py-3.11.0-cp310-cp310-win_amd64.whl", hash = "sha256:ef4e2f338fc763f50a8113890f455e1a70acd42a4d083370ceb80c463d803972"}, + {file = "h5py-3.11.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bbd732a08187a9e2a6ecf9e8af713f1d68256ee0f7c8b652a32795670fb481ba"}, + {file = "h5py-3.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:75bd7b3d93fbeee40860fd70cdc88df4464e06b70a5ad9ce1446f5f32eb84007"}, + {file = "h5py-3.11.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:52c416f8eb0daae39dabe71415cb531f95dce2d81e1f61a74537a50c63b28ab3"}, + {file = "h5py-3.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:083e0329ae534a264940d6513f47f5ada617da536d8dccbafc3026aefc33c90e"}, + {file = "h5py-3.11.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:a76cae64080210389a571c7d13c94a1a6cf8cb75153044fd1f822a962c97aeab"}, + {file = "h5py-3.11.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f3736fe21da2b7d8a13fe8fe415f1272d2a1ccdeff4849c1421d2fb30fd533bc"}, + {file = "h5py-3.11.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa6ae84a14103e8dc19266ef4c3e5d7c00b68f21d07f2966f0ca7bdb6c2761fb"}, + {file = "h5py-3.11.0-cp312-cp312-win_amd64.whl", hash = "sha256:21dbdc5343f53b2e25404673c4f00a3335aef25521bd5fa8c707ec3833934892"}, + {file = "h5py-3.11.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:754c0c2e373d13d6309f408325343b642eb0f40f1a6ad21779cfa9502209e150"}, + {file = "h5py-3.11.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:731839240c59ba219d4cb3bc5880d438248533366f102402cfa0621b71796b62"}, + {file = "h5py-3.11.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8ec9df3dd2018904c4cc06331951e274f3f3fd091e6d6cc350aaa90fa9b42a76"}, + {file = "h5py-3.11.0-cp38-cp38-win_amd64.whl", hash = "sha256:55106b04e2c83dfb73dc8732e9abad69d83a436b5b82b773481d95d17b9685e1"}, + {file = "h5py-3.11.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f4e025e852754ca833401777c25888acb96889ee2c27e7e629a19aee288833f0"}, + {file = "h5py-3.11.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6c4b760082626120031d7902cd983d8c1f424cdba2809f1067511ef283629d4b"}, + {file = "h5py-3.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67462d0669f8f5459529de179f7771bd697389fcb3faab54d63bf788599a48ea"}, + {file = "h5py-3.11.0-cp39-cp39-win_amd64.whl", hash = "sha256:d9c944d364688f827dc889cf83f1fca311caf4fa50b19f009d1f2b525edd33a3"}, + {file = "h5py-3.11.0.tar.gz", hash = "sha256:7b7e8f78072a2edec87c9836f25f34203fd492a4475709a18b417a33cfb21fa9"}, ] -[package.extras] -abfs = ["adlfs"] -adl = ["adlfs"] -arrow = ["pyarrow (>=1)"] -dask = ["dask", "distributed"] -devel = ["pytest", "pytest-cov"] -dropbox = ["dropbox", "dropboxdrivefs", "requests"] -full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "dask", "distributed", "dropbox", "dropboxdrivefs", "fusepy", "gcsfs", "libarchive-c", "ocifs", "panel", "paramiko", "pyarrow (>=1)", "pygit2", "requests", "s3fs", "smbprotocol", "tqdm"] -fuse = ["fusepy"] -gcs = ["gcsfs"] -git = ["pygit2"] -github = ["requests"] -gs = ["gcsfs"] -gui = ["panel"] -hdfs = ["pyarrow (>=1)"] -http = ["aiohttp (!=4.0.0a0,!=4.0.0a1)"] -libarchive = ["libarchive-c"] -oci = ["ocifs"] -s3 = ["s3fs"] -sftp = ["paramiko"] -smb = ["smbprotocol"] -ssh = ["paramiko"] -tqdm = ["tqdm"] +[package.dependencies] +numpy = ">=1.17.3" [[package]] name = "idna" @@ -399,23 +323,36 @@ files = [ ] [[package]] -name = "importlib-metadata" -version = "7.1.0" -description = "Read metadata from Python packages" +name = "imageio" +version = "2.34.1" +description = "Library for reading and writing a wide range of image, video, scientific, and volumetric data formats." optional = false python-versions = ">=3.8" files = [ - {file = "importlib_metadata-7.1.0-py3-none-any.whl", hash = "sha256:30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570"}, - {file = "importlib_metadata-7.1.0.tar.gz", hash = "sha256:b78938b926ee8d5f020fc4772d487045805a55ddbad2ecf21c6d60938dc7fcd2"}, + {file = "imageio-2.34.1-py3-none-any.whl", hash = "sha256:408c1d4d62f72c9e8347e7d1ca9bc11d8673328af3913868db3b828e28b40a4c"}, + {file = "imageio-2.34.1.tar.gz", hash = "sha256:f13eb76e4922f936ac4a7fec77ce8a783e63b93543d4ea3e40793a6cabd9ac7d"}, ] [package.dependencies] -zipp = ">=0.5" +numpy = "*" +pillow = ">=8.3.2" [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -perf = ["ipython"] -testing = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-perf (>=0.9.2)", "pytest-ruff (>=0.2.1)"] +all-plugins = ["astropy", "av", "imageio-ffmpeg", "pillow-heif", "psutil", "tifffile"] +all-plugins-pypy = ["av", "imageio-ffmpeg", "pillow-heif", "psutil", "tifffile"] +build = ["wheel"] +dev = ["black", "flake8", "fsspec[github]", "pytest", "pytest-cov"] +docs = ["numpydoc", "pydata-sphinx-theme", "sphinx (<6)"] +ffmpeg = ["imageio-ffmpeg", "psutil"] +fits = ["astropy"] +full = ["astropy", "av", "black", "flake8", "fsspec[github]", "gdal", "imageio-ffmpeg", "itk", "numpydoc", "pillow-heif", "psutil", "pydata-sphinx-theme", "pytest", "pytest-cov", "sphinx (<6)", "tifffile", "wheel"] +gdal = ["gdal"] +itk = ["itk"] +linting = ["black", "flake8"] +pillow-heif = ["pillow-heif"] +pyav = ["av"] +test = ["fsspec[github]", "pytest", "pytest-cov"] +tifffile = ["tifffile"] [[package]] name = "lancedb" @@ -455,6 +392,43 @@ docs = ["mkdocs", "mkdocs-jupyter", "mkdocs-material", "mkdocs-ultralytics-plugi embeddings = ["awscli (>=1.29.57)", "boto3 (>=1.28.57)", "botocore (>=1.31.57)", "cohere", "google-generativeai", "huggingface-hub", "instructorembedding", "open-clip-torch", "openai (>=1.6.1)", "pillow", "sentence-transformers", "torch"] tests = ["aiohttp", "duckdb", "pandas (>=1.4)", "polars (>=0.19)", "pytest", "pytest-asyncio", "pytest-mock", "pytz"] +[[package]] +name = "lazy-loader" +version = "0.4" +description = "Makes it easy to load subpackages and functions on demand." +optional = false +python-versions = ">=3.7" +files = [ + {file = "lazy_loader-0.4-py3-none-any.whl", hash = "sha256:342aa8e14d543a154047afb4ba8ef17f5563baad3fc610d7b15b213b0f119efc"}, + {file = "lazy_loader-0.4.tar.gz", hash = "sha256:47c75182589b91a4e1a85a136c074285a5ad4d9f39c63e0d7fb76391c4574cd1"}, +] + +[package.dependencies] +packaging = "*" + +[package.extras] +dev = ["changelist (==0.5)"] +lint = ["pre-commit (==3.7.0)"] +test = ["pytest (>=7.4)", "pytest-cov (>=4.1)"] + +[[package]] +name = "networkx" +version = "3.3" +description = "Python package for creating and manipulating graphs and networks" +optional = false +python-versions = ">=3.10" +files = [ + {file = "networkx-3.3-py3-none-any.whl", hash = "sha256:28575580c6ebdaf4505b22c6256a2b9de86b316dc63ba9e93abde3d78dfdbcf2"}, + {file = "networkx-3.3.tar.gz", hash = "sha256:0c127d8b2f4865f59ae9cb8aafcd60b5c70f3241ebd66f7defad7c4ab90126c9"}, +] + +[package.extras] +default = ["matplotlib (>=3.6)", "numpy (>=1.23)", "pandas (>=1.4)", "scipy (>=1.9,!=1.11.0,!=1.11.1)"] +developer = ["changelist (==0.5)", "mypy (>=1.1)", "pre-commit (>=3.2)", "rtoml"] +doc = ["myst-nb (>=1.0)", "numpydoc (>=1.7)", "pillow (>=9.4)", "pydata-sphinx-theme (>=0.14)", "sphinx (>=7)", "sphinx-gallery (>=0.14)", "texext (>=0.6.7)"] +extra = ["lxml (>=4.6)", "pydot (>=2.0)", "pygraphviz (>=1.12)", "sympy (>=1.10)"] +test = ["pytest (>=7.2)", "pytest-cov (>=4.0)"] + [[package]] name = "numpy" version = "1.26.4" @@ -605,6 +579,92 @@ files = [ {file = "pastel-0.2.1.tar.gz", hash = "sha256:e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d"}, ] +[[package]] +name = "pillow" +version = "10.3.0" +description = "Python Imaging Library (Fork)" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pillow-10.3.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:90b9e29824800e90c84e4022dd5cc16eb2d9605ee13f05d47641eb183cd73d45"}, + {file = "pillow-10.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a2c405445c79c3f5a124573a051062300936b0281fee57637e706453e452746c"}, + {file = "pillow-10.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78618cdbccaa74d3f88d0ad6cb8ac3007f1a6fa5c6f19af64b55ca170bfa1edf"}, + {file = "pillow-10.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:261ddb7ca91fcf71757979534fb4c128448b5b4c55cb6152d280312062f69599"}, + {file = "pillow-10.3.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:ce49c67f4ea0609933d01c0731b34b8695a7a748d6c8d186f95e7d085d2fe475"}, + {file = "pillow-10.3.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:b14f16f94cbc61215115b9b1236f9c18403c15dd3c52cf629072afa9d54c1cbf"}, + {file = "pillow-10.3.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d33891be6df59d93df4d846640f0e46f1a807339f09e79a8040bc887bdcd7ed3"}, + {file = "pillow-10.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b50811d664d392f02f7761621303eba9d1b056fb1868c8cdf4231279645c25f5"}, + {file = "pillow-10.3.0-cp310-cp310-win32.whl", hash = "sha256:ca2870d5d10d8726a27396d3ca4cf7976cec0f3cb706debe88e3a5bd4610f7d2"}, + {file = "pillow-10.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:f0d0591a0aeaefdaf9a5e545e7485f89910c977087e7de2b6c388aec32011e9f"}, + {file = "pillow-10.3.0-cp310-cp310-win_arm64.whl", hash = "sha256:ccce24b7ad89adb5a1e34a6ba96ac2530046763912806ad4c247356a8f33a67b"}, + {file = "pillow-10.3.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:5f77cf66e96ae734717d341c145c5949c63180842a545c47a0ce7ae52ca83795"}, + {file = "pillow-10.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e4b878386c4bf293578b48fc570b84ecfe477d3b77ba39a6e87150af77f40c57"}, + {file = "pillow-10.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fdcbb4068117dfd9ce0138d068ac512843c52295ed996ae6dd1faf537b6dbc27"}, + {file = "pillow-10.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9797a6c8fe16f25749b371c02e2ade0efb51155e767a971c61734b1bf6293994"}, + {file = "pillow-10.3.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:9e91179a242bbc99be65e139e30690e081fe6cb91a8e77faf4c409653de39451"}, + {file = "pillow-10.3.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:1b87bd9d81d179bd8ab871603bd80d8645729939f90b71e62914e816a76fc6bd"}, + {file = "pillow-10.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:81d09caa7b27ef4e61cb7d8fbf1714f5aec1c6b6c5270ee53504981e6e9121ad"}, + {file = "pillow-10.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:048ad577748b9fa4a99a0548c64f2cb8d672d5bf2e643a739ac8faff1164238c"}, + {file = "pillow-10.3.0-cp311-cp311-win32.whl", hash = "sha256:7161ec49ef0800947dc5570f86568a7bb36fa97dd09e9827dc02b718c5643f09"}, + {file = "pillow-10.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:8eb0908e954d093b02a543dc963984d6e99ad2b5e36503d8a0aaf040505f747d"}, + {file = "pillow-10.3.0-cp311-cp311-win_arm64.whl", hash = "sha256:4e6f7d1c414191c1199f8996d3f2282b9ebea0945693fb67392c75a3a320941f"}, + {file = "pillow-10.3.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:e46f38133e5a060d46bd630faa4d9fa0202377495df1f068a8299fd78c84de84"}, + {file = "pillow-10.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:50b8eae8f7334ec826d6eeffaeeb00e36b5e24aa0b9df322c247539714c6df19"}, + {file = "pillow-10.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9d3bea1c75f8c53ee4d505c3e67d8c158ad4df0d83170605b50b64025917f338"}, + {file = "pillow-10.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:19aeb96d43902f0a783946a0a87dbdad5c84c936025b8419da0a0cd7724356b1"}, + {file = "pillow-10.3.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:74d28c17412d9caa1066f7a31df8403ec23d5268ba46cd0ad2c50fb82ae40462"}, + {file = "pillow-10.3.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:ff61bfd9253c3915e6d41c651d5f962da23eda633cf02262990094a18a55371a"}, + {file = "pillow-10.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d886f5d353333b4771d21267c7ecc75b710f1a73d72d03ca06df49b09015a9ef"}, + {file = "pillow-10.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4b5ec25d8b17217d635f8935dbc1b9aa5907962fae29dff220f2659487891cd3"}, + {file = "pillow-10.3.0-cp312-cp312-win32.whl", hash = "sha256:51243f1ed5161b9945011a7360e997729776f6e5d7005ba0c6879267d4c5139d"}, + {file = "pillow-10.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:412444afb8c4c7a6cc11a47dade32982439925537e483be7c0ae0cf96c4f6a0b"}, + {file = "pillow-10.3.0-cp312-cp312-win_arm64.whl", hash = "sha256:798232c92e7665fe82ac085f9d8e8ca98826f8e27859d9a96b41d519ecd2e49a"}, + {file = "pillow-10.3.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:4eaa22f0d22b1a7e93ff0a596d57fdede2e550aecffb5a1ef1106aaece48e96b"}, + {file = "pillow-10.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:cd5e14fbf22a87321b24c88669aad3a51ec052eb145315b3da3b7e3cc105b9a2"}, + {file = "pillow-10.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1530e8f3a4b965eb6a7785cf17a426c779333eb62c9a7d1bbcf3ffd5bf77a4aa"}, + {file = "pillow-10.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d512aafa1d32efa014fa041d38868fda85028e3f930a96f85d49c7d8ddc0383"}, + {file = "pillow-10.3.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:339894035d0ede518b16073bdc2feef4c991ee991a29774b33e515f1d308e08d"}, + {file = "pillow-10.3.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:aa7e402ce11f0885305bfb6afb3434b3cd8f53b563ac065452d9d5654c7b86fd"}, + {file = "pillow-10.3.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:0ea2a783a2bdf2a561808fe4a7a12e9aa3799b701ba305de596bc48b8bdfce9d"}, + {file = "pillow-10.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c78e1b00a87ce43bb37642c0812315b411e856a905d58d597750eb79802aaaa3"}, + {file = "pillow-10.3.0-cp38-cp38-win32.whl", hash = "sha256:72d622d262e463dfb7595202d229f5f3ab4b852289a1cd09650362db23b9eb0b"}, + {file = "pillow-10.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:2034f6759a722da3a3dbd91a81148cf884e91d1b747992ca288ab88c1de15999"}, + {file = "pillow-10.3.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:2ed854e716a89b1afcedea551cd85f2eb2a807613752ab997b9974aaa0d56936"}, + {file = "pillow-10.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:dc1a390a82755a8c26c9964d457d4c9cbec5405896cba94cf51f36ea0d855002"}, + {file = "pillow-10.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4203efca580f0dd6f882ca211f923168548f7ba334c189e9eab1178ab840bf60"}, + {file = "pillow-10.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3102045a10945173d38336f6e71a8dc71bcaeed55c3123ad4af82c52807b9375"}, + {file = "pillow-10.3.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:6fb1b30043271ec92dc65f6d9f0b7a830c210b8a96423074b15c7bc999975f57"}, + {file = "pillow-10.3.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:1dfc94946bc60ea375cc39cff0b8da6c7e5f8fcdc1d946beb8da5c216156ddd8"}, + {file = "pillow-10.3.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b09b86b27a064c9624d0a6c54da01c1beaf5b6cadfa609cf63789b1d08a797b9"}, + {file = "pillow-10.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d3b2348a78bc939b4fed6552abfd2e7988e0f81443ef3911a4b8498ca084f6eb"}, + {file = "pillow-10.3.0-cp39-cp39-win32.whl", hash = "sha256:45ebc7b45406febf07fef35d856f0293a92e7417ae7933207e90bf9090b70572"}, + {file = "pillow-10.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:0ba26351b137ca4e0db0342d5d00d2e355eb29372c05afd544ebf47c0956ffeb"}, + {file = "pillow-10.3.0-cp39-cp39-win_arm64.whl", hash = "sha256:50fd3f6b26e3441ae07b7c979309638b72abc1a25da31a81a7fbd9495713ef4f"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-macosx_10_10_x86_64.whl", hash = "sha256:6b02471b72526ab8a18c39cb7967b72d194ec53c1fd0a70b050565a0f366d355"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:8ab74c06ffdab957d7670c2a5a6e1a70181cd10b727cd788c4dd9005b6a8acd9"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:048eeade4c33fdf7e08da40ef402e748df113fd0b4584e32c4af74fe78baaeb2"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e2ec1e921fd07c7cda7962bad283acc2f2a9ccc1b971ee4b216b75fad6f0463"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:4c8e73e99da7db1b4cad7f8d682cf6abad7844da39834c288fbfa394a47bbced"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:16563993329b79513f59142a6b02055e10514c1a8e86dca8b48a893e33cf91e3"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:dd78700f5788ae180b5ee8902c6aea5a5726bac7c364b202b4b3e3ba2d293170"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:aff76a55a8aa8364d25400a210a65ff59d0168e0b4285ba6bf2bd83cf675ba32"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:b7bc2176354defba3edc2b9a777744462da2f8e921fbaf61e52acb95bafa9828"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:793b4e24db2e8742ca6423d3fde8396db336698c55cd34b660663ee9e45ed37f"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d93480005693d247f8346bc8ee28c72a2191bdf1f6b5db469c096c0c867ac015"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c83341b89884e2b2e55886e8fbbf37c3fa5efd6c8907124aeb72f285ae5696e5"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:1a1d1915db1a4fdb2754b9de292642a39a7fb28f1736699527bb649484fb966a"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a0eaa93d054751ee9964afa21c06247779b90440ca41d184aeb5d410f20ff591"}, + {file = "pillow-10.3.0.tar.gz", hash = "sha256:9d2455fbf44c914840c793e89aa82d0e1763a14253a000743719ae5946814b2d"}, +] + +[package.extras] +docs = ["furo", "olefile", "sphinx (>=2.4)", "sphinx-copybutton", "sphinx-inline-tabs", "sphinx-removed-in", "sphinxext-opengraph"] +fpx = ["olefile"] +mic = ["olefile"] +tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout"] +typing = ["typing-extensions"] +xmp = ["defusedxml"] + [[package]] name = "poethepoet" version = "0.25.0" @@ -682,6 +742,25 @@ files = [ [package.dependencies] numpy = ">=1.16.6,<2" +[[package]] +name = "pybasic" +version = "0.0.0" +description = "" +optional = false +python-versions = "*" +files = [] +develop = false + +[package.dependencies] +scikit-image = ">=0.17.2" +scipy = ">=1.3" + +[package.source] +type = "git" +url = "https://github.com/WayScience/BaSiCPy.git" +reference = "mitocheck_data" +resolved_reference = "666bbc827595fa07b3d36104eb0eceef6007f9c0" + [[package]] name = "pydantic" version = "2.6.4" @@ -975,6 +1054,91 @@ files = [ decorator = ">=3.4.2" py = ">=1.4.26,<2.0.0" +[[package]] +name = "scikit-image" +version = "0.23.2" +description = "Image processing in Python" +optional = false +python-versions = ">=3.10" +files = [ + {file = "scikit_image-0.23.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f9a8db6c52f8d0e1474ea8320d7b8db442b4d6baa29dd0acbd02f8a49572f18a"}, + {file = "scikit_image-0.23.2-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:524b51a7440e46ed2ebbde7bc288bf2dde1dee2caafdd9513b2aca38a48223b7"}, + {file = "scikit_image-0.23.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8b335c229170d787b3fb8c60d220f72049ccf862d5191a3cfda6ac84b995ac4e"}, + {file = "scikit_image-0.23.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:08b10781efbd6b084f3c847ff4049b657241ea866b9e331b14bf791dcb3e6661"}, + {file = "scikit_image-0.23.2-cp310-cp310-win_amd64.whl", hash = "sha256:a207352e9a1956dda1424bbe872c7795345187138118e8be6a421aef3b988c2a"}, + {file = "scikit_image-0.23.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ee83fdb1843ee938eabdfeb9498623282935ea30aa20dffc5d5d16698efb4b2a"}, + {file = "scikit_image-0.23.2-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:a158f50d3df4867bbd1c698520ede8bc493e430ad83f54ac1f0d8f57b328779b"}, + {file = "scikit_image-0.23.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:55de3326be124334b89314e9e04c8971ad98d6681e11a243f71bfb85ef9554b0"}, + {file = "scikit_image-0.23.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fce619a6d84fe40c1208fa579b646e93ce13ef0afc3652a23e9782b2c183291a"}, + {file = "scikit_image-0.23.2-cp311-cp311-win_amd64.whl", hash = "sha256:ee65669aa586e110346f567ed5c92d1bd63799a19e951cb83da3f54b0caf7c52"}, + {file = "scikit_image-0.23.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:15bfb4e8d7bd90a967e6a3c3ab6be678063fc45e950b730684a8db46a02ff892"}, + {file = "scikit_image-0.23.2-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:5736e66d01b11cd90988ec24ab929c80a03af28f690189c951886891ebf63154"}, + {file = "scikit_image-0.23.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3597ac5d8f51dafbcb7433ef1fdefdefb535f50745b2002ae0a5d651df4f063b"}, + {file = "scikit_image-0.23.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1978be2abe3c3c3189a99a411d48bbb1306f7c2debb3aefbf426e23947f26623"}, + {file = "scikit_image-0.23.2-cp312-cp312-win_amd64.whl", hash = "sha256:ae32bf0cb02b672ed74d28880ca6f88928ae8dd794d67e04fa3ff4836feb9bd6"}, + {file = "scikit_image-0.23.2.tar.gz", hash = "sha256:c9da4b2c3117e3e30364a3d14496ee5c72b09eb1a4ab1292b302416faa360590"}, +] + +[package.dependencies] +imageio = ">=2.33" +lazy-loader = ">=0.4" +networkx = ">=2.8" +numpy = ">=1.23" +packaging = ">=21" +pillow = ">=9.1" +scipy = ">=1.9" +tifffile = ">=2022.8.12" + +[package.extras] +build = ["Cython (>=3.0.4)", "build", "meson-python (>=0.15)", "ninja", "numpy (>=2.0.0rc1)", "packaging (>=21)", "pythran", "setuptools (>=67)", "spin (==0.8)", "wheel"] +data = ["pooch (>=1.6.0)"] +developer = ["ipython", "pre-commit", "tomli"] +docs = ["PyWavelets (>=1.1.1)", "dask[array] (>=2022.9.2)", "ipykernel", "ipywidgets", "kaleido", "matplotlib (>=3.6)", "myst-parser", "numpydoc (>=1.7)", "pandas (>=1.5)", "plotly (>=5.10)", "pooch (>=1.6)", "pydata-sphinx-theme (>=0.15.2)", "pytest-doctestplus", "pytest-runner", "scikit-learn (>=1.1)", "seaborn (>=0.11)", "sphinx (>=7.3)", "sphinx-copybutton", "sphinx-gallery (>=0.14)", "sphinx_design (>=0.5)", "tifffile (>=2022.8.12)"] +optional = ["PyWavelets (>=1.1.1)", "SimpleITK", "astropy (>=5.0)", "cloudpickle (>=0.2.1)", "dask[array] (>=2021.1.0)", "matplotlib (>=3.6)", "pooch (>=1.6.0)", "pyamg", "scikit-learn (>=1.1)"] +test = ["asv", "numpydoc (>=1.7)", "pooch (>=1.6.0)", "pytest (>=7.0)", "pytest-cov (>=2.11.0)", "pytest-doctestplus", "pytest-faulthandler", "pytest-localserver"] + +[[package]] +name = "scipy" +version = "1.13.1" +description = "Fundamental algorithms for scientific computing in Python" +optional = false +python-versions = ">=3.9" +files = [ + {file = "scipy-1.13.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:20335853b85e9a49ff7572ab453794298bcf0354d8068c5f6775a0eabf350aca"}, + {file = "scipy-1.13.1-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:d605e9c23906d1994f55ace80e0125c587f96c020037ea6aa98d01b4bd2e222f"}, + {file = "scipy-1.13.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cfa31f1def5c819b19ecc3a8b52d28ffdcc7ed52bb20c9a7589669dd3c250989"}, + {file = "scipy-1.13.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f26264b282b9da0952a024ae34710c2aff7d27480ee91a2e82b7b7073c24722f"}, + {file = "scipy-1.13.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:eccfa1906eacc02de42d70ef4aecea45415f5be17e72b61bafcfd329bdc52e94"}, + {file = "scipy-1.13.1-cp310-cp310-win_amd64.whl", hash = "sha256:2831f0dc9c5ea9edd6e51e6e769b655f08ec6db6e2e10f86ef39bd32eb11da54"}, + {file = "scipy-1.13.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:27e52b09c0d3a1d5b63e1105f24177e544a222b43611aaf5bc44d4a0979e32f9"}, + {file = "scipy-1.13.1-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:54f430b00f0133e2224c3ba42b805bfd0086fe488835effa33fa291561932326"}, + {file = "scipy-1.13.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e89369d27f9e7b0884ae559a3a956e77c02114cc60a6058b4e5011572eea9299"}, + {file = "scipy-1.13.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a78b4b3345f1b6f68a763c6e25c0c9a23a9fd0f39f5f3d200efe8feda560a5fa"}, + {file = "scipy-1.13.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:45484bee6d65633752c490404513b9ef02475b4284c4cfab0ef946def50b3f59"}, + {file = "scipy-1.13.1-cp311-cp311-win_amd64.whl", hash = "sha256:5713f62f781eebd8d597eb3f88b8bf9274e79eeabf63afb4a737abc6c84ad37b"}, + {file = "scipy-1.13.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5d72782f39716b2b3509cd7c33cdc08c96f2f4d2b06d51e52fb45a19ca0c86a1"}, + {file = "scipy-1.13.1-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:017367484ce5498445aade74b1d5ab377acdc65e27095155e448c88497755a5d"}, + {file = "scipy-1.13.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:949ae67db5fa78a86e8fa644b9a6b07252f449dcf74247108c50e1d20d2b4627"}, + {file = "scipy-1.13.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:de3ade0e53bc1f21358aa74ff4830235d716211d7d077e340c7349bc3542e884"}, + {file = "scipy-1.13.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:2ac65fb503dad64218c228e2dc2d0a0193f7904747db43014645ae139c8fad16"}, + {file = "scipy-1.13.1-cp312-cp312-win_amd64.whl", hash = "sha256:cdd7dacfb95fea358916410ec61bbc20440f7860333aee6d882bb8046264e949"}, + {file = "scipy-1.13.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:436bbb42a94a8aeef855d755ce5a465479c721e9d684de76bf61a62e7c2b81d5"}, + {file = "scipy-1.13.1-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:8335549ebbca860c52bf3d02f80784e91a004b71b059e3eea9678ba994796a24"}, + {file = "scipy-1.13.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d533654b7d221a6a97304ab63c41c96473ff04459e404b83275b60aa8f4b7004"}, + {file = "scipy-1.13.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:637e98dcf185ba7f8e663e122ebf908c4702420477ae52a04f9908707456ba4d"}, + {file = "scipy-1.13.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a014c2b3697bde71724244f63de2476925596c24285c7a637364761f8710891c"}, + {file = "scipy-1.13.1-cp39-cp39-win_amd64.whl", hash = "sha256:392e4ec766654852c25ebad4f64e4e584cf19820b980bc04960bca0b0cd6eaa2"}, + {file = "scipy-1.13.1.tar.gz", hash = "sha256:095a87a0312b08dfd6a6155cbbd310a8c51800fc931b8c0b84003014b874ed3c"}, +] + +[package.dependencies] +numpy = ">=1.22.4,<2.3" + +[package.extras] +dev = ["cython-lint (>=0.12.2)", "doit (>=0.36.0)", "mypy", "pycodestyle", "pydevtool", "rich-click", "ruff", "types-psutil", "typing_extensions"] +doc = ["jupyterlite-pyodide-kernel", "jupyterlite-sphinx (>=0.12.0)", "jupytext", "matplotlib (>=3.5)", "myst-nb", "numpydoc", "pooch", "pydata-sphinx-theme (>=0.15.2)", "sphinx (>=5.0.0)", "sphinx-design (>=0.4.0)"] +test = ["array-api-strict", "asv", "gmpy2", "hypothesis (>=6.30)", "mpmath", "pooch", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "scikit-umfpack", "threadpoolctl"] + [[package]] name = "semver" version = "3.0.2" @@ -1084,22 +1248,7 @@ h2 = ["h2 (>=4,<5)"] socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] -[[package]] -name = "zipp" -version = "3.18.1" -description = "Backport of pathlib-compatible object wrapper for zip files" -optional = false -python-versions = ">=3.8" -files = [ - {file = "zipp-3.18.1-py3-none-any.whl", hash = "sha256:206f5a15f2af3dbaee80769fb7dc6f249695e940acca08dfb2a4769fe61e538b"}, - {file = "zipp-3.18.1.tar.gz", hash = "sha256:2884ed22e7d8961de1c9a05142eb69a247f120291bc0206a00a7642f09b5b715"}, -] - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy", "pytest-ruff (>=0.2.1)"] - [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "37885f4cc48dbd59ecdc84c2f46bc48b189ff1e71171f842454846005037fd43" +content-hash = "482f381c6a0f8bbc8db7d697233961cb14cbebd027cefe067f7bbcecad60f6bb" diff --git a/pyproject.toml b/pyproject.toml index e585918..acc39f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,8 +15,9 @@ pyarrow = ">=12,<15.0.1" lancedb = "^0.6.7" pandas = "^2.2.1" docker = "^7.0.0" -tifffile = "^2024.2.12" -awkward = "^2.6.3" +h5py = "^3.11.0" +pybasic = { git = "https://github.com/WayScience/BaSiCPy.git", branch="mitocheck_data" } +scikit-image = "^0.23.2" [tool.poe.tasks.package_data] # run a task to package data