Closed kim619 closed 1 year ago
@kim619, it seems like one or more of your samples is missing the "R6 GFP+RFP Px"
gate? Are these gates created with cyto_gate_draw()
? Perhaps you used [
when you drew the gates? You can't use [
or [[
in cyto_gate_draw()
otherwise you will only apply the gates to a subset of the samples, you should instead use the select
argument (which is much more flexible anyways).
[
and [[
are simply subset operators which return a subset of the original GatingSet - i.e. gs[3] will return a GatingSet containing only the third sample. The
selectargument does the same thing internally but allows internal access to the entire GatingSet if required, as is the case in
cyto_gate_draw()`.
Do you think it is likely that this may have happened? Otherwise I can help track down the erroneous sample(s)...
P.S. I would recommend using median
instead of mean
to get a better idea of the central tendency of distributions which may have a significant proportion of events outside the detection limit (i.e. piled up on the axes limits).
Thanks so much! I will try it, but I run into another problem, the axes limit of the cyto_gate_draw seems so different once I switch to using select () function.
For example, when I used the [] function to select the data, it gives me automatically with the nice domain to select. like the graph below.
When I used select () function, it gave me weird domain, and I don't see the log transform function in the help session, it would be great if you can help me with this!
cyto_gate_draw(gs1,parent="root",
alias = "GFPR6",
select="05-Well-C1.fcs",
channels = c("FITC-A"),
type="interval",
gatingTemplate="GatingTemplate3.csv",
plot=TRUE,
popup=FALSE,
xlim=c(0,6e5))
@kim619, it looks like you haven't transformed the data in the second image prior to gating. The select
argument doesn't fiddle with transformations so you may have forgotten to transform the data with cyto_transform()
before gating.
select
also accepts indices so you can simply supply the indices as you did previously within [
but instead pass them to select
.
Thanks!! Everything works now :) Though I wonder if there is a command to do a statistical test on the population like t-test or Mann-Whitney U test? Since there is only the cyto_stats_compute() I found from the vignettes page. Or if I put it another way, if there is any method that I can extract the gated data into a CSV file?
That's good to hear! Take a look at cyto_extract()
to pull out population-level data into a matrix that you can write to a csv using write.csv()
.
Statistical tests such as these are coming to version 2.0.0 of CytoExploreR which will be released soon (so exciting!). For now you will need to do this by hand as you propose.
P.S. cyto_extract()
will become cyto_data_extract()
in the new version of CytoExploreR.
Hi I would like to make a mann whitney U test to compare my gated data for my gating set, I tried to use the cyto_stats_compute to save statistical data, though it did not allow me to use multiple file in one coding.
However when I assigned the specific element to the alias, it works perfectly fine.
PS: Is there a method I can unite all my gating set data without specifying the []?