Skip to main content

A short description of your package

Project description

haCCA: Multi-module Integrating of spatial transcriptomes and metabolomes.

haCCA, a workflow utilizing high Correlated feature pairs combined with a modified spatial morphological alignment to ensure high resolution and accuracy of spot-to-spot data integration of spatial transcriptomes and metabolomes.

Installation

pip install hacca

Usage

from hacca import *

a_h5ad = sc.read_h5ad(os.path.join('/path/to/a.h5ad'))
b_prime_h5ad = sc.read_h5ad(os.path.join('/path/to/b_prime.h5ad'))

# construct Data object from a and b_prime
# Data is a triplet of (X: np.ndarray, D: np.ndarray, Label: Optional[np.ndarray]), where X is the feature matrix, D is the spatial matrix that contains the location information, and Label is an optional array that contains the cluster information.

a = Data(X=a_h5ad.X.toarray(), D=a_h5ad.obsm['spatial'])
b_prime = Data(X=b_prime_h5ad.X.toarray(), D=b_prime_h5ad.obsm['spatial'])

# Infer b_predict from (a, b_prime) using the following alignment methods
# manual_gross_alignment | icp_3d_alignment | direct_alignment
# b_predict contains aligned feature from a and samples from b_prime

_b_prime = hacca.manual_gross_alignment(a, b_prime)
_a, _b_prime = hacca.icp_3d_alignment(a, _b_prime)
b_predict = hacca.direct_alignment(_a, _b_prime)

Examples

You can refer to the examples folder for more detailed usage.

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

hacca-0.0.3.tar.gz (14.3 kB view details)

Uploaded Source

File details

Details for the file hacca-0.0.3.tar.gz.

File metadata

  • Download URL: hacca-0.0.3.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for hacca-0.0.3.tar.gz
Algorithm Hash digest
SHA256 793212862e563974cee96227c6c254c24b695f10facbe2b5703e5f337f0c6e2a
MD5 d29bece724d3a70216f6b1ec8e1a08fe
BLAKE2b-256 1e5f27de78bd0eabe5f515e0b4b2656b4d09ef59d22d0bbcdc820950e6bfedaf

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