ContactJ: Characterization of lipid droplet-mitochondrial contacts using fluorescence microscopy and image analysis

Lipid droplets (LDs) are the major lipid storage organelles of eukaryotic cells and together with mitochondria key regulators of cell bioenergetics. LDs communicate with mitochondria and other organelles forming “metabolic synapse” contacts to ensure that lipid supply occurs where and when necessary. Although transmission electron microscopy analysis allows an accurate and precise analysis of contacts, the characterization of a large number of cells and conditions can become a long-term process. In order to extend contact analysis to hundreds of cells and multiple conditions, we have combined confocal fluorescence microscopy with advanced image analysis methods. In this work, we have developed the ImageJ macro script ContactJ, a novel and straight image analysis method to identify and quantify contacts between LD and mitochondria in fluorescence microscopy images allowing the automatic analysis. This image analysis workflow combines colocalization and skeletonization methods, enabling the quantification of LD-mitochondria contacts together with a complete characterization of organelles and cellular parameters. The correlation and normalization of these parameters contribute to the complex description of cell behavior under different experimental energetic states. ContactJ is available here: https://doi.org/10.5281/zenodo.5810874


Introduction
Lipid droplets (LDs) are the major lipid storage organelles of eukaryotic cells and together with mitochondria key regulators of cell's bioenergetics. They supply essential lipids to produce signalling molecules, membrane building blocks, and the metabolic energy needed to survive during nutrient poor periods. 1 In order to achieve their functions, LDs communicate with mitochondria and other organelles (endoplasmic reticulum, endosomes, peroxisomes and vacuoles) forming membrane contact sites, 2 "metabolic synapses", to ensure that lipid provision occurs where and when necessary. 1,3,4 Contact sites between these organelles have been described and characterized by transmission electron microscopy (TEM) as it resolves at the membrane scale where these contacts take place. 2,5 Whereas TEM allows accurate and precise characterization of contacts, their analysis on a large number of cells and conditions can become a long-term process. On the other hand, confocal fluorescence microscopy combined with advanced image analysis methods enable to extend contact analysis to hundreds of cells and multiple conditions. Typically, in fluorescence microscopy, the contacts between cellular organelles, the organelle interactome, have been studied by colocalization or overlapping regions of the organelles masks 6 or measuring the fraction of intensity of other organelles near to LD. 7 In the present work, we describe a novel and straight image analysis method (ContactJ) to identify and quantify contact regions between LD and mitochondria in fluorescence microscopy images allowing the automatic analysis of hundreds of cells and multiple conditions. This image analysis workflow combines colocalization and skeletonization methods, enabling the detection of LD-mitochondria contacts together with a complete characterization of organelles and cellular parameters (morphometry and distribution). The correlation and normalization of these parameters contribute to the complex description of cells response under different experimental conditions such as metabolic or pathogenic states.
The present work has been adapted to the particular conditions of this experiment dataset where membrane or cell mask labelling couldn't be implemented. For this reason, a smart strategy for the cell segmentation has been used: the addition of the available cytoplasmic labellings (LD plus Mitochondria) and the Nucleus staining to define the cell region. Whenever it is possible, it is recommended to use a cell mask labelling to facilitate cell segmentation and individualization. In such case, the workflow for cell segmentation should be modified.
• Extended information about the different steps throughout ContactJ macro has been included.
• Comparison between Manual and Automatic Analysis with ContactJ.
• Implementation of a straightforward core code of ContactJ, ContactJ4All, that facilitates the applicability of ContactJ in 3D or time series images, and its combination with 3D objects analysis and objects tracking methods. ContactJ4All is ready to be included and adapted to any workflow. It is available on GitHub and Zenodo (https://doi.org/10.5281/zenodo.5810614).
Any further responses from the reviewers can be found at the end of the article nm, 500-550 nm and 571-625 nm, respectively, and the confocal pinhole was set at 1 Airy Unit (AU). Spectral detection was performed using 2 photomultipliers and 1 central GaAsP. Images were acquired in a 1024 × 1024 format, pixel size at 93 × 93 nm, and integration time of 0.51 microseconds. Sample preparation and image acquisition of TEM image from Figure 3a has been previously described in detail. 5

Implementation
We have developed ContactJ, a macro script for the open-source image analysis software ImageJ. 8,9 This macro automatically and rapidly quantifies confocal images (1 section, 8-12-16 bit depth) that are saved in a folder and returns the table of the resulting measurements, images and Regions of Interests (ROIs) in a "Results" folder. Thus, inexperienced users with no prior image analysis experience will find it easy to use. As can be seen in Figure 1, the flowchart illustrates how the macro automatically detects and measures LD-mitochondria linear contacts by combining standard and machine learning segmentation processes and the novel use of colocalization together with skeletonization methods from a large number of fluorescence images.
First, ContactJ macro performs the segmentation of the cells, LD and mitochondria separately. Cell segmentation was adapted to the particular conditions of this experiment dataset where a membrane or a cell mask labelling couldn't be implemented. Briefly, cell segmentation was achieved by adding the available cytoplasmic labelling (LD plus Mitochondria) and the Nucleus staining. To obtain similar intensity contributions from cytoplasmic labelling and nucleus, LD and mitochondria channels were multiplied each by 0.2 to reduce its intensity contribution and make it more similar to the nucleus intensity. As these factors are dependent on the different experimental conditions, they can be modified at the graphical user interface (GUI) at the beginning of the macro (referred at the GUI as Compensation).
Intensity compensated channels from mitochondria and LD were added to a binary mask from nuclei. The resulting image was used to find local maxima (with prominence of 100) and to obtain subsequently the segmented particles binary image. Segmented particles limits were encoded as 0 value on the binarized image from the three added channels. The original 3 channel image was sequentially converted to RGB and to 8bit, median filtered (radius 2) and thresholded (Huang). After performing the minimum operation between the processed and thrsesholded original image and the segmented particles limits image, cells were individualized and stored as ROIs (see Figure 2a), by particle analysis. Cell ROIs were saved as zip file in the results folder.
LD segmentation was achieved through a Trainable Weka Segmentation classifier 10 on LD channel image (see Figure 2b) using the classification algorithm Fast Random Forest and the following Training features: Gaussian Blur, Hessian, Membrane projections, Sobel filtre, Difference of Gaussians. Mitochondria were segmented by intensity thresholding (autothreshold method "Otsu") (see Figure 2c). Once cells and LD were segmented, contact regions between mitochondria and LD were first obtained using the Colocalization plugin. 11 This plugin highlights the colocalized "contact" points between mitochondria and LD. The plugin generates an 8 bit binary image with only the colocalized points (Display value = 255). It analyses Mitochondria and LD channels, pixel by pixel, and considers a colocalized point if its respective intensities are strictly higher than the threshold determined for its channels (autothreshold methods "Yen" for LD channel and "Otsu" for mitochondria channel), and if its ratio (of intensity) is strictly higher than the ratio setting value (set to 50%: ratio (0-100%)). Secondly, the regions of individualized LD were obtained using the Find Maxima tool with Segmented particles result from the LD mask. Finally, individualized contact regions were converted to a contour line section by performing the skeletonization of the minimum image calculation from the colocalization mask and the segmented particles result from LD. Contact perimeter and contact counts (a contact is defined as a continuous contact line) were quantified, obtaining the linear LD-mitochondria contact of each cell (see Figure 2d).
Throughout the execution of the macro, all the data is stored in arrays (cell, LD and mitochondria areas and perimeters, contact perimeter, number of contacts, etc). Moreover, this data is stored in a.txt file allowing the traceability of the results for each cell and each image.
Operation ImageJ/Fiji with the Colocalization 11 and WEKA 10 plugins should be installed and ContactJ run from ImageJ macro editor. The software can be tested with the sample data provided (in Underlying data 12 ). First, the user should prepare a set of images and organize them into a folder. In this images folder the user should create a subfolder named "Model" with the data and model files obtained specifically for the segmentation of LD channel using the machine learning WEKA plugin. Once ContactJ runs, macro asks to the user the folder to analyse. Automatically, ContactJ opens the images one by one analysing them, cell by cell, and saving ROIs and all the measurements data obtained (areas, intensity, contact, perimeter …) in a .txt file as a table.

Use cases
ContactJ has been developed and tested for the contact analysis of hundreds of HEK293 cells treated or untreated with lipopolysaccharide (LPS) and expressing or not a protein of interest PLIN5. 4 Taking advantage of fluorescence multilabelling, the cells have been segmented and all parameters can be expressed per cell individually. The macro segments the nucleus, LDs and mitochondria from each cell and it obtains the following parameters that are stored in a data base The main novelty and distinctive feature from ContactJ are that it creates a contact line corresponding to each contact site between mitochondrion and LD. In order to obtain the contact site, ContactJ first generates a colocalization region corresponding to the overlapping fluorescence from both organelles, using the Colocalization plugin. Then, this shape is skeletonized generating a line of equidistant points to its boundaries representing the contact site. The macro stores in the data base file also the total length of the contact sites, the mean length of each contact and the number of contacts detected per cell. In the mentioned work, the results were expressed as Total Contact Length/Cell and compared between cell populations and treatments. 4

Discussion
One of the innovative and distinctive features of ContactJ is that it creates a linear contact region on the mid plane of the LD in close proximity to Mitochondrion, representing the most probable contact site between both organelles.
Although light microscopy resolution limit prevents assertion of true interaction, the analysis of inter organelle contacts by fluorescence microscopy is accepted as an indicator of possible communication between these two organelles, bringing many advantages when performing contact analysis at a high scale of samples and conditions. TEM is used to measure contacts between organelles as it resolves at the membrane scale where these contacts take place, as can be seen in Figure 3(a). ContactJ measurements of contact perimeter between LD and mitochondria are 2-3 times bigger compared to TEM measurements 4 ( Figure 3). The main reasons for this difference are, first, that 2D confocal microscopy image represents a projection of approximately 500nm sample thickness, compared to the 70nm of the ultra-thin TEM lamella and consequently, it is collecting a higher proportion of membrane and contacts. Secondly, the intrinsic difference in resolution would affect more directly the measurements of small contacts by light microscopy overestimating them. Therefore, the contacts obtained with ContactJ can be considered reliable compared to those observed by TEM.
In order to test quality and performance of ContactJ, a comparison between contact manual tracing analysis compared to ContactJ analysis has been performed on 20 cells. Mean and Standard Deviation (microns) from total contact length from Manual quantification were: 44.9220 and 30.1140, respectively, and from ContactJ analysis were: 30.8055 and 18.30792, respectively. ANOVA test was performed and showed no significant difference between both groups means (F = 3.209 and p = 0.08) B). Correlation Analysis of the values obtained with both methods showed a correlation index of 0.899 significant at the 0.01 level (see extended data Manual_vs_ContactJ_methods.pdf).
The comparison between ContactJ analysis vs Manual analysis shows that although both methods correlate, manual analysis-increases significantly standard deviation reducing reproducibility of the method and overestimating contact length.
Moreover, while comparing both methods we have experienced that manual quantification doesn't allow precise contact tracing around organelles, secondly, that it's difficult to stablish visual criteria of proximity and finally, that manual tracing is not only time consuming but, after defining tens of contacts per cell, it results in quick user fatigue and loss of detection and precision. All these results reinforce the idea that ContactJ is an objective and reproducible method valid to define and quantify contacts between organelles automatically.
Furthermore, robustness of ContactJ has been tested and validated also in contact analysis between Endoplasmic Reticulum and Lipid Droplets in U2OS cells in live cell imaging experiments. 13 Obtaining contact regions, together with multiple morphological parameters of organelles, allows the calculation of descriptive statistics that would help describing cellular response. In front a metabolic or pathogenic event, cells need to regulate the transfer and communication between organelles. Among many possible cell reactions, they may change the contact surface between organelles together with the organelle size, number and distribution. For example, in this case, the quantification with ContactJ of the contact length and the LD perimeter would allow the calculation of the LD-Mitochondria "transfer or communication" efficiency for each cell (Contact length/LD Perimeter Length) helping in the comparison between cells response.
ContactJ application can be extended to the contact analysis between other organelles, in 2D, 3D or time series. In fact, this code has been already adapted for the contact tracking analysis between LD and Endoplasmic Reticulum in time lapse experiments. 13 To facilitate the applicability of ContactJ in 3D or time series images, and its combination with 3D objects analysis and objects tracking methods, a straightforward core code of ContactJ, named ContactJ4All, has been developed. 14 ContactJ4All is ready to be included and adapted to any workflow. It is available on github 14 and example datasets from xyz and xyt images are included to test its performance. 14 In conclusion, the described image analysis workflow unveils a wide range of possibilities in the automatic quantification of LD and mitochondria contacts and it also has been tested, and it is applicable, to the study of other organelles in 2D, 3D images or time series. Obtaining contact regions together with multiple cell and organelles parameters allow building descriptive statistics of the cells response. Moreover, its application in a large number of images enables the use of High Content Screening and Analysis, highly increasing the quality and statistical confidence of the results. The authors accepted most of the comments made in the first revision and submitted a new version of the tool with improvements in the code and performance. At this point, we consider that the article should be approved for indexing.

Data availability
The use of this type of image along with the combination of different analytical techniques and machine learning make this macro an interesting and novel work.
The authors clearly describe the workflow of the macro. I would like to highlight the effort that has been put into establishing a clear distinction between each part of it, which helps to monitor and check the results at all times. The figures shown are very clear and leave no room for doubt. Another strength of this work is that this macro has already been used to analyse the work done in a publication.
However, I want to comment on some minor aspects that could be subject to improvement: Note that the link in reference 11 is broken. Please replace with: https://imagej.nih.gov/ij/plugins/colocalization.html In the Implementation section, the macro configuration is clearly defined and the parameters that have been used in each step are well described. However, the type of machine learning algorithm used for the LD segmentation is missing.
In the Discussion section, it is mentioned that the study can be carried out for 3D images. Adding an example of this type in the test images file is recommended.
In this same section, the authors mention that this macro can be used to analyse a large number of images (High Content Screening and Analysis). For this type of analysis, it would be helpful that the option to check if the cells are well-segmented could be activated or deactivated. This way, it could be used to check some images and then run the macro over the entire experiment unsupervised.
The macro is fast, and its code is well commented, which makes it easy to read and understand.
Considering the different domains that a single type of image may have (such as changes in the intensity of the sample or noise), I suggest that the configuration parameters of the different methods become variables that are described at the beginning of the macro. Therefore, the macro gives the user the possibility, if needed, to quickly and easily change the parameters, avoiding changes within the code.
Similarly, in addition to converting the channels used each time into a variable, it is recommended to comment on the code and refer to the channels not only by their colour but also by what they contain, as sometimes the experts use different criteria for the colour that each channel represents.
As the macro progresses, the user can watch how several images are opened, which represent the intermediate steps. This intermediate image display slows down the macro, and it is suggested to use the "setBatchMode (true)" option whenever possible to avoid this effect.
In addition, it is observed that the intermediate images that have been generated in the different steps remain open until the final result is obtained. To improve the performance of the macro, it is recommended that they are automatically closed when they are no longer needed.
Regarding the use of GitHub to upload the macro, I recommend that the authors complete the README section, providing information on the installation of the macro, the requirements that are needed for the correct functioning of the macro, and a brief description of its use.
The macro gives a robust set of results, which offer the possibility of obtaining interesting relationships, as the authors have commented. However, I recommend adding the calculation of the standard deviation for both the mean of the perimeter of the LD and the mean of the length of the Contact. Since both means are already calculated, it is convenient to calculate the standard deviations for each one.
All this would improve and facilitate the use of this macro by others in a general, simple and clear way.

