Replies: 1 comment 1 reply
-
Hi @5ittn3r The Divider class takes a transformation reference just like the Dimension class. Why this is the case is an artifact of the GatingML specification. Basically, you can think of any gate boundary needing to be defined in the coordinate system of the final desired event space. Hopefully, that makes sense. Regards, |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I first defined this transformation:
xform = fk.transforms.LogicleTransform( 'logicle', param_t=262144, param_w=0.5, param_m=4.5, param_a=0 )
Then, I have created a bunch of quad gates:
`# QuadrantDivider instances are similar to a Dimension, they take compensation_ref and tranformation_ref
arguments. However, we'll use the defaults here of 'uncompensated' & None.
#dim_fsc_a = fk.Dimension('FSC-A', 'uncompensated', transformation_ref=xform.id)
#dim_ssc_a = fk.Dimension('SSC-A', 'uncompensated', transformation_ref=xform.id)
#dim_fsc_a = fk.Dimension('FSC-A', 'uncompensated')
#dim_ssc_a = fk.Dimension('SSC-A', 'uncompensated')
#######GFP dividers
quad_div1 = fk.QuadrantDivider(
'GFP-divider1',
'Alexa Fluor 488-A',
compensation_ref='uncompensated',
transformation_ref=None,
values=[5000]
)
#######mKate dividers
quad_div2 = fk.QuadrantDivider(
'mKate-divider1',
'PE-Texas Red-A',
compensation_ref='uncompensated',
transformation_ref=None,
values=[5000]
)
#######BFP dividers
quad_div3 = fk.QuadrantDivider(
'BFP-divider1',
'BV421-A',
compensation_ref='uncompensated',
transformation_ref=None,
values=[5000]
)
quad_divs_GFP_mKate = [quad_div1, quad_div2]
quad_divs_BFP_mKate = [quad_div3, quad_div2]
quad_divs_BFP_GFP = [quad_div3, quad_div1]
the 2 dividers above will be used to divide the space into 4 quadrants
quad_1 = fk.gates.Quadrant(
quadrant_id='GFP_High-mKate_High',
divider_refs=['GFP-divider1', 'mKate-divider1'],
divider_ranges=[(.50000, None), (.50000, None)]
)
quad_2 = fk.gates.Quadrant(
quadrant_id='GFP_High-mKate_Low',
divider_refs=['GFP-divider1', 'mKate-divider1'],
divider_ranges=[(.50000, None), (None, .50000)]
)
quad_3 = fk.gates.Quadrant(
quadrant_id='GFP_Low-mKate_High',
divider_refs=['GFP-divider1', 'mKate-divider1'],
divider_ranges=[(None, .50000), (.50000, None)]
)
quad_4 = fk.gates.Quadrant(
quadrant_id='GFP_Low-mKate_Low',
divider_refs=['GFP-divider1', 'mKate-divider1'],
divider_ranges=[(None, .50000), (None, .50000)]
)
quadrants1 = [quad_1, quad_2, quad_3, quad_4]
################################################
quad_5 = fk.gates.Quadrant(
quadrant_id='BFP_High-mKate_High',
divider_refs=['BFP-divider1', 'mKate-divider1'],
divider_ranges=[(.50000, None), (.50000, None)]
)
quad_6 = fk.gates.Quadrant(
quadrant_id='BFP_High-mKate_Low',
divider_refs=['BFP-divider1', 'mKate-divider1'],
divider_ranges=[(.50000, None), (None, .50000)]
)
quad_7 = fk.gates.Quadrant(
quadrant_id='BFP_Low-mKate_High',
divider_refs=['BFP-divider1', 'mKate-divider1'],
divider_ranges=[(None, .50000), (.50000, None)]
)
quad_8 = fk.gates.Quadrant(
quadrant_id='BFP_Low-mKate_Low',
divider_refs=['BFP-divider1', 'mKate-divider1'],
divider_ranges=[(None, .50000), (None, .50000)]
)
quadrants2 = [quad_5, quad_6, quad_7, quad_8]
###################################################
quad_9 = fk.gates.Quadrant(
quadrant_id='BFP_High-GFP_High',
divider_refs=['BFP-divider1', 'GFP-divider1'],
divider_ranges=[(.50000, None), (.50000, None)]
)
quad_10 = fk.gates.Quadrant(
quadrant_id='BFP_High-GFP_Low',
divider_refs=['BFP-divider1', 'GFP-divider1'],
divider_ranges=[(.50000, None), (None, .50000)]
)
quad_11 = fk.gates.Quadrant(
quadrant_id='BFP_Low-GFP_High',
divider_refs=['BFP-divider1', 'GFP-divider1'],
divider_ranges=[(None, .50000), (.50000, None)]
)
quad_12 = fk.gates.Quadrant(
quadrant_id='BFP_Low-GFP_Low',
divider_refs=['BFP-divider1', 'GFP-divider1'],
divider_ranges=[(None, .50000), (None, .50000)]
)
quadrants3 = [quad_9, quad_10, quad_11, quad_12]
#################################################
We can now construct our QuadrantGate
quad_gate1 = fk.gates.QuadrantGate(
'quadgate1',
dividers=quad_divs_GFP_mKate,
quadrants=quadrants1
)
quad_gate2 = fk.gates.QuadrantGate(
'quadgate2',
dividers=quad_divs_BFP_mKate,
quadrants=quadrants2
)
quad_gate3 = fk.gates.QuadrantGate(
'quadgate3',
dividers=quad_divs_BFP_GFP,
quadrants=quadrants3
)
session.add_gate(quad_gate1, ('root', ))
session.add_gate(quad_gate2, ('root', ))
session.add_gate(quad_gate3, ('root', ))
`
But when I tried to do it with transformation_ref for the xform, it didn't work.
In other words, how can you make your quad gate work with transformed data?
Thanks (-:
Beta Was this translation helpful? Give feedback.
All reactions