Giter Club home page Giter Club logo

attntocrispr's Introduction

Overview

This project is intended to use deep learning models for Crispr-Cas on-target efficiency prediction and off target specificity prediction.

Below is the layout of the whole model.

AttnToMismatch_CNN

This model includes four components:

  • Embedding layer
  • Transformer layer
  • Convolutional neural network
  • Fully connected layer

AttnToCrispr_CNN

This model includes four components:

  • Embedding layer
  • Transformer layer
  • Convolutional neural network
  • Fully connected layer

Requirement

  1. if conda is used, the virtual environment can be created with:
conda env create -f environment.yml
  1. required packages
  • keras
  • tensorflow
  • pytorch
  • sklearn
  • pandas
  • numpy
  • skorch
  • visdom
  • shap

Usage

Specify which data or model to use, such as cpf1 and cpf1_OT.

python ./attn_to_crispr.py <data/model>

<data/model> could be K562/A549/NB4/cpf1/cpf1_OT/deepCrispr_OT

Training new model with customized dataset

a. Off target prediction on customized dataset

  1. Organize dataset format as the example dataset in dataset/customized_Cas9_OT
  2. Save the new dataset as dataset/customized_Cas9_OT/customized_Cas9_OT_data.csv
python flexible_OT_crispr.py customized_Cas9_OT
  1. Optional: Specify training-testing split methods: change split_method in "models/customized_Cas9_OT/config.py":
  • "regular" for n-fold split
  • "stratified" for leave sgRNAs out split

b. Update: support on target prediction on customized dataset without only sgRNA sequence features

  1. Organize dataset format as the example dataset in dataset/customized_Cas9_ontar
  2. Save the new dataset as dataset/customized_Cas9_OT/customized_Cas9_ontar_data.csv
  3. make sure the extra_numerical_features variable in "models/customized_Cas9_ontar/config.py" file is extra_numerical_features = [], this indicates no extra features are added besides sgRNA sequence features
python crispr_attn.py customized_Cas9_ontar

attntocrispr's People

Contributors

qiaoliuhub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

attntocrispr's Issues

Cpf1 weights of pre-trained model

Thank you for sharing your code.
Can you please provide the saved weights of your model trained on the Cpf1 dataset?
The model saved in models/cpf1 seems to give bad results (high mse, low correlation coefficients).
Also, to use the saved model, I set config.training = False, and config.retraining = True, is this correct?

Best,

How to apply the pre-trained models on customized dataset?

The tools of efficiency and specificity prediction for Cas12 are quite limited compared with Cas9. Thank you for the great tool which fills up this gap.

As some pre-trained models are available in the folder models/, I'm wondering how to apply them to my own dataset?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.