Is the rationale for developing the new software tool clearly explained? Yes
Is the description of the software tool technically sound? Yes

Is sufficient information provided to allow interpretation of the expected output datasets and any results generated using the tool? Yes
Are the conclusions about the tool and its performance adequately supported by the findings presented in the article? Yes The authors present ContactJ, an ImageJ macro, to identify and quantify contacts between lipid droplets (LD) and mitochondria. This type of analysis is usually performed using electron microscopy. The authors have found a way to carry out a similar study (taking into account the limitations of resolution) using confocal microscopy images. The use of this type of image along with the combination of different analytical techniques and machine learning make this macro an interesting and novel work. The authors clearly describe the workflow of the macro. I would like to highlight the effort that has been put into establishing a clear distinction between each part of it, which helps to monitor and check the results at all times. The figures shown are very clear and leave no room for doubt. Another strength of this work is that this macro has already been used to analyse the work done in a publication. However, I want to comment on some minor aspects that could be subject to improvement: Thank you for reviewing the article and pointing out the issues that would help to improve the presented work. We have tried to address all the suggestions and criticisms. 2) In the Implementation section, the macro configuration is clearly defined and the parameters that have been used in each step are well described. However, the type of machine learning algorithm used for the LD segmentation is missing.
In agreement with the referee, the information about the Machine Learning algorithms used for LD segmentation is provided and included in the manuscript (methods section). Changes in the manuscript: "LD segmentation was achieved through a Trainable Weka Segmentation classifier on LD channel image (see Figure 2b)) using the classification algorithm Fast Random Forest and the following Training features: Gaussian Blur, Hessian, Membrane projections, Sobel filtre, Difference of Gaussians. Mitochondria were segmented by intensity thresholding (autothreshold method "Otsu") 3) In the Discussion section, it is mentioned that the study can be carried out for 3D images. Adding an example of this type in the test images file is recommended.
As mentioned throughout the work, contact analysis with ContactJ can be adapted to any image type i.e. 3D images (xyz) or through time (xyt). However, the direct purpose of this macro is the analysis of hundreds of cells and multiple conditions from 2D images and therefore it has been optimized for this type of images.

