-
Notifications
You must be signed in to change notification settings - Fork 0
Home
NucDetect is a Python package that is designed to identify the typical protein foci which which can be observed after DNA double strand breaks (such as γH2AX foci). It uses fluorescence images to to identify and quantify the nucleus and foci on both the red and green channel. The results can be either obtained as image with marked nuclei and foci, as .csv file or both. The results can be also printed into the console for easy use with other programs.
NucDetect uses an algorithmic approach for the identification of both the nuclei and foci. Thereby, following steps are performed:
- Thresholding of each channel. Thereby, two different approaches are used for nuclei and foci: Whilst the nuclei (which are assumed to be found on the blue channel) is thresholded using the [https://ieeexplore.ieee.org/document/366472?arnumber=366472](Triangle Thresholding Method), both foci channel are thresholded used a local thresholding method based on each individual nucleus to identify foci whilst ignoring unspecific noise.
- Calculation of euclidean distance maps of each channel
- Determination of local maxima
- Labeling of the determined maxima
- Use of the labeled maxima as seeds for watershed transformation. This is needed to segment falsely clustered nuclei. This can occur if two or more nuclei are in close proximity to each other
- Assignment of identified foci to the individual nuclei. This step determined the intersection of each foci area with all nuclei, to figure out if the foci is either fully enclosed by the given nucleus, partially enclosed or not enclosed at all
- Determination and elimination of oversegmentation: Sometimes watershed transformation leads to an oversegmentation of a nucleus. This step is needed to account for that by identifying and merging oversegmented nuclei. The oversegmentation is thereby determined by the size of the identified nuclei and the proximity to other nuclei.
NucDetect can be easily used by importing the Detector
class and providing images to it:
det = Detector()
key = det.load_image(url_to_image_file, names=("DAPI", "APC", "FITC"))
The key variable is thereby import to obtain the results of the provided image, the parameter names
is simply used to rename the channels in the output file.
To start the image analysis, a simple call to
det.analyse_images()
suffices. The results of the image anaylsis can be obtained on two ways. If one prefers or needs a visual representation of the identified foci, one simply can call
det.show_result_image(key) # key is used to identify the image
to show the image or
det.save_result_image(key) # key is used to identify the image
to save the result image to file.
A table containing the data of the image analysis can be obtained either by
det.show_result(key) # Prints the table formatted to the console
or by
det.create_ouput(key) # Saves the table to file