Skip to main content

ember: Entropy Metrics for Biological ExploRation

Project description

ember

ember is a python and command line tool that can identify highly specific genes to a given partition (e.g., Age, Genotype, Cell type, etc.) in high-dimentional single cell RNA sequencing data. For an overview of how ember works, refer to the ember guide (slides).

ember in a nutshell

For a hands on tutorial, check out this collab notebook.

Installation

You can install the package from github using pip:

pip install git+https://github.com/pachterlab/ember.git

We reccommned using ember in a fresh conda environment to avoid depnendency issues:

conda create -n ember_env python=3.10
conda activate ember_env
pip install git+https://github.com/pachterlab/ember.git

Import in python/Jupyter

import ember_py

Import specific function in python/Jupyter

from ember_py.light_ember import light_ember
from ember_py.generate_pvals import generate_pvals
from ember_py.plots import plot_partition_specificity, plot_block_specificity, plot_sample_counts, plot_psi_blocks
from ember_py.top_genes import highly_specific_to_block, highly_specific_to_partition, non_specific_to_partition

Run in commandline

ember --help

An example workflow in commandline

#Run full workflow with 4 cores to find genes that are specific to Genotype in a given dataset
ember light_ember test_adata_cwc22.h5ad Genotype ~/output/ --sample_id_col Mouse_ID --category_col Genotype --condition_col Sex --n_cpus 4

#You find that Cwc22 is expressed highly in the mouse genotype WSBJ so you want to generate p-values for psi_WSBJ
ember generate_pvals test_adata_cwc22.h5ad Genotype ~/output/ ~/output Mouse_ID Genotype Sex --block_label WSBJ --n_cpus 4

#Extract marker genes for WSBJ mice
ember highly_specific_to_block Genotype WSBJ pvals_entropy_metrics_Genotype_WSBJ.csv output/ --psi_thresh 0.6 --psi_block_thresh 0.7

# Find genes that are non-specific by genotype
ember non_specific_to_partition Genotype pvals_entropy_metrics_Genotype.csv output/ --psi_thresh 0.6 --zeta_thresh 0.2

#Visualize which genes are most and least specfic to Genotype
ember plot_partition_specificity Genotype ~/output/pvals_entropy_metrics_Genotype_WSBJ.csv ~/output/

#Visualize which genes are most specfic to the genotype WSBJ and highlight Cwc22 to see how good a marker it is compared to the other genes
ember plot_block_specificity Genotype WSBJ ~/output/pvals_entropy_metrics_Genotype_WSBJ.csv ~/output/ --highlight_genes Cwc22

#See how specific Cwc22 is to the other genotypes in your experiment. And increase font size to 30 so your advisor can see better!
ember plot_psi_blocks Cwc22 Genotype ~/output/Psi_block_df/ ~/output/ --fontsize 30

#Remind yourself how many individuals there are with the genotype WSBJ in your dataset compared to the other genotypes. Generate a descriptive plot of your whole experimental design to put things in persepctive. 
ember plot_sample_counts test_adata_cwc22.h5ad ~/output Mouse_ID Genotype Sex 

Documentation

For more detailed information, refer to the official documentation.

License

This project is licensed under the BSD-2 License.

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

ember_py-0.1.0.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

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

ember_py-0.1.0-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

Details for the file ember_py-0.1.0.tar.gz.

File metadata

  • Download URL: ember_py-0.1.0.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for ember_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cc945de484e29ddcd7d7627aa01810af72ed03df1226a84024be173fa4a19db4
MD5 e2b6e7dea6b2b3108ef734fb7c442339
BLAKE2b-256 d0fbbaac166063592296d38cb35be5cf5501680115ee6301c8dccaeec39751f3

See more details on using hashes here.

File details

Details for the file ember_py-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ember_py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 31.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for ember_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2534765e9a8c7c95cd17dd241083af2e0e8f326f0087b592c11c7d146665fb9b
MD5 7be89bddb3dde633e444d144524aad8d
BLAKE2b-256 90512486060e7aea018c336d5fac68e1c48a973f027b733659b24724d4b2aad5

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