# kerasAC
keras accessibility models for genomic data 

## dependencies ## 
* pysam
* tiledb>=0.5.2
* psutil
* tables
* numpy>=1.9
* keras>=2.2
* h5py
* pandas
* pybigwig (I had had errors with the pip version, recommend bioconda:https://anaconda.org/bioconda/pybigwig)
* deeplift
* abstention
* boto3

## Installation ##

To install the module:

`pip install -e kerasAC`

## Model Inputs ##

kerasAC takes tiledb and hdf5 inputs generated by seqdataloader(https://github.com/kundajelab/seqdataloader)

profile models can be trained on tiledb databases generated by https://github.com/kundajelab/seqdataloader#dbingest

binned models can be trained from outputs generated by https://github.com/kundajelab/seqdataloader#labelgen or from outputs generated by https://github.com/kundajelab/seqdataloader#dbingest

See examples in seqdataloader repo (https://github.com/kundajelab/seqdataloader/tree/master/examples) for examples of input generation.  

Examples in the `examples` folder  utilize an ENCODE canonical cell line DNAse tiledb dataset, generated by this script: https://github.com/kundajelab/seqdataloader/blob/master/examples/dbingest/run_db_ingest.sh

## Commands ##
kerasAC provides the following commands:

### Preprocessing ###

#### kerasAC_loss_weights
Find the count and profile loss weights for a bpnet model from an input data set.
See example: https://github.com/kundajelab/kerasAC/blob/master/examples/bpnet_loss_weights/get_loss_weights.sh
Returns the counts loss and profile loss weights for a specific task.

### Training ###

#### kerasAC_train ####
Train a neural network.

Examples of training a binned model from an hdf5 input:
https://github.com/kundajelab/kerasAC/tree/master/examples/hdf5_train_examples

Examples of training bpnet on K562 DNase from tiledb input:
https://github.com/kundajelab/kerasAC/blob/master/examples/tiledb_train_examples/train.wrapper.sh

kerasAC_train takes the following inputs:



### Prediction ###

#### kerasAC_predict_hdf5 ####

#### kerasAC_predict_tdb ####

### keras_cross_validate ####

#### kerasAC_calibrate ####
Calibrates model's predictions using isotonic regression (for a regression model) or Platt scaling (for a classification model) 

### Performance Evaluation ### 

#### kerasAC_score ####

#### kerasAC_score_bpnet ####

#### kerasAC_curves ####

### Interpretation ###

#### kerasAC_interpret ####

#### kerasAC_plot_interpret ####



