VariantSpark
VariantSpark copied to clipboard
num Case/Control in JSON model file
Include number of samples from each class in the JSON model file.
I mean for each node
HI @ArashBayatDev I have added a new attribute classCounts to the JSON tree nodes, which is an array with the count of samples from each of the classes.
Also I have added a new method to the HAIL API to save the model json reprsentation.
An example how to do this is python/examples/chr21_GRCh38_hail.py
Essentially you need to call to_json() on the model object.
def to_json(self, filename, resolve_names = True):
""" Save the model JSON representation to a file. If `resolve_names` is set
includes the variable names as well as indexes in the output. This does however
incur performance penalty for creation of in-memory variable index.
:param str filename: The file to save the model to.
:param bool resolve_names: Resolve variable names in the saved JSON.
"""
This has been released to biospark v1.0.3