- changed status to resolved
KeyError when writing kappa to outfile after thresholding with concordant=False
Issue #38
resolved
When thresholding with concordant=False
(not passing -C/--concordant
) and also passing -k/--kappa_confusion_outfile
or calling kappa()
on the thresholded Dataset d
, we get the following error:
...
File "...\lib5c\tools\threshold.py", line 133, in threshold_tool
kappa_dict = kappa(d)
File "...\lib5c\algorithms\thresholding.py", line 182, in kappa
for cond in d.conditions}
...
KeyError: ('rep_significant', 'ES_Rep1')
This happens because under concordant=False
, final significance calls are never made on a per-rep level, and only exist on the per-condition level.
One alternative is to fall back to 'rep_significant_unfiltered'
which is always guaranteed to exist. Another alternative is to say this combination is not supported, but this is a little strange because it does occur in the default pipeline.
Comments (1)
-
reporter - Log in to comment
fixes
#38using the approach proposed in the issue→ <<cset 3be132ce55de>>