# "ROI012_ilastik_s2_Object Identities.tif"
# "ROI010_ilastik_s2_Simple Segmentation.tif" # "ROI010_ilastik_s2_Object Predictions.tif" # "ROI010_ilastik_s2_Object Identities.tif" # "ROI008_ilastik_s2_Simple Segmentation.tif" # "ROI008_ilastik_s2_Object Predictions.tif" # "ROI008_ilastik_s2_Object Identities.tif" # "ROI006_ilastik_s2_Simple Segmentation.tif" # "ROI006_ilastik_s2_Object Predictions.tif" # "ROI006_ilastik_s2_Object Identities.tif" # "ROI004_ilastik_s2_Simple Segmentation.tif" # "ROI004_ilastik_s2_Object Predictions.tif" # "ROI004_ilastik_s2_Object Identities.tif" # "ROI002_ilastik_s2_Simple Segmentation.tif" # "ROI002_ilastik_s2_Object Predictions.tif" # "ROI002_ilastik_s2_Object Identities.tif" # Define cell mask extension for different mask typesĪll.masks <- list.files(pattern = '.tif') # $ ROI012:Formal class 'spatial' with 3 slots # $ ROI010:Formal class 'spatial' with 3 slots # $ ROI008:Formal class 'spatial' with 3 slots # $ ROI006:Formal class 'spatial' with 3 slots # $ ROI004:Formal class 'spatial' with 3 slots RASTERS:Formal class 'RasterStack' with 11 slots # $ ROI002:Formal class 'spatial' with 3 slots Spatial.dat <- (dir = InputDirectory) # Check results # Read in TIFF files and create spatial objects Rois <- list.dirs(full.names = FALSE, recursive = FALSE) # Initialise the spatial data object with channel TIFF files OutputDirectory # "/Users/thomasa/OneDrive - The University of Sydney (Staff)/Library/Github (public)/Spectre/workflows/Spatial - FlowJo/Spectre TIFF to FCS/Output - TIFF to FCS" # MaskDirectory # "/Users/thomasa/OneDrive - The University of Sydney (Staff)/Library/Github (public)/Spectre/workflows/Spatial - FlowJo/data/masks" # Create output directory InputDirectory # "/Users/thomasa/OneDrive - The University of Sydney (Staff)/Library/Github (public)/Spectre/workflows/Spatial - FlowJo/data/ROIs" setwd(PrimaryDirectory) PrimaryDirectory # Set InputDirectory (ROI TIFFs) Setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) # Sets the working directory to where the script is located Spectre::package.load(type = 'spatial') # Set PrimaryDirectoryĭirname(rstudioapi::getActiveDocumentContext()$path) # Finds the directory where this script is located By doing this, FlowJo can render the image in the correct orientation. A key modification to the data within this R script is the addition of a second ‘Y-axis’ column, where the values are converted to negative. The result of this is that IMC images tend to be ‘flipped’ on the Y-axis. Programs that deal with numerical data, such as FlowJo, typically position x=0, y=0 in the bottom left corner. Programs such as HistoCat that typically deal with imaging data position x=0, y=0 in the top left corner. These can be plotted on a linear axis typically between 0 and ~5. These channels are indicated by the "_asinh" that is appended to the end of the channel name. To prepare the data for analysis, the raw values are subject to arcsinh transformation with a co-factor of 1. This provides a straightforward method for quantifying cellular expression and frequency data derived from segmented images.Īrcsinh transformation. This tutorial introduces the user to manipulating and analysing IMC data using FlowJo, following segmentation and pre-processing using one of Spectre’s segmentation approaches.