Search
Question: Plotting flow cytometry data
0
gravatar for gori73
19 months ago by
gori730
United States
gori730 wrote:

Hello,

 

 

 I am  new  to R and would appreciate your help.

 

I am using flowcore package to load my FCS files to R but then extract the relevant data to a regular dataframe

as I am not familiar with the manipulation of S4 type data.

 

I am currently using smoothscatter function to display my data but would like to produce non-smoothed  image more similar to FlowJo.

I like the images produced by the examples in  FlowViz vignette but don’t know how to use on my simple dataframe.

When I use the code below I get just a one color plot instead of different colors representing cell densities.

 

library(flowViz)
require(IDPmisc)

colramp <- colorRampPalette(IDPcolorRamp(21))

xyplot(DNAA~YFP, data, nbin = 100, smooth=FALSE, colramp=colramp)

 

In this case DNAA and YFP are two columns in the dataframe “data”.

 

How should I modify my code to get a plot similar to the one in FlowViz vignette? (use on simple dataframes)

 

Thank you very much,

 

Igor

ADD COMMENTlink modified 19 months ago by Jiang, Mike960 • written 19 months ago by gori730
0
gravatar for Jiang, Mike
19 months ago by
Jiang, Mike960
(Private Address)
Jiang, Mike960 wrote:

You must use flowSet/flowFrame in order to take advantage of all the features provided by flowViz package.  If you convert it to a data.frame,  then it is simply a generic visualization question of 'lattice' or 'ggplot2' which is beyond the scope of flowViz or flow cytometry. But I can help you with this particular one, 

 

cols <- densCols(x = data[["DNAA"]], y = data[["YFP"]], colramp=colramp)

xyplot(`SSC-H`~`FSC-H`, data,  col = cols)

 

 

Again, this is not an idea way of using flowCore. What kind of data manipulation are you talking about?I would say at least you can assign the data back to flowSet/flowFrame object before plotting them. See

?`exprs<-`
ADD COMMENTlink written 19 months ago by Jiang, Mike960
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 112 users visited in the last hour