Genentech / gReLU

gReLU is a python library to train, interpret, and apply deep learning models to DNA sequences.
https://genentech.github.io/gReLU/
MIT License
221 stars 23 forks source link

Add ISM functions and update tutorial #29

Open lgunsalus opened 3 months ago

lgunsalus commented 3 months ago

This pull request adds ISM scoring to motifs.

  1. Updated src/grelu/interpret/motifs.py:

    • Added calculate_ism_weight function to compute ISM weights across the scan motif DataFrame.
  2. Updated src/grelu/visualize.py:

    • Added _moving_average function for calculating moving averages of arrays.
    • Added plot_motifs_on_ism function to visualize motifs on ISM data.
  3. Updated docs/tutorials/5_variant.ipynb:

    • Added examples of using the new functions.

Potential todo: draw motif logos on plot.

Testing: