Example #1
0
 def read_json(cls, fname):
     """
     Read graph from json file.
     """
     gpm = GenotypePhenotypeMap.read_json(fname)
     return cls(gpm)
def load(name):
    """Loads a provide dataset."""
    fname = "{}.json".format(name)
    fpath = get_dataset_path(fname)
    gpm = GenotypePhenotypeMap.read_json(fpath)
    return gpm
Example #3
0
 def read_csv(cls, fname, wildtype, mutations=None):
     """Read graph from csv file."""
     gpm = GenotypePhenotypeMap.read_json(fname,
                                          wildtype=wildtype,
                                          mutations=mutations)
     return cls(gpm)