rstoolbox.io.parse_rosetta_json

rstoolbox.io.parse_rosetta_json(filename)

Read a json formated rosetta score file.

Only reads back scores, as those are the only content present in a JSON file.

Parameters:filename (str) – File containing the Rosetta score file.
Returns:DesignFrame.

Note

To be coherent with the silent files, the decoy id column name decoy is changed to description.

Raises:
IOError:if filename cannot be found.

Example

In [1]: from rstoolbox.io import parse_rosetta_json
   ...: import pandas as pd
   ...: pd.set_option('display.width', 1000)
   ...: pd.set_option('display.max_columns', 500)
   ...: df = parse_rosetta_json("../rstoolbox/tests/data/score.json.gz")
   ...: df.head(2)
   ...: 
Out[1]: 
                                                                 decoy  BUNS  B_ni_mtcontacts  B_ni_rmsd  B_ni_rmsd_threshold  B_ni_trials  GRMSD2Target  GRMSD2Template  LRMSD2Target  LRMSDH2Target  LRMSDLH2Target    cav_vol  design_score  dslf_fa13      fa_atr      fa_dun     fa_elec  fa_intra_rep  fa_intra_sol_xover4     fa_rep      fa_sol  hbond_bb_sc  hbond_lr_bb   hbond_sc  hbond_sr_bb  linear_chainbreak  lk_ball_wtd      omega  overlap_chainbreak    p_aa_pp  packstat  pro_close  rama_prepro      ref  rmsd_drift       score  time  total_score  yhh_planarity
0  classicFFL_FFL_nobinder_motif_DesignRelax_noaa_29791_3lhp_0001_0001  8.0   53.0             0.291      5.0                  1.0          2.128         1.384           5.677         5.456          4.055           54.915001 -324.091003    0.0       -732.738583  149.235184 -275.543411  1.253973      31.280262            88.357561  543.389595 -4.686393     0.0         -40.850708 -103.520765   0.0               -3.588010     16.715420  0.0                -13.705695  0.671     0.053718  -15.905666   -8.2126   1.351      -368.466125  2.0  -368.466111   0.000006     
1  classicFFL_FFL_nobinder_motif_DesignRelax_noaa_29791_3lhp_0002_0001  8.0   57.0             0.511      5.0                  1.0          2.191         1.511           4.861         4.851          3.422           36.127998 -317.862000    0.0       -716.137088  126.224330 -245.466147  1.222102      25.186641            91.580503  494.009360 -6.161016     0.0         -29.839765 -103.311769   0.0               -4.324106     18.509592  0.0                -16.786566  0.638     0.115256  -18.818651    16.0042  1.299      -367.993103  0.0  -367.993094   0.000030