Skip to main content

Single-cell RNA Sequencing Analysis

Reason this release was yanked:

Outdated, issues with wheels

Project description

Metacells - Single-cell RNA Sequencing Analysis

Build Status Documentation Status

The metacells package implements the improved metacell algorithm [1] for single-cell RNA sequencing (scRNA-seq) data analysis within the scipy https://www.scipy.org/ framework. The original metacell algorithm [2] was implemented in R. The python package contains various algorithmic improvements and is scalable for larger data sets (millions of cells).

Metacell Analysis

Naively, scRNA_seq data is a set of cell profiles, where for each one, for each gene, we get a count of the mRNA molecules that existed in the cell for that gene. This serves as an indicator of how “expressed” or “active” the gene is.

As in any real world technology, the raw data may suffer from technical artifacts (counting the molecules of two cells in one profile, counting the molecules from a ruptured cells, counting only the molecules from the cell nucleus, etc.). This requires pruning the raw data to exclude such artifacts.

The current technology scRNA-seq data is also very sparse (typically <<10% the RNA molecules are counted). This introduces large sampling variance on top of the original signal, which itself contains significant inherent biological noise.

Analyzing scRNA-seq data therefore requires processing the profiles in bulk. Classically, this has been done by directly clustering the cells using various methods.

In contrast, the metacell approach groups together profiles of the “same” biological state into groups of cells of the “same” biological state, with the minimal number of profiles needed for computing robust statistics (in particular, mean gene expression). Each such group is a single “metacell”.

By summing profiles of cells of the “same” state together, each metacell greatly reduces the sampling variance, and provides a more robust estimation of the transcription state. Note a metacell is not a cell type (multiple metacells may belong to the same “type”, or even have the “same” state, if the data sufficiently over-samples this state). Also, a metacell is not a parametric model of the cell state. It is merely a more robust description of some cell state.

The metacells should therefore be further analyzed as if they were cells, using additional methods to classify cell types, detect cell trajectories and/or lineage, build parametric models for cell behavior, etc. Using metacells as input for such analysis techniques should benefit both from the more robust, less noisy input; and also from the (~100-fold) reduction in the number of cells to analyze when dealing with large data (e.g. analyzing millions of individual cells).

Installation

In short: pip install metacells. If you do not have sudo privileges, you might need to pip install --user metacells. Note that metacells requires many “heavy” dependencies, most notably numpy, pandas, scipy, scanpy, which pip should automatically install for you.

Note that metacells only runs natively on Linux and MacOS. To run it on a Windows computer, you must activate Windows Subsystem for Linux and install metacells within it.

The metacells package contains extensions written in C++. The metacells distribution provides pre-compiled Python wheels for both Linux and MacOS, so installing it using pip should not require a C++ compilation step.

Note that for X86 CPUs, these pre-compiled wheels were built to use AVX2 (Haswell/Excavator CPUs or newer), and will not work on older CPUs which are limited to SSE. Also, these wheels will not make use of any newer instructions (such as AVX512), even if available. While these wheels may not the perfect match for the machine you are running on, they are expected to work well for most machines.

To see the native capabilities of your machine, you can grep flags /proc/cpuinfo | head -1 which will give you a long list of supported CPU features in an arbitrary order, which may include sse, avx2, avx512, etc. You can therefore simply grep avx2 /proc/cpuinfo | head -1 to test whether AVX2 is/not supported by your machine.

You can avoid installing the pre-compiled wheel by running pip install metacells --install-option='--native'. This will force pip to compile the C++ extensions locally on your machine, optimizing for its native capabilities, whatever these may be. This will take much longer but may give you faster results (note: the results will not be exactly the same as when running the precompiled wheel due to differences in floating-point rounding). Also, this requires you to have a C++ compiler which supports C++14 installed (either g++ or clang). Installing a C++ compiler depends on your specific system; if you are using conda, CONDA_BUILD=1 conda activate mc2 should work.

Releases

0.5 - First published version

0.6 - More robust graph partition, allow forcing feature genes, rename “project” to “convey” to prepare for addition of atlas projection functionality

Vignettes

The generated documentation contains the following vignettes: Basic Metacells Vignette, Manual Analysis Vignette, and Seurat Analysis Vignette.

You can also access their very latest version in the Github repository.

References

Please cite the references appropriately in case they are used:

License (MIT)

Copyright © 2020, 2021 Weizmann Institute of Science

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

metacells-0.6.tar.gz (297.8 kB view details)

Uploaded Source

Built Distributions

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

metacells-0.6-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (4.1 MB view details)

Uploaded PyPymanylinux: glibc 2.12+ x86-64

metacells-0.6-pp37-pypy37_pp73-macosx_10_9_x86_64.whl (4.4 MB view details)

Uploaded PyPymacOS 10.9+ x86-64

