Hi Hail team,
I am trying to get a histogram with log scale in Y-axis using the code as below.
hist=hl.plot.histogram(mt.variant_qc.call_rate, bins = 50, legend='call-rate',title='variant level call-rate distribution',log=True)
When I ran the code without a ‘log’ parameter, it worked well. But after adding a ‘log’ parameter, it gave me an error like this.
421 if log:
--> 422 data.bin_freq = [math.log10(x) for x in data.bin_freq]
423 data.n_larger = math.log10(data.n_larger)
424 data.n_smaller = math.log10(data.n_smaller)
/opt/conda/miniconda3/lib/python3.8/site-packages/hail/utils/struct.py in __setattr__(self, key, value)
63 def __setattr__(self, key, value):
64 if key in self._fields:
---> 65 raise ValueError("Structs are immutable, cannot overwrite a field.")
66 else:
67 super().__setattr__(key, value)
ValueError: Structs are immutable, cannot overwrite a field.
Please let me know how to solve it. Thank you.
-Jina