The API response payload from the AssociationLZ endpoint is subtly different if no data can be returned. Specifically, it has different (or excluded) fields. At first glance, the alternative field names resemble the underlying database column identifiers.
This causes LocusZoom demo plots to break when encountering a region with no data, because it cannot find the expected columns at all.
Estimated impact
Base behavior
Low impact. Fortunately our internal datasets are quite rich, and this scenario is rarely encountered in demos.
The main impact is for anyone using our API as a reference implementation for custom LZ plots. For example, the Broad encountered the same error until they standardized their API responses.
Side effects
Looking at the code, variant_name appears to be the raw database column name. The bug may affect other things that use shared code; worth a look in the future.
Description
The API response payload from the AssociationLZ endpoint is subtly different if no data can be returned. Specifically, it has different (or excluded) fields. At first glance, the alternative field names resemble the underlying database column identifiers.
This causes LocusZoom demo plots to break when encountering a region with no data, because it cannot find the expected columns at all.
Estimated impact
Base behavior
Low impact. Fortunately our internal datasets are quite rich, and this scenario is rarely encountered in demos.
The main impact is for anyone using our API as a reference implementation for custom LZ plots. For example, the Broad encountered the same error until they standardized their API responses.
Side effects
Looking at the code,
variant_name
appears to be the raw database column name. The bug may affect other things that use shared code; worth a look in the future.Sample cases
A query for a region in which data is present. Note the presence of an array field, "variant". https://portaldev.sph.umich.edu/api/v1/statistic/single/results/?filter=analysis%20in%2045%20and%20chromosome%20in%20%20%272%27%20and%20position%20ge%20242000000%20and%20position%20le%20242005000
Compare to a query from a narrower region (which substantially overlaps the above) in which no data is available. https://portaldev.sph.umich.edu/api/v1/statistic/single/results/?filter=analysis%20in%2045%20and%20chromosome%20in%20%20%272%27%20and%20position%20ge%20242023897%20and%20position%20le%20242025881