The function run_modisco currently calculates that attributions that are fed to modisco with:
attrs = -np.log2(np.divide(ism_preds, ref_preds))
This runs into issues, however, if there are negative values involved. A fix could be:
ref_preds_safe = np.where(ref_preds == 0, np.finfo(float).eps, ref_preds)
division_result = np.divide(ism_preds, ref_preds_safe)
division_result_safe = np.where(division_result <= 0, np.finfo(float).eps, division_result)
attrs = -np.log2(division_result_safe)
More intelligently, however, for someone better with numpy arrays would be to take the absolute values for ism_preds and then re-assign negative values after the fact (or some how otherwise scaling)