Getting a dataset that only contains the flow data within the gated area
1
0
Entering edit mode
henry • 0
@cbb38067
Last seen 3.2 years ago
Canada

Hi, I am new to using flow cytometry data and I'm having trouble achieving my goal.

I want to apply a gate to my flow data (.fcs file) and then subset the data to only have the information in that gate. I'm currently using the flowWorkspac package. At first I tried using gs_cyto_data(), gh_pop_get_data(), and gh_pop_get_indices() but I don’t think I am using them properly as I don’t know how do access the gated information only. I would like to be able to plot only the information in the gated subset afterwards.

Any help/suggestions would be appreciated!

Thank you

flowWorkspace • 1.1k views
ADD COMMENT
0
Entering edit mode
Jiang, Mike ★ 1.3k
@jiang-mike-4886
Last seen 3.2 years ago
(Private Address)

You didn't post your example code, so here is my best guess of your workflow

> library(flowCore)
> library(flowWorkspace)
> library(openCyto)
> cs <- load_cytoset_from_fcs(system.file("extdata/CytoTrol_CytoTrol_1.fcs", package = "flowWorkspaceData"))
> gs = GatingSet(cs)
> gs_get_pop_paths(gs)
[1] "root"
> gs_add_gating_method(gs, "s", parent = "root", dims = "FSC-A,FSC-H", gating_method = "singletGate")
...
done
> gs_get_pop_paths(gs)
[1] "root" "/s"  
> # library(ggcyto)
> # autoplot(gs, "s")
> gh = gs[[1]]
> gh_pop_get_stats(gh)
    pop  count
1: root 119531
2:   /s 112200
> subset = gh_pop_get_data(gh, "s")
> nrow(subset)
[1] 112200
ADD COMMENT

Login before adding your answer.

Traffic: 843 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6