Cytomap importing annotated clusters

Hello everyone,

I would like to do a neighborhood region based analysis in Cytomap. I would like to use the gating and cell classification that I do in FlowJo, so in the .csv file that I upload in Cytomap I have added a column called “Population”, in which I include this information for each cell/object.

Is it possible to use those previously determined cell populations to perform the subsequent analyses (i.e. defining neighborhoods)? When I try to do so, this information is lost and I cannot use the “Populations” column that I have on my files. Do I have to do the clustering in CytoMAP? or should I upload a separate .csv file for each of the populations I had previously determined? Should I name the column in a different way so that it is recognized as “cell types/phenotypes” by the software?

I hope my explanation was clear.

Thank you for your help!

1 Like

Hi @davebej,

Without seeing the files or knowing what you are doing with them (which exact steps, what is disappearing when), it is a little bit hard to guess what is going on, but maybe @cstoltzfus will be able to figure it out.

In general, you should be able to import classifications and use those in the neighborhood analysis, I have done that in the QuPath guides and it should be similar for the FlowJo data. I think. In general, you use the Annotate Clusters button to assign your classes rather than using CtyoMAP’s clustering.

When selecting Annotate cells with no clusters already created, you should get an interface like this:

That allows you to have multiple columns of classifications and select the one you want to use for the current project.

You will likely need to elaborate on when/where/how the Populations column is lost, though.


Hello @davebej,

Thank you for reaching out! I would have to see the .csv file to know why CytoMAP isn’t letting you use that channel. Two things I would also check are; first, do you have the latest version of CytoMAP (version 1.4.19)? I have been working a lot on making loading data into CytoMAP more stable in newer versions. The second thing I would check is to open your .csv file and make sure everything looks ok. The first row should be the names of the channels and all subsequent rows should be the values of the channels. Every column should have the same number of row entries; no columns with only name etc.

Assuming the data looks right there are a few ways to load in data from FlowJo and preserve the cell type definitions.

  1. Since you are using FlowJo to gate on cell types you might be able to import the FlowJo .wsp file directly. However, this import function is not very general and breaks if you use circle or ellipse gates, have advanced functions in your FlowJo file like compensation matrices or derived parameters, or don’t have two channels named X, and Y for position. This is worth a try but so far has really only worked well on a few datasets (when it does work it is really nice though).


  1. The next thing I would try is the annotate clusters workflow (@Mike_Nelson mentioned) if you have a .csv with one column for the population definitions. This phenotype channel does not need to be named anything particular and can be strings or numbers differentiating the different populations. The workflow is to load the .csv using Load Table of Cells. Then after finishing the load data wizard, select the Annotate Clusters button. This will ask you to select the channel you want to use for classification. Select the Population channel and hit ok. A new table will appear that populates with all of the unique names you have in the selected channel. Here you can re-name things (in the left column) if you want, otherwise hit the Save Annotations button. Once things are saved you can check to make sure this worked by looking at the Phenotype Table. The number of cells of each type here should match the numbers you have in FlowJo. The % of parent won’t match since here this % is of the total number of cells.

  1. If for some reason neither of these things work you can use separate .csv files for each cell type as you described. This is a bit tedious to load data but is the original way I coded things to work and I still use it often. For this method you need a different .csv file for each cell type, where the file name is the name of the cell type. If you are importing multiple samples put each sample’s group of cell .csv files in a unique folder with the sample name as the folder name. Each sample folder should have the same .csv file names for the same cell types. All .csv files need to have the exact same channel names in the same order.

If none of these work then you might have found new bugs in my code, maybe FlowJo exported data weird, or there might be something I didn’t plan for in the .csv files. You can in principle re-gate on cell types in CytoMAP but FlowJo is way better at gating on cells and we should be able to use those definitions somehow.


Thank you very much @cstoltzfus and @Mike_Nelson! Both of your suggestions were very useful. I had to modify my .csv files a bit, but after doing it I had no issues anymore. By the way, CytoMAP is a great development!

I guess this won’t be the last time I will post here. Thank you both for supporting the users.