Mutation

Mutation(self, model, model_input, scores=['diff'], score_kwargs=None, batch_size=32, output_sel_fn=None, id_value=0, category_axis=1, test_ref_ref=False)

ISM for working with one-hot encoded inputs.

Arguments

  • model: Kipoi model
  • model_input: which model input to mutate
  • scores: a list of score names or score instances
  • batch_size: batch size for calls to prediction. This is independent from the size of batch used with the score method.
  • score_kwargs: Initialisation keyword arguments for scores. If not None then it is a list of kwargs dictionaries of the same length as scores
  • output_sel_fn: Function used to select a model output. Only the selected output will be reported as a return value.
  • id_value: Which value to use for the identity
  • category_axis: Dimension in which the the one-hot category is stored. e.g. for a one-hot encoded DNA-sequence array with input shape (1000, 4) for a single sample, category_axis is 1, for (4, 1000) category_axis is 0. In the given dimension only one value is allowed to be non-zero, which is the selected one.
  • test_ref_ref: Also perform ISM on the positions where the input data has a 1 already.

kipoi_interpret.importance_scores.ism_scores

Ref

Ref(self, rc_merging='mean')

ref - Ref. allele prediction

Alt

Alt(self, rc_merging='mean')

alt - Alt. allele prediction

Diff

Diff(self, rc_merging='mean')

diff - Prediction difference: diff = p_alt - p_ref

LogitRef

LogitRef(self, rc_merging='mean')

logit_ref - Ref. allele prediction on the logit scale: np.log(p_alt / (1 - p_alt ))

LogitAlt

LogitAlt(self, rc_merging='mean')

logit_alt - Alt. allele prediction on the logit scale: np.log(p_alt / (1 - p_alt ))

Logit

Logit(self, rc_merging='mean')

logit - Compute the difference on the logit scale: logit_diff = log(p_alt / (1 - p_alt )) - log(p_ref / (1 - p_ref ))

DeepSEA_effect

DeepSEA_effect(self, rc_merging='mean')

deepsea_effect - Score used by DeepSEA: abs(logit_diff) * abs(diff)