FlowCytometryTools icon indicating copy to clipboard operation
FlowCytometryTools copied to clipboard

Load a csv file into FlowCytometryTools

Open IreneRobles opened this issue 6 years ago • 3 comments

Hi, I am currently working with image analysis data. There I would love to be able to gate the cells as I could do in fcs. The problem is that they are not a .fcs file and I try to load it as a pandas dataframe with no success. I would really appreciate if you could help me to analyse my .csv file that is not from flow cytometry as if it were. Thanks! Irene

IreneRobles avatar Mar 01 '19 18:03 IreneRobles

I am currently working with image analysis data. -- is this microscopy data rather than flowcytometry data?

If you could attach an example CSV I can take a look to at the data to figure out whether this is feasible

Won't be able to respond very quickly (my day job has nothing to do with flow cytometry :))

eyurtsev avatar Mar 04 '19 15:03 eyurtsev

example.txt

Hi, Thanks a lot for answering. Here is the text file. (It is a csv file, but I had to change the extension to be able to upload it)

The two columns that should be plotted together to be gated are: Intensity_UpperQuartileIntensity_FilteredGreen and Intensity_UpperQuartileIntensity_FilteredRed

Thank you so much!

Irene

IreneRobles avatar Mar 04 '19 15:03 IreneRobles

I suspect that there might already be something out there for dealing with the data that you have -- so you may be better off not using this library

If you do want to try and use it -- you'll need to fork the code locally and write a bit of logic for this class:

https://github.com/eyurtsev/FlowCytometryTools/blob/master/FlowCytometryTools/gui/fc_widget.py#L579

Similar to the load_fcs, you can load a csv file

You'll need to create a Sample object that contains your data and mimics the interface that's used for fcs files -- specifically, it'll need information about the "channels" (columns) that you have

https://github.com/eyurtsev/FlowCytometryTools/blob/master/FlowCytometryTools/gui/fc_widget.py#L702

Make corresponding changes here (in the GUILauncher)

https://github.com/eyurtsev/FlowCytometryTools/blob/master/FlowCytometryTools/gui/webagg_backend/gui.py#L204

And you'll be able to launch your application by Launching GUILauncher

eyurtsev avatar Mar 04 '19 19:03 eyurtsev