{"id":925,"date":"2023-06-15T09:57:11","date_gmt":"2023-06-15T07:57:11","guid":{"rendered":"https:\/\/paul-regnier.fr\/?page_id=925"},"modified":"2026-04-14T11:35:18","modified_gmt":"2026-04-14T09:35:18","slug":"tutoriel-pupaid","status":"publish","type":"page","link":"https:\/\/paul-regnier.fr\/en_gb\/tutoriel-pupaid\/","title":{"rendered":"PUPAID tutorial"},"content":{"rendered":"<p class=\"has-background wp-block-paragraph\" style=\"background-color:#c6cbe1;font-size:16px\"><strong>Warning: this tutorial is only available in English, even if you choose the French language at the bottom of the screen. Thank you for your understanding.<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-center has-black-color has-text-color has-large-font-size wp-block-paragraph\"><strong>PUPAID: Pipeline for Unleashed Processing and Analysis of Immunofluorescence Data<\/strong><\/p>\n\n\n\n<p class=\"has-black-color has-text-color wp-block-paragraph\" style=\"font-size:16px\"><code>PUPAID<\/code> is a R + ImageJ package allowing to process immunofluorescence data and perform unsupervised analysis on it using a single cell contouring approach.<\/p>\n\n\n<div class=\"wp-block-image is-resized is-style-default\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a3aeb4d4a2b3&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a3aeb4d4a2b3\" class=\"aligncenter size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" src=\"https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/06\/craiyon_164516_a_proud_puppy_holding_a_colorful_prism_in_his_mouth.png\" alt=\"\" class=\"wp-image-958\" style=\"width:484px\" srcset=\"https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/06\/craiyon_164516_a_proud_puppy_holding_a_colorful_prism_in_his_mouth.png 1024w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/06\/craiyon_164516_a_proud_puppy_holding_a_colorful_prism_in_his_mouth-300x300.png 300w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/06\/craiyon_164516_a_proud_puppy_holding_a_colorful_prism_in_his_mouth-150x150.png 150w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/06\/craiyon_164516_a_proud_puppy_holding_a_colorful_prism_in_his_mouth-768x768.png 768w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/06\/craiyon_164516_a_proud_puppy_holding_a_colorful_prism_in_his_mouth-12x12.png 12w\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\"><strong>An AI-generated visual representation of what <code>PUPAID<\/code> could be in real life. Drawn by Craiyon.<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:28px\"><strong>Table of contents<\/strong><\/h2>\n\n\n\n<ol style=\"font-size:24px\" class=\"wp-block-list\">\n<li><a href=\"#1\" data-type=\"internal\">Prerequisites<\/a>\n<ol style=\"font-size:18px\" class=\"wp-block-list\">\n<li><a href=\"#1.1\">R environment introduction and installation<\/a><\/li>\n\n\n\n<li><a href=\"#1.2\">PUPAID R package installation<\/a><\/li>\n\n\n\n<li><a href=\"#1.3\" data-type=\"internal\" data-id=\"#1.2\">Load PUPAID<\/a><\/li>\n\n\n\n<li><a href=\"#1.4\">Update PUPAID<\/a><\/li>\n\n\n\n<li><a href=\"#1.5\">R Shiny interactive application<\/a><\/li>\n\n\n\n<li><a href=\"#1.6\">Example dataset<\/a><\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><a href=\"#2\">Workspace directory setup<\/a><\/li>\n\n\n\n<li><a href=\"#3\">Pre-process data (optional)<\/a>\n<ol style=\"font-size:18px\" class=\"wp-block-list\">\n<li><a href=\"#3.1\">Generate a black tile<\/a><\/li>\n\n\n\n<li><a href=\"#3.2\">Get the tile image size<\/a><\/li>\n\n\n\n<li><a href=\"#3.3\">Rename and order tiles<\/a><\/li>\n\n\n\n<li><a href=\"#3.4\">Stitch tiles<\/a><\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><a href=\"#4\">Analysis<\/a>\n<ol style=\"font-size:18px\" class=\"wp-block-list\">\n<li><a href=\"#4.1\">Establish \u03c3 pairs to test<\/a><\/li>\n\n\n\n<li><a href=\"#4.2\">Benchmark \u03c3 pairs<\/a><\/li>\n\n\n\n<li><a href=\"#4.3\">ROI analysis<\/a><\/li>\n\n\n\n<li><a href=\"#4.4\">Transform TSV to XLSX<\/a><\/li>\n\n\n\n<li><a href=\"#4.5\">Transform TSV to FCS<\/a><\/li>\n\n\n\n<li><a href=\"#4.6\">Visual analysis through conventional cytometry software<\/a><\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><a href=\"#5\">Citation<\/a><\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"1\" style=\"font-size:28px\"><strong>1) Prerequisites<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1.1\" style=\"font-size:22px\"><strong>1.1) R environment introduction and installation<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">To make the installation of R programming language and RStudio development software easier for new or beginner users, we highly recommend the following ressource, entitled <a href=\"https:\/\/bookdown.org\/ndphillips\/YaRrr\/\">\u00ab\u00a0YaRrr! The Pirate&rsquo;s Guide to R\u00a0\u00bb<\/a>. New users should at least read the first (\u00ab\u00a0Preface\u00a0\u00bb) and second (\u00ab\u00a0Getting Started\u00a0\u00bb) sections, as they provide clear and straightforward instructions on how to setup R and RStudio on Windows and MacOS operating systems. These sections will allow users to correctly install <code>PUPAID<\/code> and launch it flawlessly.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1.2\" style=\"font-size:22px\"><strong>1.2) PUPAID R package installation<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\"><code>PUPAID<\/code> package can be installed with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:16px\"><code><em># The following line can be skipped if the devtools package is already installed\n<\/em>\n<strong>install.packages(<\/strong>\"devtools\"<strong>)<\/strong>\n\n<em># Load the devtools package\n<\/em>\n<strong>library(<\/strong>\"devtools\"<strong>)<\/strong>\n\n<em># Install PUPAID from GitHub repository\n<\/em>\n<strong>devtools::install_github(<\/strong>\"PaulRegnier\/PUPAID\"<strong>)<\/strong><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1.3\" style=\"font-size:22px\"><strong>1.3) Load PUPAID<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">To load <code>PUPAID<\/code>, simply enter the following command in the R console:<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-color has-text-color\" style=\"font-size:16px\"><code><strong>library(<\/strong>\"PUPAID\"<strong>)<\/strong><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1.4\" style=\"font-size:22px\"><strong>1.4) Update PUPAID<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">To update&nbsp;<code>PUPAID<\/code>, simply enter the following command in the R console:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:16px\"><code><code><strong>devtools::install_github(<\/strong>\"PaulRegnier\/PUPAID\", force = TRUE<strong>)<\/strong><\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1.5\" style=\"font-size:22px\"><strong>1.5) R Shiny interactive application<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">If one is not very familiar with programming and\/or the R environment, <code>PUPAID<\/code> also provides an interactive application which uses the R <code>shiny<\/code> package. Once the package is installed (see previous section), users can launch the Shiny application with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:16px\"><code><strong>PUPAID::interactivePUPAID()<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">The process of launching <code>PUPAID<\/code>&lsquo;s interactive R Shiny application within RStudio can be visualized in the video below:<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"1392\" style=\"aspect-ratio: 2560 \/ 1392;\" width=\"2560\" controls src=\"https:\/\/paul-regnier.fr\/wp-content\/uploads\/2024\/04\/HowToLaunchPUPAIDInteractiveApplication.mp4\"><\/video><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">This facultative application totally replaces the successive R command which are detailed below, and helps users to keep the general <code>PUPAID<\/code>&lsquo;s workflow in mind during the processing and analysis steps. If desired, users can still use the traditionnal R commands, as the Shiny application is only a graphical way to launch the functions\/scripts of interest within the R console.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">From here, the rest of the workflow is pretty straightforward, as users only have to read and follow the steps indicated in the R Shiny window.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1.6\" style=\"font-size:22px\"><strong>1.6) Example dataset<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">For learning and test purposes, <code>PUPAID<\/code> includes a dataset composed of 17 tiles (TIFF format) which contain demultiplexed signals of an 8-plex immunofluorescence staining performed using Opal technology from Akoya Biosciences, following their standard staining protocol. The staining was performed on a 5\u00b5m thick slide coming from FFPE-embedded salivary gland biopsy taken from a patient with Sj\u00f6gren&rsquo;s syndrome, and acquired with a Vectra Polaris scanner.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">You can download these TIFF tiles as a single zip archive <a href=\"https:\/\/paul-regnier.fr\/pupaid\/AC_17C04037_ROI-1_raw.zip\">here<\/a><strong> <\/strong>(warning: the archive is about 1.16GB).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">The staining panel (primarily designed to target and study the whole B and T cells compartments as well as several other features) was constructed as following:<\/p>\n\n\n\n<ul style=\"font-size:16px\" class=\"wp-block-list\">\n<li>DAPI<\/li>\n\n\n\n<li>Anti-IL-21 (revealed with Opal 480)<\/li>\n\n\n\n<li>Anti-CD21 (revealed with Opal 520)<\/li>\n\n\n\n<li>Anti-TNF\u03b1 (revealed with Opal 540)<\/li>\n\n\n\n<li>Anti-CD4 (revealed with Opal 570)<\/li>\n\n\n\n<li>Anti-IFN\u03b3 (revealed with Opal 620)<\/li>\n\n\n\n<li>Anti-CD27 (revealed with Opal 650)<\/li>\n\n\n\n<li>Anti-CD20 (revealed with Opal 690)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">After acquisition, each of the generated tiles was demultiplexed using the InForm software coming with the Vectra Polaris acquisition software.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"2\" style=\"font-size:28px\"><strong>2) Workspace directory setup<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\"><code>PUPAID<\/code> is designed to work in a self-organized set of directories, which can be created in the <code>wd<\/code> directory by running the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-color has-text-color\" style=\"font-size:16px\"><code>wd = <strong>file.path(<\/strong>\"YOUR PATH HERE\"<strong>)<\/strong>\n<strong>setwd(<\/strong>wd<strong>)<\/strong>\n\n<strong>PUPAID::createWorkspaceStructure(<\/strong>wd = wd<strong>)<\/strong>\n\nimageJPath = <strong>file.path(<\/strong>\"YOUR ImageJ PATH HERE\"<strong>)<\/strong>\n<\/code><\/pre>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#c6cbe1;font-size:16px\"><strong>Please note that some functions of this workflow below need R to launch a macro script within ImageJ. In this fashion, all the generated macro codes throughout this workflow will be stored in the <code>macros<\/code> directory.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"3\" style=\"font-size:28px\"><strong>3) Pre-process data (optional)<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">In the case your data are in the form of contiguous and independent tiles, <code>PUPAID<\/code> allows to automatically rename and order them according to their ROI of origin, as well as stitch them into a single ROI. This is typically needed with data acquired using Vectra Polaris scanner, for instance.<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#c6cbe1;font-size:16px\"><strong>Please note that for the code in this part to work, all the tiles should have the same dimensions, both in width and height.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">In the case your data are in the form of full ROI containing the whole tissue or region you want to analyze, you can skip the section 3) and directly go to the section 4).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3.1\" style=\"font-size:22px\"><strong>3.1) Generate a black tile<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">When data are acquired under the form of tiles, it is common to have regions that are not scanned (to limit as much as possible the acquisition time), thus leading to \u00ab\u00a0holes\u00a0\u00bb in the desired ROI, especially on the edges. To overcome this, <code>PUPAID<\/code> allows to generate a black tile (that is to say, devoid of any signal within each aquired channel) from an input tile located in the <code>1_generateBlackTile &gt; input<\/code> directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:16px\"><code><strong>PUPAID::runMacro_generateBlackTile(<\/strong>imageJPath = imageJPath, wd = wd<strong>)<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">Concretely, R will call ImageJ executable and launch in command line mode a macro already written for this purpose. The output black tile will be located in the <code>1_generateBlackTile &gt; output<\/code> directory.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3.2\" style=\"font-size:22px\"><strong>3.2) Get the tile image size<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">Then, we need to extract the width and height (in \u00b5m) of a given tile:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:16px\"><code>imageSize = <strong>PUPAID::runMacro_getImageSize(<\/strong>imageJPath = imageJPath, wd = wd<strong>)<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">These information will be necessary for the upcoming step.<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#c6cbe1;font-size:16px\"><strong>Please note that this function will open the first tile it detects in the <code>1_generateBlackTile &gt; output<\/code> directory.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3.3\" style=\"font-size:22px\"><strong>3.3) Rename and order tiles<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">Afterwards, one wants to automatically rename and order tiles to reconstitute their ROI of origin and prepare them for the future stitching:<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-color has-text-color\" style=\"font-size:16px\"><code>renameAndOrderOutput = <strong>PUPAID::renameAndOrderTiles(<\/strong>AOI_x = imageSize&#91;1], AOI_y = imageSize&#91;2]<strong>)<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">The input tiles should be located in <code>2_renameAndOrderTiles &gt; input<\/code> directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">This function will output renamed tiles, ordered by their ROI of origin (if applicable) in separate folders within the <code>2_renameAndOrderTiles &gt; output<\/code> directory.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3.4\" style=\"font-size:22px\"><strong>3.4) Stitch tiles<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">Finally, <code>PUPAID<\/code> allows to stitch the renamed tiles together in order to generate full ROI embedded in a single image file:<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-color has-text-color\" style=\"font-size:16px\"><code><strong>PUPAID::stitchTiles(<\/strong>renameAndOrderOutput = renameAndOrderOutput, imageJPath = imageJPath, wd = wd<strong>)<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">This function will stitch every tile present in the <code>2_renameAndOrderTiles &gt; output<\/code> directory and subdirectories. Concretely, R will call ImageJ executable and launch in command line mode a macro already written for this purpose. The final stitched images will then be located in the <code>3_stitchedTiles<\/code> directory, as well as several other files: one text file per ROI regarding the tile configuration used by ImageJ for the actual stitching, and one global <code>rds<\/code> file named <code>renameAndOrderOutput.rds<\/code> containing the ROI information determined in the previous step.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"4\" style=\"font-size:28px\"><strong>4) Analysis<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">When your data are fully pre-processed (or if they do not need any pre-processing), <code>PUPAID<\/code> allows to analyze your ROI using a dedicated ImageJ macro.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4.1\" style=\"font-size:22px\"><strong>4.1) Establish <strong>\u03c3<\/strong><\/strong> <strong>pairs to test <\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">As <code>PUPAID<\/code> mainly bases its analysis on the Difference of Gaussians methodology for cell contour identification, one wants first to determine which pair of <code>\u03c3<\/code> values could work best with the currently analyzed data (signal, tissue, etc.). To this, users can use the <code>generateSigmaPairsList()<\/code> function which will compute an approximative value for <code>sigmaLow<\/code> using an estimated overall diameter for the nuclei. Users only have to open their image of interest (or at least a cropped version of it) and to directly measure some nuclei in order to estimate an overall nuclei diameter (in \u00b5m).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">This value will then be used as the <code>radius<\/code> parameter of the <code>generateSigmaPairsList()<\/code> function:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:16px\"><code><em># Here, the 'radius' value is given as an example and should rather be determined by users<\/em>\n<em>\n<\/em>sigmaPairsToTest = <strong>PUPAID::generateSigmaPairsList(<\/strong>\n    radius = 7.5,\n    maxSigmaRatio = 2,\n    step = 0.1\n<strong>)<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">Concretely, the <code>step<\/code> parameter will be iteratively added to <code>1<\/code> (excluded) until the <code>maxSigmaRatio<\/code> limit is reached. In the example case above, the function will estimate the <code>sigmaLow<\/code> value to <code>2.13<\/code> (because of the <code>radius<\/code> set to 7.5), then will generate the following multiplicators: <code>c(1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0)<\/code> and multiply them with the pre-determined <code>sigmaLow<\/code> value, thus leading to the following <code>sigmaHigh<\/code> values: <code>c(2.343, 2.556, 2.769, 2.982, 3.195, 3.408, 3.621, 3.834, 4.047, 4.26)<\/code>. Ultimately, the function will return the following list of \u03c3 pairs to test:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:16px\"><code>&#91;&#91;1]]\n&#91;1] 2.130 2.343\n\n&#91;&#91;2]]\n&#91;1] 2.130 2.556\n\n&#91;&#91;3]]\n&#91;1] 2.130 2.769\n\n&#91;&#91;4]]\n&#91;1] 2.130 2.982\n\n&#91;&#91;5]]\n&#91;1] 2.130 3.195\n\n&#91;&#91;6]]\n&#91;1] 2.130 3.408\n\n&#91;&#91;7]]\n&#91;1] 2.130 3.621\n\n&#91;&#91;8]]\n&#91;1] 2.130 3.834\n\n&#91;&#91;9]]\n&#91;1] 2.130 4.047\n\n&#91;&#91;10]]\n&#91;1] 2.13 4.26<\/code><\/pre>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#c6cbe1;font-size:16px\"><strong>Of note, users are still free to choose any \u03c3 pair they want\/prefer for the upcoming analysis. To this, they just have to bypass the <code>generateSigmaPairsList() <\/code>function and directly generate a list of vectors of size 2 using the built-in R function <code>list()<\/code>.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4.2\" style=\"font-size:22px\"><strong>4.2) Benchmark \u03c3<\/strong> <strong>pairs<\/strong> <\/h3>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">Now, one wants to use the freshly generated <code>sigmaPairsToTest<\/code> list for the actual benchmarking of these \u03c3 pairs:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:16px\"><code><strong>PUPAID::benchmarkSigmaPairs(<\/strong>imageJPath = imageJPath, wd = wd, sigmaPairsToTest = sigmaPairsToTest<strong>)<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">This function takes a given image of interest located in the <code>4_testSigmaPair &gt; input<\/code> directory and outputs the resulting images in the <code>4_testSigmaPair &gt; output<\/code> directory.<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#c6cbe1;font-size:16px\"><strong>Please note that the image given as input of this function should only have one channel (typically the one that should be used for cell segmentation). This can be easily achieved within ImageJ by converting the stack to images, then only saving as TIFF the channel to use for cell contour identification (typically DAPI). The final result is shown on the Figure 1 below.<\/strong><\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#c6cbe1;font-size:16px\"><strong>To speed up the computation process, we recommand you to give to this function a cropped image which typically focuses on a densely infiltrated region of the tissue, or at least on a more or less representative section of the tissue. The Figure 2 and Figure 3 below show what can be expected before and after such cropping.<\/strong> <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a3aeb4d4d480&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a3aeb4d4d480\" class=\"aligncenter size-full is-resized wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1058\" height=\"1645\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" sizes=\"auto, (max-width: 1058px) 100vw, 1058px\" src=\"https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_noCrop.png\" alt=\"\" class=\"wp-image-1421\" style=\"width:768px\" srcset=\"https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_noCrop.png 1058w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_noCrop-193x300.png 193w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_noCrop-659x1024.png 659w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_noCrop-768x1194.png 768w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_noCrop-988x1536.png 988w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_noCrop-8x12.png 8w\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\"><strong>Figure 1 &#8211; DAPI only layer extracted from the stitched tile.<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a3aeb4d4dc2d&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a3aeb4d4dc2d\" class=\"aligncenter size-full is-resized wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1055\" height=\"1642\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" sizes=\"auto, (max-width: 1055px) 100vw, 1055px\" src=\"https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_noCrop_withROI.png\" alt=\"\" class=\"wp-image-1422\" style=\"width:768px\" srcset=\"https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_noCrop_withROI.png 1055w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_noCrop_withROI-193x300.png 193w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_noCrop_withROI-658x1024.png 658w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_noCrop_withROI-768x1195.png 768w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_noCrop_withROI-987x1536.png 987w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_noCrop_withROI-8x12.png 8w\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\"><strong>Figure 2 &#8211; <strong> DAPI only layer extracted from the stitched tile<\/strong> with a desired ROI for cropping.<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a3aeb4d4e7e6&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a3aeb4d4e7e6\" class=\"aligncenter size-full is-resized wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1427\" height=\"1474\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" sizes=\"auto, (max-width: 1427px) 100vw, 1427px\" src=\"https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_crop.png\" alt=\"\" class=\"wp-image-1423\" style=\"width:768px\" srcset=\"https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_crop.png 1427w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_crop-290x300.png 290w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_crop-991x1024.png 991w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_crop-768x793.png 768w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/PUPAID_tutoriel_fullDAPI_crop-12x12.png 12w\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\"><strong>Figure 3 &#8211; Cropped version of the DAPI only layer extracted from the stitched image.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">This function produces for each given pair of <code>\u03c3<\/code> values an image on which cell contours were determined using the same method as the real analysis performed in the next step. The function also outputs an ImageJ-formatted zip file containing all the segmented cell contours. The <strong>Figure 4<\/strong> below summarizes all the output images produced with the previous code.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a3aeb4d4fb5f&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a3aeb4d4fb5f\" class=\"aligncenter size-full is-resized wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"3875\" height=\"3892\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" sizes=\"auto, (max-width: 3875px) 100vw, 3875px\" src=\"https:\/\/paul-regnier.fr\/wp-content\/uploads\/2024\/02\/Figure_tutoriel_sigmaPairs_new.png\" alt=\"\" class=\"wp-image-1521\" style=\"width:768px\" srcset=\"https:\/\/paul-regnier.fr\/wp-content\/uploads\/2024\/02\/Figure_tutoriel_sigmaPairs_new.png 3875w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2024\/02\/Figure_tutoriel_sigmaPairs_new-300x300.png 300w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2024\/02\/Figure_tutoriel_sigmaPairs_new-1020x1024.png 1020w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2024\/02\/Figure_tutoriel_sigmaPairs_new-150x150.png 150w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2024\/02\/Figure_tutoriel_sigmaPairs_new-768x771.png 768w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2024\/02\/Figure_tutoriel_sigmaPairs_new-1529x1536.png 1529w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2024\/02\/Figure_tutoriel_sigmaPairs_new-2039x2048.png 2039w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2024\/02\/Figure_tutoriel_sigmaPairs_new-12x12.png 12w\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n\n\n<p class=\"has-black-color has-text-color has-link-color wp-elements-c318d3b1302d284f5dd27b2627511a0f wp-block-paragraph\" style=\"font-size:16px\"><strong>Figure 4 &#8211; Overview of the determination of cell contours using different pairs of <code>\u03c3<\/code> values.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4.3\" style=\"font-size:22px\"><strong>4.3) ROI analysis<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">When the best pair of <code>\u03c3<\/code> values is empirically determined, one can proceed to the actual analysis on the full ROI containing all the desired channels:<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-color has-text-color\" style=\"font-size:16px\"><code><em># With this test dataset, it seems that sigmaLow = 2.13 and sigmaHigh = 2.982 values <em>(making a ratio of 1:1.4)<\/em> best determine cell contours<\/em>\n\nblockSize = 30\nhistogramBins = 256\nmaximumSlope = 3\nsigmaLow = 2.13\nsigmaHigh = 2.982\n\n<strong>PUPAID::runMacro_analyzeROI(<\/strong>\n    imageJPath = imageJPath,\n    wd = wd,\n    blockSize = blockSize,\n    histogramBins = histogramBins,\n    maximumSlope = maximumSlope,\n    sigmaLow = sigmaLow,\n    sigmaHigh = sigmaHigh\n<strong>)<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">Basically, the final ImageJ analysis will take a given ROI located in the <code>5_analyzeROI &gt; input<\/code> directory and outputs the results in the <code>5_analyzeROI &gt; output<\/code> directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">Regarding <code>blockSize<\/code>, <code>histogramBins<\/code>, and <code>maximumSlope<\/code> parameters, which are used by the CLAHE (Contrast Limited Adaptive Histogram Equalization) algorithm, the provided default values (<code>blockSize = 30<\/code>, <code>histogramBins = 256<\/code>, and <code>maximumSlope = 3<\/code>) should normally fit to most datasets. However, users can still change them if they know what they do. According to <a href=\"https:\/\/imagej.net\/plugins\/clahe\">this page<\/a>, the block size should be larger than the size of the features to be preserved, the number of histogram bins should not be greater than <code>256<\/code> and the maximum slope should not be too high but greater than <code>1<\/code>.<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#c6cbe1;font-size:16px\"><strong>Please note that because of some technical limitations, the macro itself (and thus the actual analysis of the image) cannot be launched directly within R. Instead, the <code>runMacro_analyzeROI()<\/code> function will only generate a ready-to-use macro which is launchable under ImageJ. Once the <code>runMacro_analyzeROI()<\/code> function has been executed, <strong>users should launch a fresh instance of ImageJ, then run <code>Plugins &gt; Macros &gt; Run...<\/code> within ImageJ and launch the edited macro of interest named <code>5_analyzeROI_run.txt<\/code> and located in the <code>macros<\/code> directory<\/strong><\/strong>.<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#c6cbe1;font-size:16px\"><strong>Please note that this function can only process one ROI at a time, so you need to move the results at the end of each analysis before proceeding with a new one.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">Simply follow the instructions as they are given during the execution of the macro.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">Although the computations are fully automatized, the macro still needs the user input at several points:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li style=\"font-size:16px\">To rename each channel with a precise format: <code>MarkerName_FluorophoreOrColor_ImageJChannel<\/code>\n<ul class=\"wp-block-list\">\n<li style=\"font-size:16px\">As a reminder, ImageJ uses this nomenclature to identify the channels: <code>c1 = red<\/code>, <code>c2 = green<\/code>, <code>c3 = blue<\/code>, <code>c4 = gray<\/code>, <code>c5 = cyan<\/code>, <code>c6 = magenta<\/code>, <code>c7 = yellow<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li style=\"font-size:16px\">To choose the channel that will be used for cell contour identification<\/li>\n\n\n\n<li style=\"font-size:16px\">To draw an additional ROI which contains background noise (for the Corrected Total Cell Fluorescence computation)<\/li>\n\n\n\n<li style=\"font-size:16px\">To measure by any mean of choice the global tissue area (for estimation of cell counts per unit of area)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">At the end, the macro will generate:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li style=\"font-size:16px\">Images with background-corrected and enhanced signals: 1 single TIFF file per available channel (whatever the provided image to analyze), as well as both composite and merged TIFF versions of the processed signals (only if there are between 1 and 7 channels included)<\/li>\n\n\n\n<li style=\"font-size:16px\">TSV files (one per measured channel) where lines represent identified cells and columns show several features such as the fluorescence for the given channel (both MFI, integrated density and CTCF), area, coordinates of the centroid point and estimators of circularity and roundness, etc.<\/li>\n\n\n\n<li style=\"font-size:16px\">A single zip file containing the ROI for each identified cell (for control and reproducibility purposes)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4.4\" style=\"font-size:22px\"><strong>4.4) Transform TSV to XLSX<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">When the analysis has ended, all the ImageJ windows should automatically close. Here, one could desire to convert the freshly generated TSV files into XLSX files in order to be openable by Excel. This could be achieved with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:16px\"><code><strong>PUPAID::convertTSVtoXLSX()<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">Each TSV file will be converted into new XLSX files (and saved into the same directory), without erasing the original TSV files.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4.5\" style=\"font-size:22px\"><strong>4.5) Transform TSV to FCS<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">Additionally, one wants to convert the freshly generated TSV files into a single FCS file:<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-color has-text-color\" style=\"font-size:16px\"><code><strong>PUPAID::mergeTSVtoFCS()<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">This function takes all the TSV files found in the <code>5_analyzeROI &gt; output<\/code> directory and merges them into a single FCS file located in the same folder. This FCS file is ready to be imported and analyzed in any standard flow cytometry analysis softwares, such as FlowJo or Kaluza. This approach allows the user to spatially gate on cells of interest and directly look at the markers they express. Users can also use dedicated processing and analysis pipelines which handle FCS files, such as <a href=\"https:\/\/pubmed.ncbi.nlm.nih.gov\/38089110\/\"><code>PICAFlow<\/code><\/a>, <a href=\"https:\/\/pubmed.ncbi.nlm.nih.gov\/27662185\/\"><code>cytofkit<\/code><\/a> or <a href=\"https:\/\/pubmed.ncbi.nlm.nih.gov\/28663787\/\"><code>CyTOF<\/code><\/a> for instance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">At the end at this process, we invite users to move the results of the current analysis into another folder, especially if they have other ROI to analyze, as the analysis macro will overwrite anything stored in the <code>5_analyzeROI &gt; output<\/code> directory.<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#c6cbe1;font-size:16px\"><strong>Of note, steps 4.2) through 4.4) (included) could be directly reperformed on another image of interest.<\/strong><strong> <\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"4.6\" style=\"font-size:22px\"><strong>4.6) Visual analysis through conventional cytometry software<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">The FCS files produced by <code>PUPAID<\/code> are indeed intended to be opened and analyzed via third-party cytometry software like FlowJo or Kaluza, which will allow to visually and interactively explore the data and extract any relevant feature or measurement of choice. Interestingly, a full gating strategy is thus perfectly accessible with this approach, which will dramatically help to unlock the full potential of multiplex immunofluorescence data, as shown by the <strong>Figure 5<\/strong> below.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a3aeb4d547d0&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a3aeb4d547d0\" class=\"aligncenter size-full is-resized wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"2545\" height=\"2538\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" sizes=\"auto, (max-width: 2545px) 100vw, 2545px\" src=\"https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/Figure3_PUPAID_gatingStrategy.png\" alt=\"\" class=\"wp-image-1428\" style=\"width:768px\" srcset=\"https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/Figure3_PUPAID_gatingStrategy.png 2545w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/Figure3_PUPAID_gatingStrategy-300x300.png 300w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/Figure3_PUPAID_gatingStrategy-1024x1021.png 1024w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/Figure3_PUPAID_gatingStrategy-150x150.png 150w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/Figure3_PUPAID_gatingStrategy-768x766.png 768w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/Figure3_PUPAID_gatingStrategy-1536x1532.png 1536w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/Figure3_PUPAID_gatingStrategy-2048x2042.png 2048w, https:\/\/paul-regnier.fr\/wp-content\/uploads\/2023\/11\/Figure3_PUPAID_gatingStrategy-12x12.png 12w\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\"><strong>Figure 5 &#8211; Possible gating strategy to perform on FCS files generated by <code>PUPAID<\/code>.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"5\" style=\"font-size:28px\"><strong>5) Citation<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:16px\">If you used <code>PUPAID<\/code> in your analyses, please cite our article published in the <em>PLOS One<\/em> journal:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li style=\"font-size:16px\"><a href=\"https:\/\/journals.plos.org\/plosone\/article?id=10.1371\/journal.pone.0308970\" target=\"_blank\" rel=\"noreferrer noopener\">PLOS One<\/a><\/li>\n\n\n\n<li style=\"font-size:16px\">PubMed: <a href=\"https:\/\/pubmed.ncbi.nlm.nih.gov\/39298534\/\" target=\"_blank\" rel=\"noreferrer noopener\">39298534<\/a><\/li>\n\n\n\n<li style=\"font-size:16px\">DOI: <a href=\"https:\/\/doi.org\/10.1371\/journal.pone.0308970\" target=\"_blank\" rel=\"noreferrer noopener\">10.1371\/journal.pone.0308970<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>","protected":false},"excerpt":{"rendered":"<p>Warning: this tutorial is only available in English, even if you choose the French language at the bottom of the screen. Thank you for your understanding. PUPAID: Pipeline for Unleashed Processing and Analysis of Immunofluorescence Data PUPAID is a R + ImageJ package allowing to process immunofluorescence data and perform [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-templates\/template-fullwidth.php","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"class_list":["post-925","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/paul-regnier.fr\/en_gb\/wp-json\/wp\/v2\/pages\/925","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/paul-regnier.fr\/en_gb\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/paul-regnier.fr\/en_gb\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/paul-regnier.fr\/en_gb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/paul-regnier.fr\/en_gb\/wp-json\/wp\/v2\/comments?post=925"}],"version-history":[{"count":84,"href":"https:\/\/paul-regnier.fr\/en_gb\/wp-json\/wp\/v2\/pages\/925\/revisions"}],"predecessor-version":[{"id":2046,"href":"https:\/\/paul-regnier.fr\/en_gb\/wp-json\/wp\/v2\/pages\/925\/revisions\/2046"}],"wp:attachment":[{"href":"https:\/\/paul-regnier.fr\/en_gb\/wp-json\/wp\/v2\/media?parent=925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}