hacca


Namehacca JSON
Version 0.0.5 PyPI version JSON
download
home_pageNone
SummaryA short description of your package
upload_time2024-10-21 21:56:01
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseNone
keywords hacca
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # **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.

[![PyPI version](https://badge.fury.io/py/hacca.svg)](https://badge.fury.io/py/haCCA)

![haCCA](./asset/hacca_workflow.png)

## Installation

```python
pip install hacca
```

## Usage

```python
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](./example) folder for more detailed usage.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "hacca",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "hacca",
    "author": null,
    "author_email": "XiaoTian Shen <14301050178@fudan.edu.cn>",
    "download_url": "https://files.pythonhosted.org/packages/16/df/ea62c687cb4f6d572646e2758a4920bebd0e8badf97edd78ef536a091769/hacca-0.0.5.tar.gz",
    "platform": null,
    "description": "# **haCCA: Multi-module Integrating of spatial transcriptomes and metabolomes.**\n\nhaCCA, 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.\n\n[![PyPI version](https://badge.fury.io/py/hacca.svg)](https://badge.fury.io/py/haCCA)\n\n![haCCA](./asset/hacca_workflow.png)\n\n## Installation\n\n```python\npip install hacca\n```\n\n## Usage\n\n```python\nfrom hacca import *\n\na_h5ad = sc.read_h5ad(os.path.join('/path/to/a.h5ad'))\nb_prime_h5ad = sc.read_h5ad(os.path.join('/path/to/b_prime.h5ad'))\n\n# construct Data object from a and b_prime\n# 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.\n\na = Data(X=a_h5ad.X.toarray(), D=a_h5ad.obsm['spatial'])\nb_prime = Data(X=b_prime_h5ad.X.toarray(), D=b_prime_h5ad.obsm['spatial'])\n\n# Infer b_predict from (a, b_prime) using the following alignment methods\n# manual_gross_alignment | icp_3d_alignment | direct_alignment\n# b_predict contains aligned feature from a and samples from b_prime\n\n_b_prime = hacca.manual_gross_alignment(a, b_prime)\n_a, _b_prime = hacca.icp_3d_alignment(a, _b_prime)\nb_predict = hacca.direct_alignment(_a, _b_prime)\n```\n\n## Examples\nYou can refer to the [examples](./example) folder for more detailed usage.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A short description of your package",
    "version": "0.0.5",
    "project_urls": {
        "Homepage": "https://github.com/shenxiaotianCNS/APC-MSI",
        "Issues": "https://github.com/shenxiaotianCNS/APC-MSI/issues",
        "Repository": "https://github.com/shenxiaotianCNS/APC-MSI.git"
    },
    "split_keywords": [
        "hacca"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "16dfea62c687cb4f6d572646e2758a4920bebd0e8badf97edd78ef536a091769",
                "md5": "4197cd42e826da1b4e42185c84eb69b0",
                "sha256": "d9845df0ae9344af0687e3b0f6c16a84cd857296e441ecbb569af42eeb396120"
            },
            "downloads": -1,
            "filename": "hacca-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "4197cd42e826da1b4e42185c84eb69b0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 14522,
            "upload_time": "2024-10-21T21:56:01",
            "upload_time_iso_8601": "2024-10-21T21:56:01.113358Z",
            "url": "https://files.pythonhosted.org/packages/16/df/ea62c687cb4f6d572646e2758a4920bebd0e8badf97edd78ef536a091769/hacca-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-21 21:56:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "shenxiaotianCNS",
    "github_project": "APC-MSI",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "hacca"
}
        
Elapsed time: 0.62865s