Giter VIP home page Giter VIP logo

scmmae's Introduction

scMMAE

A cross-attention network based on masked autoencoder called single-cell multimodal masked autoencoder Image text

Prerequisite

  • python 3.11.9
  • timm 1.0.7
  • pytorch 2.3.1
  • cudnn 8.9.2.26
  • scanpy 1.10.2
  • anndata 0.10.8
  • scikit-learn 1.5.1

The above packages are the main packages used for the experiment, most 2.0+ torch environments can run the experiment directly, just in case we have provided a ./requirements.txt file for all packages.

Getting started

If you want to use your own datasets in scMMAE, you should change six parameters:
config.RNA_tokens = config.RNA_component * config.emb_RNA, RNA_tokens represents the gene number you used (I used 4000 highly variable genes), and config.emb_RNA needs to be divisible by head numbers;
config.ADT_tokens = config.ADT_component * config.emb_ADT, ADT_tokens represents the protein number you used (I used all proteins), and config.emb_ADT needs to be divisible by head numbers.

Important

The input data is two matrix (RNA: cell_numbers*1*gene_numbers, PROTEIN:cell_numbers*1*protein_numbers). In addition, input data should be normalized before running the model.

Example

Use Anaconda to create a Python virtual environment. Here, we will create a Python 3.11 environment named scMMAE

conda create -n scMMAE python=3.11.9

Install packages

pip install -r requirements.txt

You can run ./scMMAE/code/stage1.py, and ./scMMAE/code/stage2.py directly as long as you unrar the dataset in the ./scMMAE/dataset/CITE-seq/*.rar ,and ./scMMAE/dataset/RNA-seq/*.rar.
Then you can run ./scMMAE/code/tutorial.ipynb to reproduce the results for IFNB scRNA-seq dataset and you should ideally comment out the training code at these stages. Of note, due to the large size of the dataset, we have uploaded a rar archive inside the dataset folder, which you will need to extract to the current directory.

Weighted Model

If you need pretrained and fine-tuned model for the dataset in the experiment, please contact [email protected]

scmmae's People

Contributors

dm0815 avatar

Stargazers

 avatar Kaishen Yuan avatar

Watchers

 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.