FISH Analysis
A library with the funcionality to prepare and analyze HCR-FISH images. Using this library, you can construct a basic FISH image anlysis pipeline.
Installation
pip install FISH-analysis
Get started
Cell Segmentation
- Separate the color channels in a czi and save as images
- Create mask and outline of cells in FISH image
from FISH_analysis import Segmentation
from FISH_analysis import CZI_Channels
# isolate channels from png and save
czi = CZI_Channels('Images/SOX2_(G)._PAX6_(R)._PAX7_(FR)_40x_Spinal_Cords_Uninjured_001/SOX2_(G)._PAX6_(R)._PAX7_(FR)_40x_Spinal_Cords_Uninjured_001.czi')
# convert all channels of czi to png
for chan in (czi.num_channels()):
czi.channel_to_png(chan)
# list of number of channels
print(czi.num_channels())
# show image of all channels in czi
czi.show_all_channels()
# segmentation of cells -> mask and outline
cells = Segmentation('segmentation_output/C4_SOX2_(G)._PAX6_(R)._PAX7_(FR)_40x_Spinal_Cords_Uninjured_001.png')
# make masks and outlines
cells.make_masks(0.9, -5, None, 'cyto')
cells.make_outlines()
Puncta Thresholding
- Threshold FISH image to isolate puncta (dots) and get rid of noise
- Get centroids of objects (cells or dots) in given image (cells outline or thresholded dots)
from FISH_analysis import Puncta_Thresholding
# centroids
thresholding = Puncta_Thresholding('Images/SOX2_(G)._PAX6_(R)._PAX7_(FR)_40x_Spinal_Cords_Uninjured_001/Input/C2 (Pax6) thresholded dots.tif')
centroids = thresholding.get_centroids(0)
print(len(centroids))
# binary threshold and erosion/dilation
thresholding2 = Puncta_Thresholding('Images/SOX2_(G)._PAX6_(R)._PAX7_(FR)_40x_Spinal_Cords_Uninjured_001/Input/MAX_C3-SOX2_(G)._PAX6_(R)._PAX7_(FR)_40x_Spinal_Cords_Uninjured_001.tif')
thresholding2.binary_threshold(190, 'plot')
thresholding2.erosion_dilation(100)
# watershed and gaussian blur
thresholding3 = Puncta_Thresholding('Images/SOX2_(G)._PAX6_(R)._PAX7_(FR)_40x_Spinal_Cords_Uninjured_001/Input/MAX_C4-SOX2_(G)._PAX6_(R)._PAX7_(FR)_40x_Spinal_Cords_Uninjured_001.tif')
thresholding3.watershed("plot")
thresholding3.gaussian_blur(11, "plot")
Puncta Analysis
- Threshold FISH image to isolate puncta (dots) and get rid of noise
- Get centroids of objects (cells or dots) in given image (cells outline or thresholded dots)
from FISH_analysis import Puncta_Analysis
from FISH_analysis import Puncta_Thresholding
# overlay cells outline onto thresholded dots
analysis = Puncta_Analysis('segmentation_output/C4_SOX2_(G)._PAX6_(R)._PAX7_(FR)_40x_Spinal_Cords_Uninjured_001_outlines.png', 'Images/SOX2_(G)._PAX6_(R)._PAX7_(FR)_40x_Spinal_Cords_Uninjured_001/Input/C3 (SOX2) thrsholded dots.tif')
analysis.overlay()
# create thresholding objects for centroids
cells = Puncta_Thresholding('analysis_output/outline.png')
dots = Puncta_Thresholding('analysis_output/dots.png')
# get centroids of cells and dots
cell_centroids = cells.get_centroids()
dot_centroids = dots.get_centroids()
# get and save all cell centroids
analysis.refine_cell_centroids(cell_centroids)
# get and save all dot centroids
analysis.refine_dot_centroids(dot_centroids)
# save a csv file of dots per cell data for real FISH images of cells and dots
analysis.dots_per_cell()
Metadata
Release files for FISH-analysis 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| FISH-analysis-0.0.1.tar.gz | 10.9 kB | Without provenance | Details for FISH-analysis-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| FISH_analysis-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for FISH_analysis-0.0.1-py3-none-any.whl |
Total release size: 23.0 kB
Release files / FISH-analysis-0.0.1.tar.gz
| Download URL | FISH-analysis-0.0.1.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d11060631c5de297d18c5c861b61f37dd07daf1e846c38c45fe858732bdf4e2b
|
|
BLAKE2b-256 checksum How to use checksums |
8f3dc6933b50f219c3cb86b374f0e312b387a266dbb7e0a4f9b6b4b95248347b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / FISH_analysis-0.0.1-py3-none-any.whl
| Download URL | FISH_analysis-0.0.1-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
265a86033cd2fc649d124117692be88f5c709d4a872457dac9e1ff7a1703361d
|
|
BLAKE2b-256 checksum How to use checksums |
779704a9811e422121d0b64c88f8cd51b9448ca8ef3887a1387f679ecee7eedb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Security for FISH-analysis 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.