4) In this same section, the authors mention that this macro can be used to analyse a large number of images (High Content Screening and Analysis). For this type of analysis, it would be helpful that the option to check if the cells are well-segmented could be activated or deactivated. This way, it could be used to check some images and then run the macro over the entire experiment unsupervised.
We agree that this option will be helpful for checking performance of the macro and it has been included at the GUI at the beginning of the macro.

5) The macro is fast, and its code is well commented, which makes it easy to read and understand. Considering the different domains that a single type of image may have (such as changes in the intensity of the sample or noise), I suggest that the configuration parameters of the different methods become variables that are described at the beginning of the macro. Therefore, the macro gives the user the possibility, if needed, to quickly and easily change the parameters, avoiding changes within the code. This option can be selected at GUI at the beginning of the macro.
As suggested by the referees, an initial GUI has been implemented to define the image dependent variables (thresholds, ratio…).

6) Similarly, in addition to converting the channels used each time into a variable, it is recommended to comment on the code and refer to the channels not only by their colour but also by what they contain, as sometimes the experts use different criteria for the colour that each channel represents.
We agree that referring to the channels by what they represent will be more self-explanatory.

7) As the macro progresses, the user can watch how several images are opened, which represent the intermediate steps. This intermediate image display slows down the macro, and it is suggested to use the "setBatchMode (true)" option whenever possible to avoid this effect.
We totally agree that setting the macro to Batch Mode will fasten its performance, therefore we have set it.

