This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install keras from https://github.com/kundajelab/keras/tree/keras_1 | |
from __future__ import print_function | |
import keras | |
import numpy as np | |
np.random.seed(1) | |
#build a sample model | |
model = keras.models.Sequential() | |
model.add(keras.layers.convolutional.RevCompConv1D(input_shape=(100,4), | |
nb_filter=10, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Author: Avanti Shrikumar | |
Here's a gist containing code to run in-silico mutagenesis (ISM) | |
on a model that takes one-hot encoded DNA sequence as the input. The | |
ISM score at a base is the prediction when that base is | |
present minus the average prediction across all 4 possible bases at | |
at that position. | |
"prediction_func" needs to be a function that maps one-hot encoded sequence |