Skip to main content

samap-extension

SAMap cross-species analysis and plotting tools for CDBL.

This package provides plotting and analysis utilities that wrap SAMap outputs. It is a companion to lab-core-python and is kept as a separate package because SAMap requires a tightly pinned Python 3.9 environment that is incompatible with labcore's general-purpose dependency stack.

Requirements

This package has no declared pip dependencies and must be installed into a pre-configured SAMap conda environment. See environment_samap.yml for the full environment specification.

Both this package and lab-core-python must be installed into the SAMap environment using --no-deps:

# 1. Create and activate the SAMap environment
conda env create -f environment_samap.yml
conda activate samap

# 2. Install lab-core-python (no deps — scanpy etc. already in env)
pip install --no-deps git+https://github.com/[your-github-username]/lab-core-python.git
# or in editable mode:
pip install --no-deps -e /path/to/lab-core-python

# 3. Install this package
pip install --no-deps git+https://github.com/[your-github-username]/samap-extension.git
# or in editable mode:
pip install --no-deps -e /path/to/samap-extension

Package structure

labcore_integration/
├── __init__.py
└── plotting.py     # Sankey, square scatter, joint UMAP, expression overlap

Quick start

from samap_extension import plotting as splt

# Joint UMAP coloured by species
fig, ax = splt.square_scatter(sm, COLORS={"ml": "#377EB8", "sm": "#E41A1C"})

# Joint UMAP highlighting one species' cell-type labels
fig, ax = splt.plot_joint_umap(sm, species="ml", label_col="neural_cluster")

# Sankey diagram (2 or 3 species)
sankey = splt.sankey_plot_3(MappingTable, species_order=["sm", "ml", "sc"])

# Expression overlap for a gene pair
splt.save_expression_overlap_plot(
    sm=sm,
    genes={"ml": "Mlig455-019997", "sm": "dd-Smed-v4-15930-0-1"},
    colors={"ml": "#377EB8", "sm": "#E41A1C"},
    output_prefix="results/overlap_macpiwi",
)

Contributing

Follow the same conventions as lab-core-python: Google-style docstrings, one function per logical task, lazy imports for optional heavy dependencies (holoviews, bokeh).

Metadata

Release files for samap-extension 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for samap-extension 0.1.0
File Size Uploaded
samap_extension-0.1.0.tar.gz 13.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for samap-extension 0.1.0
File Interpreter ABI Platform
samap_extension-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.7 kB

Release files / samap_extension-0.1.0.tar.gz

Download URL samap_extension-0.1.0.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cab77c62621277c67281ece36f1d6badd3ad08485ef51255a66521db85378a42
BLAKE2b-256 checksum
How to use checksums
7bfe43675b73859437a76f9d5c348fdc7faa90893fa2176ca5340a3d2dd1f935
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Release files / samap_extension-0.1.0-py3-none-any.whl

Download URL samap_extension-0.1.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40391308b7419161fa63d8ff4489afd3a85e355f142a5af512abf89561bbf18e
BLAKE2b-256 checksum
How to use checksums
30a503c116015f5a8f475247460898455e47f49bf74ee60846cba049dd71f594
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page