Skip to content

Report shows '0' count for cell population and it's sub-populations #120

Closed
@srideviks

Description

Describe the bug
Hello team, I use FlowKit to extract gated events from fcs file and it's corresponding workspace (wsp) file. I'm interested in count of Beads, and cell populations like Lymphocytes, and it's 7 subpopulations. When I load the input files (fcs and wsp file) to a FlowKit session and apply get_gate_events(), I get events corresponding to Beads, but not for Lymphocytes and it's sub-populations. So, I checked back the report that gets created when function "analyze_samples()" function is applied to the session. It contains 0 events for Lymphocytes and it's sub-populations. I opened this wsp file in FlowJo and I see the gates for all the cell populations in the assay. I checked wsp file in xml format, information like co-ordinates for all the populations exists in there. I have 1 pair of files (fcs and wsp file) that fives me all events. Rest all files, seems to be going through this issue. Can you please help me out to overcome this issue?

Code To Reproduce
Code to reproduce the behavior:

import flowkit as fk

sample_id = 'A_TBNK.fcs' # Renamed A for simplicity
sample_grp = 'TBNK'
base_dir = "../../Data/Orig_wsp_fcs/"
sample_path = os.path.join(base_dir, sample_id)
wsp_path = os.path.join(base_dir, "A_TBNK.wsp")    # Renamed A for simplicity

fks_fj = fk.Session(sample_path)
fks_fj.import_flowjo_workspace(wsp_path)

fks_fj.analyze_samples(sample_grp)
results = fks_fj.get_gating_results(sample_grp, sample_id)
print(results.report)

bead_events = fks_fj.get_gate_events(sample_grp, sample_id, 'Beads')    # Parent: Root
lymp_events = fks_fj.get_gate_events(sample_grp, sample_id, 'Lymphocytes')    # Parent: Root
CD3minus_events = fks_fj.get_gate_events(sample_grp, sample_id, 'CD3-')    # Parent: Lymphocytes
Bcell_events = fks_fj.get_gate_events(sample_grp, sample_id, 'B cells')    # Parent: CD3-
NKcell_events = fks_fj.get_gate_events(sample_grp, sample_id, 'NK cells')    # Parent: CD3-
Tcell_events = fks_fj.get_gate_events(sample_grp, sample_id, 'T cells')    # Parent: Lymphocytes
CD4plus_events = fks_fj.get_gate_events(sample_grp, sample_id, 'CD4+')    # Parent: T cells
CD4CD8_events = fks_fj.get_gate_events(sample_grp, sample_id, 'CD4+CD8+')    # Parent: T cells
CD8plus_events = fks_fj.get_gate_events(sample_grp, sample_id, 'CD8+')    # Parent: T cells

Expected behavior
I expect to see events(~1000 rows) for all the cell populations defined above.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows version 10.0.19044.1766
  • Python version 3.9
  • FlowKit version 0.9.1

Additional context
FlowKit is really amazing and I love to work with it. Thank you for developing this package in python and making it available for all.

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions