Giter Site home page Giter Site logo

yanluocityu / moglam Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ouyang-dong/moglam

0.0 0.0 0.0 20.48 MB

MOGLAM is an end-to-end interpretable multi-omics integration method, which mainly consists of three modules: dynamic graph convolutional network with feature selection (FSDGCN), multi-omics attention mechanism (MOAM), and omic-integrated representation learning (OIRL).

Python 100.00%

moglam's Introduction

MOGLAM

With the rapid development and accumulation of high-throughput sequencing technology and omics data, many studies have conducted a more comprehensive understanding of human diseases from a multi-omics perspective. Meanwhile, graph-based methods have been widely used to process multi-omics data due to its powerful expressive ability. However, most existing graph-based methods utilize fixed graphs to learn sample embedding representations, which often leads to sub-optimal results. Furthermore, treating embedding representations of different omics equally usually cannot obtain more reasonable integrated information. In addition, the complex correlation between omics is not fully taken into account. To this end, we propose an end-to-end interpretable multi-omics integration method, named MOGLAM, for disease classification prediction. Dynamic graph convolutional network with feature selection is first utilized to obtain higher quality omic-specific embedding information by adaptively learning the graph structure and discover important biomarkers. Then, multi-omics attention mechanism is applied to adaptively weight the embedding representations of different omics, thereby obtaining more reasonable integrated information. Finally, we propose omic-integrated representation learning to capture complex common and complementary information between omics while performing multi-omics integration. Experimental results on three datasets show that MOGLAM achieves superior performance than other state-of-the-art multi-omics integration methods. Moreover, MOGLAM can identify important biomarkers from different omics data types in an end-to-end manner.

The workflow of MOGLAM method

The workflow of MOGLAM method

Introduction to code

The repository mainly includes the following datasets and .py files as shown below:

  1. BRCA dataset: Breast Invasive Carcinoma PAM50 Subtype Classification.

  2. The detailed .py files introduction are as follows:

    2.1 main_MOGLAM.py : This is the main function, we only run it to train the model, which can output the prediction performance on the test set, namely ACC, F1_weighted and F1_macro.

    2.2 train_test.py : In the train_test.py file, we define the prepare_trte_data function for reading datasets, the gen_trte_adj_mat function for calculating the initial patient similarity matrix, the train_epoch function for training the model and the test_epoch function for testing the model.

    2.3 models.py : In the models.py file, we define the GraphLearn class for adaptive graph learning, the GCN_E class for graph convolutional network learning, the Multiomics_Attention_mechanism class for multi-omics attention learning and the TransformerEncoder class for omic-integrated representation learning.

    2.4 layers.py : In the layers.py file, we mainly define the Attention class for self-attention learning, the FeedForwardLayer class for feedforward network learning, and make use of the EncodeLayer class to build query matrix, key matrix, value matrix and multi-head self-attention layers.

    2.5 utils.py : In the utils.py file, we mainly define the cosine_distance_torch function for cosine similarity calculation, the gen_adj_mat_tensor function for patient similarity matrix construction and the GraphConstructLoss function for adaptive graph structure loss learning.

    2.6 param.py : In the param.py file, we define the parameter_parser function for setting hyperparameters.

How to run the code

Although we build several .py files, running our code is very simple. More specifically, we only need to run main_MOGLAM.py to train the model, outputting prediction results. In addition, running our code requires utilizing PyTorch's deep learning framework under Python 3.8.

Environment Requirement

The code has been tested running under Python 3.8. The required packages are as follows:

  • torch == 1.12.1 (GPU version)
  • numpy == 1.23.5
  • pandas == 1.5.0
  • scikit-learn==1.1.2

Tutorial

For the step-by-step tutorial and a detailed introduction to defined classes and functions, please refer to: https://moglam.readthedocs.io/en/latest/

moglam's People

Contributors

ouyang-dong 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.