Best method to manually add a cluster ID to a fcs or csv file
0
0
Entering edit mode
aguirre ▴ 20
@c6ce5d11
Last seen 7 months ago
France

Many R Flow Cytometry pakages perform clustering or data analysis based on cell identification.

For example, cytoMEM require a cluster ID for each cell to compute marker expression for the cell cluster.

I did write the following r code to annotate a matrix but it has several drawbacks:

  • It is cumbersome to make many clusters (ex: lymphocytes, monocytes, granulocytes...)
  • It relies on a 2 dimensions graph (CD45 vs SS in my example) but depending on the scientific question, I might need different gating strategies
  • Some cells are not clustered because they fall out of the different gates that I did define
  • I need additionnal code to add the markers names to the output matrix

library(flowCore)
library(CytoExploreR)
library(purrr) 

frame <- read.FCS("myFcsFile.fcs")
cell_gate <- cyto_gate_draw(frame,
                            parent = "root",
                            alias = "lymphocytes",
                            channels = c("FL10-A", "SS-A"),
                            axes_limits="machine",
                            title ="select lymphocytes")
  cell_filter <-filter(frame, cell_gate[[lymphocytes]])
  vec <- cell_filter@subSet

mat <- exprs(frame)
mat <- list(mat)
annotated_cells <- cbind, c(mat, vec)

So my question is the following: What method or package do you use to manually define cell population clusters for further analysis?

Is there an easy and flexible method to do such annotation of a fcs file?

The output should be a matrix rather than a fcs file as it is more widely usable in R.

Thank you for any help.

flowCore cytoMEM • 565 views
ADD COMMENT

Login before adding your answer.

Traffic: 1093 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6