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.1

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.1
File Size Uploaded
samap_extension-0.1.1.tar.gz 13.8 kB Details

Built distribution (wheel)

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

Total release size: 26.8 kB

Release files / samap_extension-0.1.1.tar.gz

Download URL samap_extension-0.1.1.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
10ea2935a9425b7a65e7990601800285556261e664b84f30cb9160bfbc57abd1
BLAKE2b-256 checksum
How to use checksums
5943b90ccab6c0260336622d59b60a1380b83335f09d3ee3cc4b9b3315d0e5c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.14

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

Download URL samap_extension-0.1.1-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9af5da8c6d0067cca40b464413b0afa7e293f99c63503d16cdb5b36533198513
BLAKE2b-256 checksum
How to use checksums
6367214599b5cab558b478d5f09325f7bc5d32e3dafd0bd5f120143681bd56d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.14

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

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