Skip to content

Commit

Permalink
Fix KeyError when the class is not str in pval
Browse files Browse the repository at this point in the history
  • Loading branch information
davidealbanese committed Jul 31, 2020
1 parent eb5ac51 commit 9f1c685
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mictools/pval.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ def pval_cmd(xvars_fn, null_fn, output_dir, labels_fn=None, target=None,

X, labels, Y = mictools.utils.read_data(xvars_fn, labels_fn, target,
yvars_fn)
null_dist = pd.read_csv(null_fn, sep='\t', index_col=[0, 1, 2])
null_dist = pd.read_csv(null_fn, sep='\t', dtype={'Class': str})
null_dist.set_index(['Class', 'BinStart', 'BinEnd'], inplace=True)

obs_dist, obs, pval = compute_pval(X=X,
null_dist=null_dist,
Expand Down

0 comments on commit 9f1c685

Please sign in to comment.