You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JSON does not support serializing values of "infinity". Trying to do so results in errors on the client, server, or both.
When a GWAS file has a value of infinity in these columns, plots of that region fail to render with a 500 Internal Server Error (see screenshot) because the backend json serializer fails.
Proposed fix
We already special-case serialization of these values for the neg_log_pvalue field. Similar treatment of beta and stderr_beta should alleviate this error. This should be tested on a real dataset, in case there are follow on problems (UI etc) when displaying plot tooltips with inf values.
Many GWAS programs suffer from underflow and may represent small p=0/-logp=inf
The JSON standard can't handle "Infinity", but the string 'Infinity' can be type-coerced by JS, eg +value
Therefore we serialize this as a special case so it can be used in the frontend
"""
value=row.neg_log_pvalue
ifvalueisnotNoneandmath.isinf(value):
return'Infinity'
else:
returnvalue
We've seen several reports of this problem recently, after a long period of none. It's possible that a new GWAS program has been released that is prone to under/overflow, which might make this a higher priority for users in the future.
The text was updated successfully, but these errors were encountered:
abought
changed the title
500 errors for datasets with "inf" values for Beta or std_err_beta
Internal server (500) errors for datasets with "inf" values for Beta or std_err_beta
Feb 22, 2024
Summary
JSON does not support serializing values of "infinity". Trying to do so results in errors on the client, server, or both.
When a GWAS file has a value of infinity in these columns, plots of that region fail to render with a 500 Internal Server Error (see screenshot) because the backend json serializer fails.
Proposed fix
We already special-case serialization of these values for the neg_log_pvalue field. Similar treatment of beta and stderr_beta should alleviate this error. This should be tested on a real dataset, in case there are follow on problems (UI etc) when displaying plot tooltips with inf values.
locuszoom-hosted/locuszoom_plotting_service/api/serializers.py
Lines 46 to 61 in d726fb2
We've seen several reports of this problem recently, after a long period of none. It's possible that a new GWAS program has been released that is prone to under/overflow, which might make this a higher priority for users in the future.
The text was updated successfully, but these errors were encountered: