The following script was run using a conda environment. Below you can find how to create the same environment

Load utils and necessary functions

Load the data

(to be used to initialize DeepExplainer)

Load the model

Create random sequences

(or) Create random sequences by shuffling a given sequence.

(Length of the given sequence should be the same size you used for the model, which is 500bp in this case)

(or) Create random sequences that follow the GC-content of the given fasta sequences

Here you generate synthetic sequence by in silico evolution.

region: initial regions to be evolved (random or genomic)
model: selected deep learning model
class_no: chosen class to direct the sequence evolution
n_mutation: number of iterative mutations to perform
As an output mutation_pred contains the prediction scores after each mutation and mutation_loc contains the location and substitute of each mutation

Load the saved file

Plot the prediction score change (each sequence as a line)

Plot the prediction score distribution after each mutation

Plot prediction of a sequence at different steps

Plot deepexplainer and saturation mutagenesis of the selected step

Convert created sequence to letters