8) In addition, it is observed that the intermediate images that have been generated in the different steps remain open until the final result is obtained.
To improve the performance of the macro, it is recommended that they are automatically closed when they are no longer needed.
To improve the code's performance, now images are being closed when not necessary. 9) Regarding the use of GitHub to upload the macro, I recommend that the authors complete the README section, providing information on the installation of the macro, the requirements that are needed for the correct functioning of the macro, and a brief description of its use.
We have provided the requested information in the Readme section of GitHub.

10) The macro gives a robust set of results, which offer the possibility of obtaining interesting relationships, as the authors have commented. However, I recommend adding the calculation of the standard deviation for both the mean of the perimeter of the LD and the mean of the length of the Contact. Since both means are already calculated, it is convenient to calculate the standard deviations for each one. All this would improve and facilitate the use of this macro by others in a general, simple and clear way.
We totally agree that this data was missing and its inclusion improves the obtained information. A novel ImageJ macro script called ContactJ that allows for the automatic determination of contacts formed between lipid droplets (LD) and mitochondria in cells is presented. An interaction that is usually assessed by electron microscopy, involving a reduced number of biological events analyzed, is assessed in this work by the combination of fluorescence microscopy with automatic image analysis. This approach boosts the number of biological events analyzed. It turns the analysis more time-efficient by using colocalization methods combined with the segmentation of the LD, which extracts the contact region on the midplane of the LD that is in close proximity of mitochondria.
The limitation of using light microscopy to look at very small contacts is clearly stated. Nevertheless, the use of this imaging technique as an indicator of possible contact between different organelles is well accepted in the community. Light microscopy was already shown to provide more information about the contacts between LD and mitochondria due to the sample thickness that is bigger than the sample prepared for transmission electron microscopy.
ContactJ is presented as a well-established workflow. The authors combine tools previously developed in an exquisite way, such as the trainable Weka segmentation classifier and the colocalization plugin, with the conventional object segmentation. Figure 1 is very self-explanatory of the workflow followed by the macro script. Another positive aspect is the detailed output of the macro script that allows for a complex and quantitative analysis of the contacts established between the LD and mitochondria. The Operation section description is well written, and no problems were found while running the macro script; it is a very simple and straightforward process.
Despite the positive aspects mentioned above, there are fewer positive points that need to be checked: Regarding the strategy applied for the segmentation of the cells (page 3), most probably extra cell labeling could be used to facilitate this step. Usually, the staining of a cytoskeleton protein or the cell membrane staining is used to define the cells' boundary facilitating the cell segmentation step. The authors may consider such an approach in the sample preparation and imaging.
Not so thorough is the description of the code behind the workflow. The authors are sparse in describing the different steps that make up the workflow. Some of those steps are not even mentioned in the Implementation section of the manuscript, being only perceptible by reading or running the code line by line, which jeopardizes reproducibility. Likewise, the comments along the macro script are also sparse. A more detailed and extensive workflow description is needed, both in the manuscript and in the macro script. ImageJ good code practices suggest that you mention the ImageJ version and cite it in the associated publication.
The citation "channels from mitochondria and LD were intensity compensated" should be explained to be more explicit. The authors commented in the script (line 143) "calculate addition 0.2LD+0.2mitochondria", meaning that the intensity compensation was 20% of the original values. Is there a reason for assigning this value? Should it be considered as a variable dependent on the dataset?
In the Implementation section (page 4), it is stated that "the colocalized "contact" points between the mitochondria and LD 8-bit images (or stacks)". It is not clear if an 8-bit image is mandatory for determining the contact points or the number of channels that may compose the image. These details should be clearly stated. Additionally, as the reference to use a stack of images is made, the dataset available to test the macro script should contain this type of image.
The available dataset for testing the code is unfortunately diminished. Only two very similar images are available for testing the script. The dataset for testing this tool should be bigger and the images must represent a real, heterogeneous population of cells to test the proposed script's execution and performance.
Following the same lines, the script should be tested for quality and performance and presented in the manuscript. A previous publication shows the analysis of hundreds of HEK293 cells by the application of ContactJ. However, a comparison between the ContactJ results and another analysis method (such as manual quantification or using proprietary software) is not presented. Moreover, the usage of ContactJ to look at LD-mitochondria contacts in different cells (primary cells such as neurons, or other cell lines such as PC12 or CAD cells) could be included. Such validation is of extreme importance to show robustness and accuracy on the data obtained by the application of ContactJ.
Throughout the manuscript, the term database refers to the script output .txt file created upon the analysis (page 5). In our understanding, this terminology is incorrectly used since a database is a set of related tables. The authors can use the term table since the output is indeed a table.
Looking closer to the presented macro in ImageJ, some adjustments should be made. Along with the code, several hard-coded values are used, such as thresholding values and filter parameters. It is unclear how these values may be applied in different images or conditions. Maybe the authors should consider building a graphical user interface for prompting these parameters. Plus, there is no code error handling, not testing, for example, if the input is an 8-bit image with 3 channels. The algorithm premises that images are 8-bit depth, although this is not mentioned nor guaranteed along with the code.
There is likely an error in the option of removing cell ROIs (lines 180-190). When deleting the cells, the results table with cell measurements is not updated and the deleted ROIs are the last ones on the table and not the ones corresponding to the correct position in the image. This error affects the results obtained, so it should be corrected. Furthermore, the Resulting txt file needs to be truncated or deleted from the results folder. Otherwise, it will append the results of further analysis.
Running the ContactJ macro script takes some time (this should also be measured). The authors could improve the code performance by reducing the number of for-cycles and by closing the images while the code is running (not only at the end). Also, the analysis could be set in batch mode (true), showing only the images for quality control.
While ContactJ is being presented as a tool to look for contacts between LD and mitochondria, the translational application of this script is not obvious. It might strengthen the work if more broad applicability of the ContactJ is mentioned or, at least, speculated. We see the potential for the application of ContactJ on image analysis where interaction between different cell types (oligodendrocytes-neuron interaction, microglia-neuron interaction, yeast-macrophage interaction.), or between different cellular organelles is done. May the authors comment on these possible applications and add them to the Discussion section?
Is the rationale for developing the new software tool clearly explained? Yes

