README.md

R build status Dependencies License: GPL v3

Tools for Imaging Flow Cytometry (IFC)

INSTALLATION (from CRAN)

The easiest way to install IFC package is:

install.packages("IFC")

INSTALLATION (from in-dev github master branch)

Current in development branch can be installed from github and requires compilation

On Windows (tested 7 and 10)

In R console, if you installed Rtools directly on C: you should see something like C:\Rtools\bin and C:\Rtools\mingw_32\bin

print(unlist(strsplit(Sys.getenv("PATH"), ";")))

Otherwise, try to set it

# e.g.
shell('setx PATH "C:\\Rtools\\bin"')
shell('setx PATH "C:\\Rtools\\mingw_32\\bin"')

You may need to reboot to operate changes

On MacOS (tested on High Sierra)

On Linux (tested on Ubuntu 16.04 LTS)

sudo apt-get install libtiff-dev

in R

install.packages(c("Rcpp", "xml2", "utils", "grid", "gridExtra", "gridGraphics", "lattice", "latticeExtra", "KernSmooth", "DT", "visNetwork"))
install.packages("remotes")
remotes::install_github(repo = "gitdemont/IFC", ref = "master", dependencies = FALSE)

USAGE

Several examples in IFC package are dependent on data files that can be found in dedicated IFCdata package.

To install IFCdata package and run examples in IFC:

install.packages("IFCdata", repos = "https://gitdemont.github.io/IFCdata/", type = "source")

DETAILS

use: readIFC() or ExtractFromDAF() or ExtractFromXIF()

This allows retrieving several information from files like at single cell level:

features defined and their values

masks defined and their definitions,

regions drawn and their vertices,

populations created and know whether a cell belongs to this population or not,

graphs from the analysis worksheet.

As a consequence ones can get for each cell the population it belongs to. One main advantage is that you don't have to use export / extract .cif or .fcs or .txt manually for each subpopulation you are interested in. Having features values for each cells and knowing which populations a cell is belonging to, one can pass it to a supervised machine learning (ML) algorithm (they are many in R) to create a model fitting the data.

use: writeIFC() or ExportToDAF()

Once data are parsed and treated new elements can be injected in daf file, e.g. a ML model is trained on a daf file and used to predict populations in other daf files. Then these predicted populations can be injected so as to be checked using IDEAS in addition to their predicted probability values (or other features like PCA/t-SNE/UMAP dimensions).

use: writeIFC() or ExportToXIF()

Once data are parsed and treated new elements can be used to subset or merge raw / compensated images files

ExtractFromFCS or ExportToFCS, to read FCS and create FCS files,

DisplayGallery(), displays cells / gallery of cells in R,

ExtractImages_toFile(), extracts cells (with desired channels) to image files (tiff, png, jpeg, …),

This allows direct extraction of raw / compensated images and associated masks for all acquired channels. These images can be then easily exported to R arrays or TIFF / JPEG / PNG images. For instance, we can programmatically export images from a desired population identified in a daf file. Accessing images allows to pass them to deep learning frameworks like tensorflow (e.g. Convolutional Neural Network)

ExportToReport(), exports graphs and associated stats from analysis worksheet of files,

popsNetwork(), allows visualization in R / exports population hierarchy,

ExportToBATCH(), creates batch demand to be processed by IDEAS,

getInfo() for retrieving rich information about file,

objectExtract() for extracting individual image or mask within .rif or .cif file,

plotGraph() and autoplot() for displaying graphical elements of analysis worksheet,

*data_add_ and *data_rm_ functions for data object manipulation,

data_to_DAF to export object manipulated in R to .daf file.

DISCLAIMER



gitdemont/IFC documentation built on Feb. 20, 2025, 12:55 a.m.