Giter Club home page Giter Club logo

scpml's Introduction

scPML: Pathway-based Multi-view Learning for Cell Type Annotation from Single-cell RNA-seq Data

A PyTorch implementation of scPML.

DOI

Requirements

  • R >= 4.2.1
  • python >= 3.8.12

Python package version

  • scikit-learn >= 1.0.2
  • numpy >= 1.23.3
  • pytorch >= 1.10.2
  • torch-geometric >= 2.0.3
  • networkx >= 2.8.4
  • pandas >= 1.4.3
  • scipy >= 1.9.1 We recommend upgrading all packages to the latest version.

Input Data

When using your own data, you have to provide:

  • the raw data matrix of training data and cells labels.
  • the raw data matrix of test data. Training and test data should share the same gene features.

For the sake of convenience, we use a directory tree to organize experiments and data:

-- proj_name
  -- raw_data
    -- ref
        data_1.csv
        label_1.csv
    -- query
        data_1.csv
  -- data
    -- ref
    -- query       

When using your own data, put raw training data matrix in the raw_data/ref/ and name it data_1.csv, raw training label in raw_data/ref/ and name it label_1.csv. Put the raw test data in the raw_data/query/ directory.

The data directory contains the pre-processed data. More details can be seen in the demo directory.

Run the demo

Similarity matrix construction

    cd demo
    Rscript ..\utils\get_sm.R seq_well_10x_v3    

Data preprocess

    Rscript ..\utils\pre_process.R seq_well_10x_v3
    python ..\utils\data_csv2h5.py --path=seq_well_10x_v3 --subpath=raw_data
    python ..\utils\data_csv2h5.py --path=seq_well_10x_v3 --subpath=data    

Run scPML

    python main.py

Output

The results will be stored in the result folder.

Reproducibility

We provide hyper-parameters for all experiements with a pickle file named hyper_parameters.pkl. The data is a dict. You can load the file by using pickle.

import pickle as pkl

with open('hyper_paramters.pkl', 'rb') as f:
    params = pkl.load(f)

scpml's People

Contributors

yanghanwu avatar kevis9 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.