Is the description of the software tool technically sound? Yes
Are sufficient details of the code, methods and analysis (if applicable) provided to allow replication of the software development and its use by others?

Is sufficient information provided to allow interpretation of the expected output datasets and any results generated using the tool? Partly
Are the conclusions about the tool and its performance adequately supported by the findings presented in the article? Partly Competing Interests: No competing interests were disclosed.
Reviewer Expertise: Light microscopy image analysis specialist. Neuroscience.
We confirm that we have read this submission and believe that we have an appropriate level of expertise to confirm that it is of an acceptable scientific standard, however we have significant reservations, as outlined above.
Author Response 31 Dec 2021

A novel ImageJ macro script called ContactJ that allows for the automatic determination of contacts formed between lipid droplets (LD) and mitochondria in cells is
presented. An interaction that is usually assessed by electron microscopy, involving a reduced number of biological events analyzed, is assessed in this work by the combination of fluorescence microscopy with automatic image analysis. This approach boosts the number of biological events analyzed. It turns the analysis more time-efficient by using colocalization methods combined with the segmentation of the LD, which extracts the contact region on the midplane of the LD that is in close proximity of mitochondria.
The limitation of using light microscopy to look at very small contacts is clearly stated. Nevertheless, the use of this imaging technique as an indicator of possible contact between different organelles is well accepted in the community. Light microscopy was already shown to provide more information about the contacts between LD and mitochondria due to the sample thickness that is bigger than the sample prepared for transmission electron microscopy.
ContactJ is presented as a well-established workflow. The authors combine tools previously developed in an exquisite way, such as the trainable Weka segmentation classifier and the colocalization plugin, with the conventional object segmentation. Figure 1 is very self-explanatory of the workflow followed by the macro script. Another positive aspect is the detailed output of the macro script that allows for a complex and quantitative analysis of the contacts established between the LD and mitochondria. The Operation section description is well written, and no problems were found while running the macro script; it is a very simple and straightforward process.
Despite the positive aspects mentioned above, there are fewer positive points that need to be checked: Thank you for reviewing the article and pointing out the issues that would help to improve the presented work. We have tried to address all the suggestions and criticisms.

