Cytotron is a R package and it workd with R 3.6.1. (https://cran.r-project.org/bin/windows/base/old/3.6.1/).
To facilitate the set up, i advice you to use Rstudio. (https://rstudio.com/products/rstudio/download/)
CytoTron use Keras the python library to create perceptron model. To install it on windows your need python on your computer. (https://docs.conda.io/en/latest/miniconda.html)
Then, all other dependencies can be install with Rstudio interface, also the python library, with command line.
Install first reticulate and python library with reticulate
install.packages("reticulate")
library("recitulte")
install("tensorflow",pip=TRUE)
Install Keras R api.
install.packages("keras")
install.packages("kerasR")
Now we install all R pacakge which work with cytometry data
install.packages("devtools") #used to install package from github
install.packages("Biocmanager") #used to install pacakge from bioconductor
devtools::install_github("/EmbedSOM")
devtools::install_github("cipheLab/FlowCIPHE")
Install CytoTron pacakges
install.pacakges("devtools")
library(devtools)
install_github("qbarbier/CytoTron")
You can upload one file for each sample in your experiment, CytoTron concatenante during analysis and deconcatenante at the end of analysis for download. For a better annotation please use flowFrame cleaned (without dead cell, doublet, and other debris).
Each train data is a cell population and used to train modele and you con only annotate your input data You can select a transformation for your data (logicle for flow, arcsinh for cytometry) or not, and this transformation can be different to transformation used on Input Data. You can compensate also this data and just this data (if you use masse data, you don't have spill matrice)
Its possible to don't use the same transform for Input and Train. It also possible to don't compense (mass cytrometry data) Input and/or Train data.
At all step in your analyse you can use the Save All button to download a Rdata file contains all information. You can update this file just under the same button you can load this Rdata. Automaicly this files fill the log and all value inside the pipeline.
This part is used to generate two new dimension from reduction dimensionnality algorithme (tsne, umap, embedSom or PCA). This part is optionnal, its just to used if you want project annotation compute with CytoTron on two dimension and have glimpse of the annotation result. More your annotation is good and more the color annotation are separated.
This part you create your perceptron model. You can chose the number of hidden layer for your perceptron and the activation function. They are nos rules about the choices of the number of hidden layer, the number of neuron by layer and the activation function.
But more number of neuron and layer, and more time is necessary to compute your perceptron. The model are create with a part random sample of train data.
TO create and train perceptron you can use all cells in each train data or use a clustering algorithme unsupervised quickly to create cells can represente each population. An other methode, and the better in my way, is to use ceil. For each train data population we used a fixed number of cell. We used a sample methode with replace argument if they not enought cell in a popualation train data
We used two metric to see the training of model. The first is the loss function, th goal is decrease to 0. The second is accurary, its look like the recall, the value check if a cell is good annotate, this value increase to 1.
You can download just the model on Rdata and use it in other analysis with de Save Model Button. If in your pipeline they are already a perceptron model computed, this upload replace the previous model.
To finish with this part you can test the model on train data and see result with purity score on table for each population. If the model make a good prediction, the purity is up to 1. You can see also the real number of cell, the good number of seal annotate and the number of mistake annotate.
Final part of CytoTron, use your perceptron model to annotate new data and view/download result as FCS enriched files and population count table.
You can see the populatiopn output table witch one row for each files, and two colonne for each population with the number of events and just after the percentile from total of this population.
Deep Learning and perceptron annotattion is a methode to annotate flowFrame with reference files. Its a good alternative to the manual gating to unbiase analyse. But they are nos rules about the good format of perceptron model (number of layer, and neurone)
I would to thanks Jan Stuchly (https:://www.github.com/jstuchly) for this help about Keras and the comprehension of perceptron model annotation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.