Photogranulation-quantification
收藏NIAID Data Ecosystem2026-03-11 收录
下载链接:
https://zenodo.org/record/3938457
下载链接
链接失效反馈官方服务:
资源简介:
This repository contains scripts and associated files to quantify the production of oxygenic photogranules cultivated under static batch conditions. The files are grouped in three folders: (1) for the preparation of a marker image used for photogranule detection (“marker_image”), (2) for the detection and quantification of particle size on the experimental images of a time series (“experimental_images”) and (3) for converting the image data into equivalent diameters and plotting (“photogranulation_quantification”).
Note: Because of size limitations, we were unable to upload original experimental images acquired as uncompressed tagged image files (.tif) to GitHub. Instead, jpg files of the images were generated and are used for this demonstration. The use of jpg files leads to different results than the use of tif files.
Production of oxygenic photogranules (OPGs) is quantified by time-lapse imaging coupled to automated image analysis. OPGs are produced in statically incubated vials. A scanning image using a desktop scanner is taken periodically through the bottom of the incubation vials over time. During successful photogranulation, the sludge bed that initially covers the entire vial bottom contracts, i.e., reduces in diameter, until it forms a well-contracted OPG. The surface area of particles in the vial, i.e., the contracting biomass, are measured using the image processing software ImageJ, version 1.52a (Schneider et al., 2012) and the MorphoLibJ plugin, version 1.4.0 (Legland et al., 2016). These data are subsequently entered into the software environment R, version 3.6.0 (R Core Team, 2019) to plot the decrease in biomass diameter over experimental time using packages plyr version 1.8.4 (Wickham, 2011) and ggplot2 version 3.2.0 (Wickham, 2016).
(1) marker_image
The “marker_image” folder contains an ImageJ macro to generate a marker image from an image of the empty experimental setup (background_image.jpg). The marker image is used to remove the grid from the experimental images at (2) “experimental_images” and to identify measured particles from a vial at a specific physical location on each image at (3) “photogranulation_quantification”. The macro can be installed in ImageJ by clicking on ‘plugins’, ‘macros, ‘install’ and selecting the imagej_macro_marker_image.ijm. It can be run by clicking on ‘plugins’, ‘macros’, ‘imagej_macro_marker_image’. During execution of the macro, the output directory to save the created marker image and a background image (e.g., background_image.jpg) have to be manually selected. Thresholding has to be done manually (0,191 to obtain the same result files). The result files after successful execution of the macro should match the files marker_image.jpg, marker_overlay.jpg and results_marker.csv.
Note: the values in results_marker.csv does not match the values that will be entered into R in (3) “photogranulation_quantification”, because these were generated using the original background image in tif format.
(2) experimental_images
The ImageJ macro to treat the experimental time-lapse images can be found in the “experimental_images” folder. This macro measures particle characteristics on an image (in our experiments 72 particles for 72 vials, or one photogranule per vial) on a time-series of images (in our experiment a total of 110 images, acquired every eight hours over six weeks). Three experimental images (first, middle and last image) are presented here as an example to run a demo. The macro can be installed in ImageJ by clicking on ‘plugins’, ‘macros, ‘install’ and selecting the imagej_macro_experimental_images.ijm. It can be run by clicking on ‘plugins’, ‘macros’, ‘imagej_macro_experimental_images’. During execution of the macro, the input directory with raw images (e.g., scanner_image_1/2/3.jpg), output directory to save created images and a marker image (e.g., marker_image.jpg) have to be manually selected. Thresholding has to be done manually (0,140; 0,72; 0,71 for respectively 1, 2, 3 to obtain the same result files). The results from executing this macro should match the scanner_image_1/2/3_final.jpg and scanner_image_1/2/3_results.csv.
Note: the values in the result files do not match the values that will be entered into R in (3) “photogranulation_quantification”, because the latter were generated using the original background image in tif format.
(3) photogranulation_quantification
The “photogranulation_quantification” folder contains the R script to couple measured particle characteristics on experimental time-lapse images to unique samples and experimental conditions using the marker image. Subsequently, surface area of detected particles is converted to equivalent diameter and plotted over time. The plot plot_photogranulation_quantification.pdf can be reproduced by running the R script using results_marker.csv, results_scanner_images.csv, image_acquisition.txt and experimental_conditions.txt as input. The decrease in equivalent diameter per sample is a measure for the progression of photogranulation. Sludge 2 contracted better than sludge 1, resulting in a smaller average diameter. Biomass did not contract well in all 36 replicates per sludge source, hence the large standard deviations around the mean diameters. There is no data available between 354 and 472 hours due to a technical issue.
References
Legland, D.; Arganda-Carreras, I. and Andrey, P. (2016). MorphoLibJ: integrated library and plugins for mathematical morphology with ImageJ. Bioinformatics 32(22): 3532-3534.
R Core Team (2019). R: A language and environment for statistical computing. R Found. Stat Comput, Vienna, Austria.
Schneider, C.A., Rasband, W.S.andEliceiri, K.W (2012). ImageJ. Fundam Digit Imaging Med 9(7), 185–188.
Wickham, H. (2011). The Split-Apply-Combine Strategy for Data Analysis. J Stat Software 40(1), 1-29.
Wickham, H. (2016). ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York.
本仓库包含用于量化静态分批培养条件下培育的产氧光颗粒(oxygenic photogranules, OPGs)生成量的脚本及相关配套文件。所有文件分为三个文件夹:(1) 用于制备产氧光颗粒检测所需的标记图像("marker_image");(2) 用于对时间序列实验图像中的颗粒尺寸进行检测与量化("experimental_images");(3) 用于将图像数据转换为等效直径并绘图("photogranulation_quantification")。
注:由于存储空间限制,本仓库未能上传以未压缩标记图像文件格式(.tif)存储的原始实验图像至GitHub。本次演示仅使用了由原始图像转换生成的JPG格式图像,且使用JPG文件得到的结果与使用TIF文件存在差异。
产氧光颗粒(OPGs)的生成量通过延时成像结合自动化图像分析进行量化。OPGs在静态孵育的瓶中生成。实验过程中,会定期通过台式扫描仪从孵育瓶底部扫描获取图像。当光颗粒形成过程顺利进行时,初始铺满整个瓶底的污泥床会发生收缩,即直径减小,最终形成收缩良好的OPGs。本研究使用图像处理软件ImageJ 1.52a版本(Schneider等人,2012)及其MorphoLibJ插件1.4.0版本(Legland等人,2016),对瓶内颗粒(即收缩的生物质)的表面积进行测量。随后将所得数据导入R 3.6.0版本软件环境(R Core Team,2019),并借助plyr 1.8.4版本(Wickham,2011)与ggplot2 3.2.0版本(Wickham,2016)工具包,绘制实验周期内生物质直径的变化曲线。
(1) marker_image文件夹
"marker_image"文件夹包含一个ImageJ宏脚本,可通过空实验装置的背景图像(background_image.jpg)生成标记图像。该标记图像可用于:一是在(2)"experimental_images"步骤中去除实验图像中的网格;二是在(3)"photogranulation_quantification"步骤中,从每张图像的特定物理位置识别对应孵育瓶内的待测颗粒。
该宏脚本可通过ImageJ的"Plugins"→"Macros"→"Install"菜单安装,选择imagej_macro_marker_image.ijm文件即可;运行时则通过"Plugins"→"Macros"→"imagej_macro_marker_image"调用。脚本运行过程中,需手动选择用于保存生成的标记图像的输出目录,以及输入的背景图像(如background_image.jpg)。阈值设置需手动调整(若需得到与本仓库一致的结果文件,阈值应设为0,191)。脚本成功运行后,将生成marker_image.jpg、marker_overlay.jpg与results_marker.csv三个结果文件。
注:results_marker.csv中的数值与(3)"photogranulation_quantification"步骤中导入R的数据并不一致,因为后者是使用原始TIF格式的背景图像生成的。
(2) experimental_images文件夹
"experimental_images"文件夹包含用于处理实验延时图像的ImageJ宏脚本。该脚本可对单张图像(本研究中每个孵育瓶对应一个颗粒,共72个孵育瓶,即72个颗粒)的时间序列图像(本实验共采集110张图像,每8小时采集一次,持续6周)中的颗粒特征进行测量。本仓库仅提供3张实验图像(首张、中间与末张图像)作为示例用于运行演示。
该宏脚本的安装方式为:在ImageJ中依次点击"Plugins"→"Macros"→"Install",选择imagej_macro_experimental_images.ijm文件;运行时则通过"Plugins"→"Macros"→"imagej_macro_experimental_images"调用。脚本运行过程中,需手动选择包含原始图像的输入目录(如scanner_image_1/2/3.jpg)、用于保存处理后图像的输出目录,以及标记图像(如marker_image.jpg)。阈值设置需手动调整(若需得到与本仓库一致的结果文件,第1、2、3张图像的阈值应分别设为0,140;0,72;0,71)。脚本运行完成后,将生成scanner_image_1/2/3_final.jpg与scanner_image_1/2/3_results.csv两个结果文件。
注:本结果文件中的数值与(3)"photogranulation_quantification"步骤中导入R的数据并不一致,因为后者是使用原始TIF格式的背景图像生成的。
(3) photogranulation_quantification文件夹
"photogranulation_quantification"文件夹包含R脚本,可将实验延时图像中测得的颗粒特征与唯一样本及实验条件通过标记图像进行关联。随后将检测到的颗粒表面积转换为等效直径,并随时间绘制变化曲线。通过运行该R脚本,以results_marker.csv、results_scanner_images.csv、image_acquisition.txt与experimental_conditions.txt作为输入文件,即可复现plot_photogranulation_quantification.pdf绘图结果。
样本的等效直径随时间的减小量可作为光颗粒形成进程的衡量指标。污泥2的收缩效果优于污泥1,因此其平均直径更小。每个污泥来源的36个重复实验中,并非所有生物质都能顺利收缩,因此平均直径的标准差较大。由于技术故障,354至472小时之间的数据缺失。
参考文献
Legland, D., Arganda-Carreras, I. & Andrey, P. (2016). MorphoLibJ:集成于ImageJ的数学形态学库与插件. 《生物信息学》, 32(22): 3532-3534.
R Core Team (2019). R:统计计算语言与环境. 奥地利维也纳:R统计计算基金会.
Schneider, C.A., Rasband, W.S. & Eliceiri, K.W. (2012). ImageJ. 《数字成像基础医学》, 9(7): 185–188.
Wickham, H. (2011). 数据分析的拆分-应用-合并策略. 《统计软件期刊》, 40(1): 1-29.
Wickham, H. (2016). ggplot2:数据可视化优雅之道. 纽约:施普林格出版社.
创建时间:
2020-07-11