1) Regarding the strategy applied for the segmentation of the cells (page 3), most
probably extra cell labelling could be used to facilitate this step. Usually, the staining of a cytoskeleton protein or the cell membrane staining is used to define the cells' boundary facilitating the cell segmentation step. The authors may consider such an approach in the sample preparation and imaging.
The cell segmentation has been adapted to a specific sample and experimental conditions that didn't support any cell mask or cytoskeleton labelling. To clarify this point, we have added a comment in the methods section that whenever is possible it is recommended to add a fourth channel of cytoskeleton, membrane or cell labelling to facilitate the cell segmentation step.
Changes in the manuscript: "The present work has been adapted to the particular conditions of this experiment dataset where membrane or cell mask labelling couldn't be implemented. For this reason, a smart strategy for the cell segmentation has been used: the addition of the available cytoplasmic labellings (LD plus Mitochondria) and the Nucleus staining to define the cell region. Whenever it is possible, it is recommended to use a cell mask labelling to facilitate cell segmentation and individualization. In such case, the workflow for cell segmentation should be modified." 2) Not so thorough is the description of the code behind the workflow. The authors are sparse in describing the different steps that make up the workflow. Some of those steps are not even mentioned in the Implementation section of the manuscript, being only perceptible by reading or running the code line by line, which jeopardizes reproducibility. Likewise, the comments along the macro script are also sparse. A more detailed and extensive workflow description is needed, both in the manuscript and in the macro script. ImageJ good code practices suggest that you mention the ImageJ version and cite it in the associated publication.
We have added a more detailed and extensive workflow description and the ImageJ version both in the manuscript and in the macro script.
3) The citation "channels from mitochondria and LD were intensity compensated" should be explained to be more explicit.

