Skip to content

Instantly share code, notes, and snippets.

View AvantiShri's full-sized avatar

Av Shrikumar AvantiShri

View GitHub Profile
@AvantiShri
AvantiShri / ism_code.py
Last active August 1, 2020 21:44
Code for running In-Silico Mutagenesis (ISM)
"""
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
@AvantiShri
AvantiShri / dimo_pwm_viz.ipynb
Last active October 4, 2018 18:02
DiMO_PWM_Viz.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AvantiShri
AvantiShri / yamda-test.ipynb
Created August 5, 2018 22:20
YAMDA test.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AvantiShri
AvantiShri / homer-test.ipynb
Created August 5, 2018 22:01
HOMER test.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AvantiShri
AvantiShri / revcomp_weightsharing_setup.py
Last active June 1, 2018 15:05
Reverse-complement Weight Sharing Model Setup
#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,