kipoi / kipoi-veff

Variant effect prediction plugin for Kipoi
https://kipoi.org/veff-docs
MIT License
6 stars 5 forks source link

indel support: predict_mutations_on_batch() #6

Open krrome opened 6 years ago

krrome commented 6 years ago

In analogy to predict_on_batch() kipoi_veff should enable a predict_mutations_on_batch() function that will use the inputs_ref, inputs_alt (inputs_ref_rc, inputs_alt_rc) keys returned from the MutationDatasetMixinobject to produce 2 (or 4) model prediction outputs.

This may be designed as a mixin for kipoi.model.Model classes:

class PredictMutationsMixin(object):
    def predict_mutations_on_batch(self, x):
        return [self.predict_on_batch(x[k]) for k in x if k.startswith("inputs_")]