Hello hail team,
I have a list of StructExpressions after running the random forest training following the gnomad variant qc code. In my list there are two structs generated that have values of None (rf_prediction=None).
INFO (gnomad.variant_qc.random_forest 334): Accuracy: 0.7340060415193779 [Struct(rf_prediction='FP', rf_label='FP', n=12516), Struct(rf_prediction='FP', rf_label='TP', n=708), Struct(rf_prediction='TP', rf_label='FP', n=256), Struct(rf_prediction='TP', rf_label='TP', n=44586), Struct(rf_prediction=None, rf_label='FP', n=12715), Struct(rf_prediction=None, rf_label='TP', n=7014)]
This causes the script to end with
File “/home/ubuntu/venv/lib/python3.6/site-packages/hail/expr/expressions/base_expression.py”, line 194, in impute_type
raise ExpressionException(“Hail cannot impute the type of ‘None’”)
hail.expr.expressions.base_expression.ExpressionException: Hail cannot impute the type of ‘None’
Is there a way to remove these values or update the None to zero to continue the execution of the code?