Code Monkey home page Code Monkey logo

methylnet's Introduction

MethylNet

Deep Learning with Methylation

MethylNet is a command line tool and python library that provides classes to handle deep learning tasks for methylation data. It is built off of pythonic MethylationArray data types introduced in (https://github.com/Christensen-Lab-Dartmouth/PyMethylProcess), and uses PyTorch to explore/make predictions on the methylation data.

Please check out our code ocean demo at: https://codeocean.com/capsule/5473199/

Featured in BMC Bioinformatics: https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-020-3443-8

Help docs: https://christensen-lab-dartmouth.github.io/MethylNet/

What MethylNet can do:

  1. Extract DNA Methylation Latent Space by training Variational Auto-encoders (VAE) after hyperparameter and neural network topology grid-search.

MethylNetPresentationSpring2019Lab 001 MethylNetPresentationSpring2019Lab 002 2. Make classification, single- and multi-output regression predictions on the methylation data such as age, cell type proportions, and disease state. This is done after transfer learning the VAE topology and a hyperparameter and neural network topology grid-search.

MethylNetPresentationSpring2019Lab 003 3. Find most important CpGs for predictions using SHAP, interpreting predictions on the individual and aggragated class level.

MethylNetPresentationSpring2019Lab 004 4. Interrogate these extracted CpGs using popular pipelines such as LOLA, gometh, GSEA and overlap CpGs with other known sets of CpGs. In addition, overlap top sets of CpGs with other CpGs of other predictions.

MethylNetPresentationSpring2019Lab 005

NOTE: Images will be updated to reflect latest set of MethylNet commands.

MethylNet is currently in review, Wiki page in progress. Biorxiv can be accessed at: https://www.biorxiv.org/content/10.1101/692665v1

Help docs: https://christensen-lab-dartmouth.github.io/MethylNet/

Install (Conda highly recommended, though Docker can be used):

  • conda create -n methylnet python=3.6
  • source activate methylnet
  • See install instructions for PyMethylProcess at https://github.com/Christensen-Lab-Dartmouth/PyMethylProcess
  • conda install pytorch torchvision -c pytorch
  • pip install methylnet
  • Alternative install: clone this repository and run python setup.py sdist bdist_wheel && pip install dist/methylnet-0.1.tar.gz
  • Run for GSEA collections: download_help_data
  • Alternative docker install: docker pull joshualevy44/methylnet:0.1
    * If looking to use only CPUs, only core docker or singularity needed, and see singularity website for information on how to pull Docker images
    * See https://singularity.lbl.gov/faq#does-singularity-support-containers-that-require-gpus for information on getting Singularity to work with GPUs
    * nvidia-docker is also the Docker equivalent to run GPU jobs
  • GPU usage is also possible through the base install (without Docker, or considering nvidia-docker options), provided that your machine has GPU access.

Running MethylNet:

  1. source activate methylnet
  2. Pre-processing pipeline: Instructions available at https://github.com/Christensen-Lab-Dartmouth/PyMethylProcess to go from 450K/850K IDATs to MethylationArray datatypes that can easily be learned from.
  3. Run embedding hyperparameter scan
  4. Choose top embedding hyperparameters and train one last time again
  5. Run prediction hyperparameter scan
  6. Choose top prediction hyperparameters and train one last time again
  7. Find top CpGs by running SHAP.
  8. Interrogate SHAP derived CpGs.
  9. See help-docs for usage.

Running Test Pipeline:

  1. docker pull joshualevy44/methylnet:0.1
  2. Alternative: sh docker_build.sh
  3. docker run -it joshualevy44/methylnet:0.1
  4. Alternative: sh run_docker.sh
  5. methylnet-test test_pipeline

Example of Running Pipeline:
See ./example_scripts for examples on how to explicitly run: 1 2 3 4 5 6 7 8 9

methylnet's People

Contributors

jlevy44 avatar

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.