metacells-0.6-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (77.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.12+ x86-64

metacells-0.6-cp39-cp39-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

metacells-0.6-cp39-cp39-macosx_10_9_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

metacells-0.6-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (78.2 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.12+ x86-64

metacells-0.6-cp38-cp38-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

metacells-0.6-cp38-cp38-macosx_10_9_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

metacells-0.6-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (74.2 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.12+ x86-64

metacells-0.6-cp37-cp37m-macosx_10_9_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

Details for the file metacells-0.6.tar.gz.

File metadata

  • Download URL: metacells-0.6.tar.gz
  • Upload date:
  • Size: 297.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/56.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5

File hashes

Hashes for metacells-0.6.tar.gz
Algorithm Hash digest
SHA256 f4c91d89c2cd30dc5d0833463e44751ca02c329b177ea47ad2bcd3e97864a858
MD5 04cb2205e1115634787a847e67f61c7b
BLAKE2b-256 a557746d0469e1ab0158d183534e4edca2111e1677b80b6843413ad8463fa165

See more details on using hashes here.

File details

Details for the file metacells-0.6-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for metacells-0.6-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 eb33443ee713a6ded715bbfff81d0ad3f8cb2aa5416d7b27c41e64459d6f7741
MD5 b0a472917320681381a211b5602d73a7
BLAKE2b-256 f3c207e4ac14d0c24aa7ccea3060f704fa5603cd61dc2be1338e3c697a356151

See more details on using hashes here.

File details

Details for the file metacells-0.6-pp37-pypy37_pp73-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: metacells-0.6-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 4.4 MB
  • Tags: PyPy, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/56.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5

File hashes

Hashes for metacells-0.6-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f9a23daa2a3f27c51563c478752c4111335d583d8b0aebdaffcb4c40fd9f818c
MD5 9276978c47d2c603f24d74003b0dce84
BLAKE2b-256 522a2eba3a7a6f0c2cfb8c4780a47a2622166585034244926254700da955cd0c

See more details on using hashes here.

File details

Details for the file metacells-0.6-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for metacells-0.6-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 835d3dd1899c7ed79102ad4577f7e1b23a321aa35cef02b8f1fb8835f56b3c46
MD5 b51f1363a641a83cdc1603e673009ff6
BLAKE2b-256 c6ea7f20588e38b781e659065c1539ae4c6caa10bae57548f752db4a8388f76b

See more details on using hashes here.

File details

Details for the file metacells-0.6-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

  • Download URL: metacells-0.6-cp39-cp39-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 5.2 MB
  • Tags: CPython 3.9, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/56.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5

File hashes

Hashes for metacells-0.6-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f732ff117cb7df1b41eb1b773ce44fe8d2fc1cf1f65386886de1151e5fc35ccc
MD5 5f553a6487d35d128878e5cee9d379f4
BLAKE2b-256 3c4351637e5bf06e8ede32cc14e9593f0d8bcb1b5837cfc04744b6cc142a61f6

See more details on using hashes here.

File details

Details for the file metacells-0.6-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: metacells-0.6-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 5.4 MB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/56.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5

File hashes

Hashes for metacells-0.6-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 28505ba99207cd9c5b841295c663963225dcfc13ccbd12aae16666243fa84e55
MD5 a9b259943523d7dcee1d13e012e309d8
BLAKE2b-256 b05bdc92d5edcc7dd2735847b9a2a685e391780cdb4fe5317bfce7df211f5916

See more details on using hashes here.

File details

Details for the file metacells-0.6-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for metacells-0.6-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 0b4470f3c1d8ffb6cd31a785d4d47daca3437bf54ca1065e86c55d8043450e14
MD5 fa9c50290348d4c066db6a465d3d0bbd
BLAKE2b-256 e15c8ad2d43c1493e0fb353c42edad8b1c72bd2c2ef2029fe8a817426902dec7

See more details on using hashes here.

File details

Details for the file metacells-0.6-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

  • Download URL: metacells-0.6-cp38-cp38-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 5.2 MB
  • Tags: CPython 3.8, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/56.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5

File hashes

Hashes for metacells-0.6-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 77dd3ed16e355a67e0975f6d6af90f71aa042588fd5ebda3f1f7d90395e765fe
MD5 88ea5f90577713b890fd6d0732914adf
BLAKE2b-256 c8124542a65400bba07f8205536390caece5b6adb32876ce7ed2a0c1dcd3701c

See more details on using hashes here.

File details

Details for the file metacells-0.6-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: metacells-0.6-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 5.4 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/56.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5

File hashes

Hashes for metacells-0.6-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 42b6dca5845eda60a95c8b02944d6b29549a25a2b0b2cf9d50f83b04a60c716a
MD5 699e6dc78ae57b3ff3f21c3b72954faf
BLAKE2b-256 b8f131eb12f0f9229d12ae8b1aeedebef84dd466ac0df3dfb75be81e780a285e

See more details on using hashes here.

File details

Details for the file metacells-0.6-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for metacells-0.6-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 369798d81a4fc75b75e89675ad8e351606253404e83fad3530ba9ac413c2e5c7
MD5 00f6a09661cfa292fdbea88d499b03c7
BLAKE2b-256 4aef78f7b2c7ee8bff9b30e733311713589dabfdca64b0a26b12b1d683022719

See more details on using hashes here.

File details

Details for the file metacells-0.6-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: metacells-0.6-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 5.1 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/56.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5

File hashes

Hashes for metacells-0.6-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8d36eaf577e570a87700ffcb5666201b48b9114c666664b60e18a2aac1e8cab0
MD5 603c100a6ba73809b1e989d379cfedef
BLAKE2b-256 a8d8e1170450e7fa2f44ecbf2463468a480644ea53253ce9e6d86b93a3460b75

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