Software

Summary


During our wet lab result analysis process, we encountered huge amount of data, and that's the point we found the necessity of high throughput software for the tedious repeat process for the data analysis.

Specifically, since we are synthesizing the iron oxide nanoparticles, we need to determine the size distribution of the nanoparticle to judge the quality of the condition for synthesis, to deal with large amount of data, we developed a software which could identify the nanoparticles in TEM result figure and generate the diameter distribution statictis of the nanoparticles.

And the other software is to help bunch analysis of the mean fluorescent intensity of confocal figures. Generally we only need to type in the folder address and the program would generate the excel file containing the mean fluorescent intensity result.

Note that both the software could be "fine-tuned" by user's own requirement for data analysis, and we also give a detailed guideline for customization of your own data analysis helper!


Nanoparticle Size Distribution Generator


We developed the Nanoparticle Size Distribution Counter software. This tool is designed to simplify and expedite the analysis of multiple types of photos like Transmission Electron Microscopy (TEM) graphs, microscopy graphs ect., enabling researchers to obtain accurate and comprehensive statistical information about particle size distributions within a given sample.

Description

Our software uses Electron as the frontend frame and Python as the backend language. Its mechanism is based on OpenCV, including image processing algorithms and statistical modeling techniques. The main code can be divided by 4 steps:

1. Extract a plotting scale from the scaled image (make sure the color is white).
2. Balance the image's lightness for more accurate recognition.
3. Apply algorithms for the image adjustment.
4. Draw the coutours of the nanoparticles and collect the diameters

It is important to note that the accuracy of the results depends on the quality of the input graph. Therefore, it is recommended to ensure high-resolution and well-defined images for optimal analysis. Additionally, users have the option to customize various parameters.

Furthermore, when the object is very large (just one in the image), we can accurately measure its diameter (the scale should be black though). This code is Diameter-Measurement.py, simple but useful. And you can just enter the folder's name, this program will automatically process every image and export the data to output.xlsx

Installation

Install npm download npm

Open cmd in the root dir:
npm install electron
npm install echart
npm run start
Relevant Doc: Building your First App

Packages for Python:
import cv2
import numpy
import os
import math
import matplotlib.pyplot
import sys

Usage

1. Take a TEM graph with a white plotting scale like the following one:
Sample TEM graph


2. After entering the app, you can choose the file's path and enter the min-radius, max-radius, scale and width of the distribution bars in the scale's unit. Then Click to process image!

input interface

3. Then the app will generate an image with nanoparticles contoured with green color and circled with red color.

Output

And it will generate a bar graph, providing users with a clear and intuitive visualization of the particle size distribution.

Output



Contributing

This code is open to contributions.

Authors and Acknowledgment

The inspiration of this script came from Shouyi HU, and Haotian SHEN brought it into codes.


High-throughput Cell Mean Fluorescent Processor


Background

Although our starting point was a quantitative analysis of antibodies bound to the cell, actually, the study of fluorescence intensity can also be used to quantify protein expression levels, examine changes in cellular processes, and compare signal intensities between different samples or experimental conditions. Our project involves validating antibody-cell connections in cell experiments by observing confocal fluorescence intensity. Considering that confocal analysis is a widely used technique in current research, and standardization of confocal data image processing often involves repetitive selection steps to calculate average fluorescence intensity.

Introduction

We have developed a script specifically designed for high-throughput analysis of confocal image fluorescence intensity, inspired by the tedious data processing in wet lab experiments. This script provides the high throughput processing of TIF images using macro language in Fiji. With our program, we can directly perform automatic normalization and statistical analysis of fluorescence intensity for all images in a given folder, significantly reducing repetitive workload and streamlining the process. Actually, you can change the core codes with different functions in this high-throughput frame.

Startup

1. Download Fiji via https://imagej.net/software/fiji/downloads.
2. Open Process_Folder.ijm in the Fiji app and click the "run" button at the bottom of the window.
3. Choose the input directory containing the images and the output directory for the resulting data, which would be an Excel file.

Code Procedure

1. This code block is used for the input interface.

                  
  #@ File (label = "Input directory", style = "directory") input
  #@ File (label = "Output directory", style = "directory") output
  #@ String (label = "File suffix", value = ".tif") suffix
  #@ String (label = "Keyword", value = "keyword") keyword
                  
                


Output



2. After initialization, we will first start file processing, that is, finding every file in the specific folder (having subfolders) with the correct suffix and keyword.
                
  // Initialize a counter for processed files
  n = 0;
  // Start processing the input folder
  processFolder(input);

  // Function to scan folders/subfolders/files to find files with the correct suffix and keyword
  function processFolder(input) {
      // Get a list of files in the input directory
      list = getFileList(input);
      // Iterate through the list of files
      for (i = 0; i < list.length; i++) {
          // Check if the current item is a directory
          if (File.isDirectory(input + File.separator + list[i]))
              // Recursively process subfolders
              processFolder(input + File.separator + list[i]);
          else if (endsWith(list[i], suffix) && (indexOf(list[i], keyword) >= 0)) {
              // If the file has the correct suffix and contains the keyword, process it
              processFile(input, output, list[i], n);
              // Increment the counter
              n = n + 1;
          }
      }
  }
                  
              


3. Now we can just process every single image and measure their Mean Fluorescence Intensity! (Of course, you can DIY everything just using the recorder in ImageJ.)
                
  function processFile(input, output, file, index) {

    print("Processing: " + input + File.separator + file);
    print("Saving to: " + output);
    open(input + File.separator + file);
    // You can simply copy the commands from the recorder to replace the following code
    run("32-bit");
    close("");
    setAutoThreshold("Default dark no-reset");
    //run("Threshold...");
    run("Set Measurements...", "display area mean standard modal min integrated limit redirect=None decimal=3");
    run("Measure");
    setResult("File Name", index, file);
    saveAs("Results", output + File.separator + "Results.xls");
    close("*");
  }
                
              


4. Methods of DIY

Firstly, you should open the recorder to see what you will do in the form of Macro.

Output



- Remember to choose Macro language.

Output



- Now you can perform your measurement and every step will be recorded!

Contributing

This code is open to contributions.

Authors and Acknowledgment

The inspiration of this script came from Shouyi HU and Yixiao XIAO, and Haotian SHEN brought it into codes.