Closed avdvloet closed 1 year ago
@avdvloet, it is rather unusual to require both linear and transformed data for visualisation purposes - I would carefully consider whether you need both.
Anyways, the best way to do this is to pull out the linear data using cyto_extract()
and then pass that to cyto_plot()
:
cs <- cyto_extract(
gs,
parent = "Live Cells",
channels = c("PE-A"),
copy = TRUE, # required so original data remains transformed
inverse.transform = TRUE
)
cyto_plot(
cs,
channels = "PE-A"
)
@DillonHammill this worked, thanks!
I am comparing haploid with diploid with tetraploid nuclei and I want to see whether the fluorescence signal gets doubled along the ploidy gradient. That is why I wanted to visualize on a linear scale, to really illustrate the linear relationship between N, 2N and 4N.
@DillonHammill additional question, is it possible, to plot onto a histogram a vertical bar indicating the mean value? How could one extract this mean value and plot it accordingly?
Just use label_stat = "median"
in cyto_plot()
:
cyto_plot(
cs,
channels = "PE-A",
label = TRUE,
label_stat = "median"
)
The "median" option is more robust for cytometry data but "mean" and "count" are also supported.
thanks!
I want to gate certain populations of cells on log scale, but I want to plot these subpopulations in histograms on linear scale. The problem is that if I log transform the appropriate channels, there is no way to revert them back to linear scale for plotting purposes. I am also unable to copy or create new channels within my GatingSet where I would save copies of the channels on another scale and use them for different purposes. Below my code;
Loading of the data and creating of the gatingset
cs
, where the channels'YL2-A'
and'SSC-A'
are log transformed for gating purposes:Next, I manually gate all samples in this gating set on log scale;
Finally, I want to plot the subpopulations (nuclei) on LINEAR scale instead of log scale. This is the code I have so far, but of course this is still on log scale.
Could you please provide some help? Thanks in advance!