4) In the Implementation section (page 4), it is stated that "the colocalized "contact" points between the mitochondria and LD 8-bit images (or stacks)". It is not clear if an 8-bit
image is mandatory for determining the contact points or the number of channels that may compose the image. These details should be clearly stated. Additionally, as the reference to use a stack of images is made, the dataset available to test the macro script should contain this type of image.
As suggested by the referees, a more detailed description of the input image requirements has been included in the manuscript and the macro script. To test the script performance and reproducibility, the dataset has been increased with more images representing a heterogeneous population of cells.

6) Following the same lines, the script should be tested for quality and performance and presented in the manuscript. A previous publication shows the analysis of hundreds of HEK293 cells by the application of ContactJ. However, a comparison between the ContactJ results and another analysis method (such as manual quantification or using proprietary software) is not presented. Moreover, the usage of ContactJ to look at LD-mitochondria contacts in different cells (primary cells such as neurons, or other cell lines such as PC12 or CAD cells) could be included. Such validation is of extreme importance to show robustness and accuracy on the data obtained by the application of ContactJ.
As suggested by the referee, a comparison between the ContactJ results and manual quantification has been performed. 8) Looking closer to the presented macro in ImageJ, some adjustments should be made. Along with the code, several hard-coded values are used, such as thresholding values and filter parameters. It is unclear how these values may be applied in different images or conditions. Maybe the authors should consider building a graphical user interface for prompting these parameters. Plus, there is no code error handling, not testing, for example, if the input is an 8-bit image with 3 channels. The algorithm premises that images are 8-bit depth, although this is not mentioned nor guaranteed along with the code.
An initial GUI has been implemented to define the dataset dependent parameters (thresholds, ratio…).
A more accurate description of the input image requirements has been included (bit depth, channels…) in the manuscript and the macro script. (lines 180-190). When deleting the cells, the results table with cell measurements is not updated and the deleted ROIs are the last ones on the table and not the ones corresponding to the correct position in the image. This error affects the results obtained, so it should be corrected. Furthermore, the Resulting txt file needs to be truncated or deleted from the results folder. Otherwise, it will append the results of further analysis.

9) There is likely an error in the option of removing cell ROIs
The reported error has been fixed and now the deleted ROIs results are properly removed from the generated results table.
10) Running the ContactJ macro script takes some time (this should also be measured). The authors could improve the code performance by reducing the number of for-cycles and by closing the images while the code is running (not only at the end). Also, the analysis could be set in batch mode (true), showing only the images for quality control.
The code has been reviewed to avoid redundant operations. Images now, are being closed when not necessary to improve the code's performance. In addition, the analysis has been set in batch mode.

11) While
ContactJ is being presented as a tool to look for contacts between LD and mitochondria, the translational application of this script is not obvious. It might strengthen the work if more broad applicability of the ContactJ is mentioned or, at least, speculated. We see the potential for the application of ContactJ on image analysis where interaction between different cell types (oligodendrocytes-neuron interaction, microglia-neuron interaction, yeast-macrophage interaction.), or between different cellular organelles is done. May the authors comment on these possible applications and add them to the Discussion section?
The translational application of ContactJ is clear in the context of the lipid droplets role because their interaction with other organelles are now recognized as key factors in physiological and disease processes. As suggested by the referees we have commented the translational aspect of the macro and its possible applications in the discussion.