Skip to content

Commit fa19a9b

Browse files
committed
Clarifies labeling efficiency calculation
Explains the calculation of labeling efficiency in the context of SPINNA outputs which represent proportions in terms of number of molecules rather than number of structures. Corrects the formulae used to calculate the labeling efficiency accordingly.
1 parent 32df5a1 commit fa19a9b

File tree

1 file changed

+50
-6
lines changed

1 file changed

+50
-6
lines changed

picasso_workflow/analyse.py

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6499,8 +6499,53 @@ def labeling_efficiency_analysis(self, i, parameters, results):
64996499
labeling efficiency of 1, yielding proportions of monomers and
65006500
dimers as seen in the data. The real labeling efficiency is then
65016501
6502-
LE(A) = prop(AB) / (prop(B) + prop(AB))
6503-
LE(B) = prop(AB) / (prop(A) + prop(AB))
6502+
Model:
6503+
Binders A and B bind to an engineered construct A*-anchor-B*.
6504+
A <-> A*-anchor-B* <-> B
6505+
There are four possible configurations:
6506+
A_only: AA*-anchor-B*
6507+
AB: AA*-anchor-B*B
6508+
B_only: A*-anchor-B*B
6509+
None (invisible in data): A*-anchor-B*
6510+
Number of total constructs with A, or B, respectively:
6511+
#A_tot = #A_only + #AB
6512+
#B_tot = #B_only + #AB
6513+
6514+
Proportions can be given in terms of #structures, or in terms
6515+
of #molecules, e.g.
6516+
with proportions given in terms of #structures
6517+
10 monomers, 10 dimers (20molecules in dimers) -> p_m = 50%, p_d=50%
6518+
6519+
with proportions given in terms of #molecules
6520+
10 monomers, 10 dimers (20molecules in dimers) -> p_m = 33%, p_d=66%
6521+
6522+
in terms of #structures
6523+
prop_A^S = #A_only / (#A_only + #B_only + #AB)
6524+
prop_B^S = #B_only / (#A_only + #B_only + #AB)
6525+
prop_AB^S = #AB / (#A_only + #B_only + #AB)
6526+
in terms of #molecules
6527+
prop_A^S = #A_only / (#A_only + #B_only + 2 #AB)
6528+
prop_B^S = #B_only / (#A_only + #B_only + 2 #AB)
6529+
prop_AB^S = 2 #AB / (#A_only + #B_only + 2 #AB)
6530+
6531+
#AB = #anchor * LE_A * LE_B
6532+
#A_tot = #anchor * LE_A
6533+
#B_tot = #anchor * LE_B
6534+
#A_only = #A_tot - #AB = #anchor * LE_A * (1 - LE_B)
6535+
#B_only = #B_tot - #AB = #anchor * LE_B * (1 - LE_A)
6536+
6537+
THUS, finally, the labeling efficiency can be calculated by
6538+
6539+
with proportions given in terms of #structures
6540+
LE_A = prop(AB) / (prop(B) + prop(AB))
6541+
LE_B = prop(AB) / (prop(A) + prop(AB))
6542+
6543+
with proportions given in terms of #molecules
6544+
LE_A = prop(AB) / (2 * prop(B) + prop(AB))
6545+
LE_B = prop(AB) / (2 * prop(A) + prop(AB))
6546+
6547+
SPINNA outputs propportions in terms of #molecules, so the last
6548+
formulae are used below.
65046549
65056550
Args:
65066551
i : int
@@ -6680,10 +6725,9 @@ def labeling_efficiency_analysis(self, i, parameters, results):
66806725
prop_r = props[1]
66816726
prop_tr = props[2]
66826727

6683-
# LE(A) = 2 * prop(AB) / (prop(B) + 2 * prop(AB))
6684-
# LE(B) = 2 * prop(AB) / (prop(A) + 2 * prop(AB))
6685-
le_target = prop_tr / (prop_r + prop_tr)
6686-
le_reference = prop_tr / (prop_t + prop_tr)
6728+
# SPINNA outputs proportions in terms of #molecules
6729+
le_target = prop_tr / (2 * prop_r + prop_tr)
6730+
le_reference = prop_tr / (2 * prop_t + prop_tr)
66876731

66886732
results["labeling_efficiency"] = {
66896733
parameters["target_name"]: le_target,

0 commit comments

Comments
 (0)