Replies: 2 comments
-
Hi, Glad you find the library useful! For your issue, you need to call Let me know if this solves your issue, |
Beta Was this translation helpful? Give feedback.
0 replies
-
It works!
Thank you🙏
בתאריך יום ג׳, 16 באפר׳ 2024, 16:48, מאת Scott White <
***@***.***>:
… Hi,
Glad you find the library useful! For your issue, you need to call
session.analyze_samples(group_name) before gated event data is available.
Let me know if this solves your issue,
Scott
—
Reply to this email directly, view it on GitHub
<#190 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF4MZ54D77HPV4BVRT66CXTY5UTZLAVCNFSM6AAAAABGJKPOMSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TCMZQGQ4TE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I really like Flowkit (having tried other APIs already), and especially the fact that it can be used on google colab which is awesome!
But I am still figuring it out, and having some trouble with gating.
Here's the code:
`
setup some file paths for our data
#MOUNT DRIVE FIRST!!!
base_dir = "/content/drive/MyDrive/VFRC FACS Cyto/4.4.24/Protein Sensors/040424_high_gain/"
fcs_dir = os.path.join(base_dir, )
gml_path = os.path.join(base_dir, "8_color_ICS.xml")
Create a Session with the path to a GatingML document & directory containing our FCS files
session = fk.Session(fcs_samples=fcs_dir)
sample_list = session.get_sample_ids()
print(sample_list)
['10_Tube_001_009.fcs', '10_Tube_002_010.fcs', '11_Tube_001_011.fcs', '11_Tube_002_012.fcs', '12_Tube_001_013.fcs', '12_Tube_002_014.fcs', '13_Tube_001_015.fcs', '14_Tube_001_016.fcs', '15_Tube_001_017.fcs', '16_Tube_001_018.fcs', '1_Tube_001_001.fcs', '2_Tube_001_002.fcs', '3_Tube_001_003.fcs', '4_Tube_001_004.fcs', '5_5_005.fcs', '9_Tube_001_006.fcs', '9_Tube_002_007.fcs', '9_Tube_003_008.fcs']
dim_fsc_a = fk.Dimension('FSC-A', 'uncompensated')
dim_ssc_a = fk.Dimension('SSC-A', 'uncompensated')
get our vertices from analyst, algo, etc.
cell_vertices = [
[50000,16000],
[20000, 60000],
[50000, 5000],
[20000, 5000],
]
cell_gate = fk.gates.PolygonGate(
'Cells2',
[dim_fsc_a, dim_ssc_a],
cell_vertices
)
session.add_gate(cell_gate, ('root', ))
print(session.get_gate_hierarchy())
root ╰── Cells2
sample=session.get_sample('10_Tube_001_009.fcs')
print(sample)
`
Sample(v3.0, 10_Tube_001_009.fcs, 21 channels, 100000 events)
session.get_gate_events(sample, 'Cells2')
TypeError Traceback (most recent call last)
in <cell line: 1>()
----> 1 session.get_gate_events(sample, 'Cells2')
1 frames
/usr/local/lib/python3.10/dist-packages/flowkit/_models/session.py in get_sample(self, sample_id)
270 :return: a Sample instance
271 """
--> 272 return self.sample_lut[sample_id]
273
274 def analyze_samples(self, sample_id=None, cache_events=False, use_mp=True, verbose=False):
TypeError: unhashable type: 'Sample'
###Why can't I get the gate events?
###Thanks!!!
Beta Was this translation helpful? Give feedback.
All reactions