Skip to main content

Machine learning augmented sample demultiplexing of pooled single-cell RNA-seq data

Project description

Logo

Machine learning augmented sample demultiplexing of pooled single-cell RNA-seq data


GitHub release (latest SemVer) GitHub release (latest SemVer)

DemuxNet is a computational tool for single-cell RNA sequencing (scRNA-seq) sample demultiplexing. It automates the process of assigning individual cells to their corresponding samples when multiple samples are pooled in a single sequencing run. DemuxNet predicts missing CMO (Cell Multiplexing Oligo) labels for barcodes with incomplete or missing information by leveraging machine learning algorithms. The tool works with sparse single-cell RNA expression matrices in RDS format and trains on known barcodes to predict sample identities for cells with missing or ambiguous CMO lables. For more information, please refer to our manuscript: [******].


Installation

Requirements

  • Python: Version 3.7 or higher is required to run DemuxNet.
  • GCC: Version 7 or higher is required to install dependencies, ensuring compatibility with the underlying R environment.

Install demuxnet from source code

git clone https://github.com/paddi1990/DemuxNet.git
cd DemuxNet
python setup.py install

Or, you can install it via pip

pip install demuxnet

Data preparation

DemuxNet takes a sparse single-cell expression matrix in RDS format as input. For the preprocessing of your single-cell RNA expression data into the required format, you can follow the steps below::

************
************
************
************
************

Usage

Once installed, DemuxNet can be run from the command line. The tool automatically detects the "CMO" keyword within barcode strings and uses this information for training. For barcodes that do not contain the "CMO" information, DemuxNet will predict and fill in the missing CMO class.

Command Line Usage

To run Demuxnet, use the following command:

demuxnet -i gene_expressioin_matrix.rds -model DNN -feature 6000 -out prediction.csv

This command reads the input expression matrix, selects the top 6000 non-sparse features, uses the DNN model for prediction, and outputs the predicted CMO labels into prediction.csv.

Parameters:

  • -i gene_expression_matrix.rds
    Path to the input file in RDS format, which contains the sparse single-cell RNA expression matrix. This matrix should have rows representing cells and columns representing gene expression levels.

  • -model DNN
    The machine learning model to use for predicting the CMO labels. Currently, the available model is DNN (Deep Neural Network), but other models may be supported in future versions.

  • -feature 6000
    The number of top features (genes) to use for training the model, selected based on non-zero counts in the expression matrix. This parameter determines the subset of genes used to train the model and should be tuned according to the dataset size and complexity.

  • -out prediction.csv
    The output file where the predicted CMO labels will be saved. The output will be a CSV file with two columns: "Barcode" and "Predicted CMO Label."


Model Training

DemuxNet employs a Deep Neural Network (DNN) architecture for training the model based on the provided input data. The training process involves:

  1. Data Splitting: The input dataset is split into training, validation, and test sets.
  2. Feature Selection: The top n features (genes) with the highest non-zero counts are selected for training the model.
  3. Model Training: A DNN model is trained using the selected features and corresponding CMO labels. Cross-entropy loss is used for multi-class classification tasks.
  4. Model Inference: The trained model is used to predict the missing CMO labels for the test set (i.e., barcodes with missing or ambiguous CMO labels).

Performance Metrics

  • Validation Accuracy: DemuxNet provides an accuracy score on the validation set to assess the model's performance.
  • Prediction: After training, the model performs inference on the test set and generates predictions for the missing CMO labels.

Visualization

To do


Contact

DemuxNet is maintained by Hu lab. For any questions or issues, please feel free to open an issue on the GitHub repository. If you use DemuxNet in your research, please cite *************************.


License

This project is licensed under the MIT License - see the LICENSE file for details.


Contributing

We welcome contributions! If you have suggestions or improvements, feel free to submit a pull request. For major changes, please open an issue to discuss what you would like to change.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

demuxnet-1.1.4.tar.gz (411.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

demuxnet-1.1.4-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file demuxnet-1.1.4.tar.gz.

File metadata

  • Download URL: demuxnet-1.1.4.tar.gz
  • Upload date:
  • Size: 411.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.13

File hashes

Hashes for demuxnet-1.1.4.tar.gz
Algorithm Hash digest
SHA256 c38f14b332eeb09a0c423a0d7e6ffacbf6562e6ec804adcd35e64f509ce27be5
MD5 5594146127816aa803018b68ccee088e
BLAKE2b-256 31e7ffa05d61563c5497eaf36387d1ac9f5263c47bf768a038ed4e51f3d8ca2b

See more details on using hashes here.

File details

Details for the file demuxnet-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: demuxnet-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.13

File hashes

Hashes for demuxnet-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 39d7bdd9f27d302be97dfb777550ab623a4b1498130cc39ba76e9d8a9ebe329c
MD5 911e6cc176e6f93cbfe651f5420e98b6
BLAKE2b-256 05954a777d2491ccf005e8b2ff0bc4943f05b1cfcc1642593a35f9a2fc0f2a7d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page