| readImagefromTXT {imcRtools} | R Documentation |
Reader function to generate Image objects
in form of a CytoImageList container from .txt files.
readImagefromTXT(
path,
pattern = ".txt$",
channel_pattern = "[A-Za-z]{1,2}[0-9]{2,3}Di",
index_names = c("X", "Y"),
BPPARAM = SerialParam()
)
path |
Full path to where the individual .txt files are located. This is usualy the path where the .mcd file is located. |
pattern |
pattern to select which files should be read in (default
|
channel_pattern |
regular expression to select the channel names from the files. |
index_names |
exact names of the columns storing the x and y coordinates of the image |
BPPARAM |
parameters for parallelized reading in of images. This is only recommended for very large images. |
returns a CytoImageList object containing one
Image object per .txt file.
As part of the raw data folder, the Hyperion imaging system writes out one .txt file per acquisition. These files store the ion counts per pixel and channel.
This function reads these .txt files into a single
CytoImageList object for downstream analysis. The
pattern argument allows selection of all .txt files or a specific
subset of files. The channelNames of the
CytoImageList object are determined by the channel_pattern
argument.
Nils Eling (nils.eling@dqbm.uzh.ch)
CytoImageList for the container
MulticoreParam for parallelized processing
Image for the multi-channel image object
vignette("cytomapper") for visualization of multi-channel images
path <- system.file("extdata/mockData/raw", package = "imcRtools")
# Read in all images
x <- readImagefromTXT(path)
x
# Read in specific files
y <- readImagefromTXT(path, pattern = "ROI_002")
y
# Read in other channelNames
z <- readImagefromTXT(path, channel_pattern = "[A-Za-z]{2}[0-9]{3}")
z