Skip to main content

Python package for translating between single-cell count data with mouse and human genes using orthologs from biomart and HCOP.

Project description

PyPI - Downloads PyPI

mousipy

A python package that translates an AnnData single cell object from scanpy with mouse gene symbols into one with human gene symbols by mapping orthologs from biomart.

Why?

Many people just uppercase a mouse gene symbol to get the human ortholog in scRNA-seq data. This works in most cases, but fails for some. For example, there is no Cd8b gene in mice since the correct mouse ortholog to the human gene CD8B is Cd8b1. The gene CD8B is a defining marker for CD8+ T cells which would get lost by just uppercasing gene symbols but is correctly retained by mapping gene symbols with mousipy. Another example is CD16 (human gene FCGR3A), which has mouse ortholog Fcgr4.

Install

Just install via pip:

pip install mousipy

Usage example

import scvelo as scv
from mousipy import translate
adata = scv.datasets.pancreas()  # mouse scRNA-seq dataset
humanized_adata = translate(adata)

How it works

In mousipy/biomart are lists of mouse (GRCm39) and human (GRCh38.p13) orthologs exported from biomart. First, for all mouse gene symbols in adata.var_names we check if there is an ortholog in these lists. Then, for each mouse gene

  • if there is exactly one human ortholog, the gene symbol is translated directly
  • if there is an entry for that gene in the list explicitly mapping it to no ortholog, it will be discarded
  • if there are multiple different human orthologs, the gene's expression counts are added to all its orthologs
  • if the gene is not found in the list, we make it uppercase (and hope that that is the ortholog)

What is an ortholog?

Two genes in different species are called orthologs if they share a common ancestry. At some point in the past these genes must have underwent a specification event.

Does it make a difference?

TODO A delicious double pie plot should be here.

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

mousipy-0.1.7.tar.gz (2.9 MB view details)

Uploaded Source

Built Distribution

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

mousipy-0.1.7-py3-none-any.whl (3.0 MB view details)

Uploaded Python 3

File details

Details for the file mousipy-0.1.7.tar.gz.

File metadata

  • Download URL: mousipy-0.1.7.tar.gz
  • Upload date:
  • Size: 2.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for mousipy-0.1.7.tar.gz
Algorithm Hash digest
SHA256 e6ee6606139d942af3d034708c529e9333cb7b346921a7176191bca29cd00eda
MD5 ac1ad3d200c43c53250cd00b25bd6408
BLAKE2b-256 3565a6b9b9e9bce279f392eaefca69f3341e927fb3a750e69bd74eefe07e53bc

See more details on using hashes here.

File details

Details for the file mousipy-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: mousipy-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for mousipy-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 d1ffc9251c028c0b91ec50358d32885d9339db518c833163c577f1341b4a5a3f
MD5 6c63542ebdd21ef03a01eab49d162c26
BLAKE2b-256 263a291a86b926cba64bea85c1cfb13755e35c7da4cf0493b1d884309e4dbb08

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