voyagerpy


Namevoyagerpy JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://pmelsted.github.io/voyagerpy
SummaryPython library for Voyager, the geo-spatialist R library.
upload_time2023-07-26 10:52:10
maintainer
docs_urlNone
authorPall Melsted
requires_python>=3.8,<4
licenseBSD-3-Clause
keywords single-cell spatial voyager
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # VoyagerPy

This repo manages the VoyagerPy Python package, a Python implementation of the R package [Voyager](https://github.com/pachterlab/voyager)

## Installation

To install the latest release of VoyagerPy, you can install it via `pip`:

```pip install voyagerpy```

### Clone the repo
Clone this repo either using SSH:

```git clone git@github.com:pmelsted/voyagerpy.git```

or HTTPS:

```git clone https://github.com/pmelsted/voyagerpy.git```.

To get the bleeding edge version, change your branch to `dev` by running

```git checkout dev```

once inside the `voyagerpy` directory.

### Install using `pip`

To install VoyagerPy, run 

```pip install .```

Some users may experince problems with installing GeoPandas, which VoyagerPy depends on. We refer to the [GeoPandas installation page](https://geopandas.org/en/stable/getting_started.html) if this is the case.

## Structure of VoyagerPy

VoyagerPy uses [AnnData](https://anndata.readthedocs.io/) as its internal datastructure. An AnnData object, `adata`, holds the following attributes:

- `adata.X`: the main data matrix of size $N_{obs} \times N_{vars}$. It holds the count data for each observation and feature (e.g. barcodes x genes), which may have gone under some transformation. Data type may be a `scipy.sparse.csr_matrix`, `numpy.ndarray`, or `numpy.matrix`. This is yet to be set in stone.
- `adata.layers`: A dictionary-like data structure with the values being matrices of the same shape as `adata.X`. These can hold transformations of `adata.X`, such as log-normalized counts.
- `adata.obs`: A `pandas.DataFrame` object where the rows represent the barcodes, and the columns are features of the barcodes.
- `adata.obsp`: This is a dictionary-based object, where each value is a `pandas.DataFrame` of size $N_{obs}\times N_{obs}$, representing a pairwise metric on the observation. For instance, `adata.obsp["distances"]` can hold the pairwise distances between the positions of origin for the barcodes. This can be handy to store graphs over the barcodes.
- `adata.obsm`: This is a dictionary-based object where each value is a `pandas.DataFrame` or `geopandas.GeoDataFrame`. The number of rows in these data frames must be $N_{obs}$. Example of data frames to be stored here:
	- `geometry`: a `geopandas.GeoDataFrame` where each column is of `geopandas.GeoSeries` or `pandas.Series`, used for plotting spatial objects, such as points or polygons. To use GeoPandas for plotting a column, it must be a `geopandas.GeoSeries`. These will represent the geometries of the barcodes.
	- `local_*`: a `pandas.DataFrame` which contains spatial results over features in `obs`. These can be e.g. local Moran's I, local spatial heteroscedasticity (LOSH) over some features `x, y, z`. The columns of `local_moran` and `local_losh` would then be `x, y, z`.
- `adata.var`: A `pandas.DataFrame` object where the rows represent the features from the columns of `X` (e.g. genes), and the columns are features of the genes (or whatever the columns of `X` represent).
- `adata.varp`, `adata.varm`: These are not used for the time being, but these objects can be used similarly to `adata.obsp` and `adata.obsm` but for feature (gene) data.

- `adata.uns`: This is a dictionary containing data that cannot be stored in the above objects:
	- `config`: These can contain config or metadata about this object. By using VoyagerPy to read the scRNA-seq data, this dictionary has the following items by default:
		- `"var_names": "gene_ids"`, meaning that the index of the variables (genes) are the standardized ENSG gene IDs.
		- `"secondary_var_names": "symbol"`, meaning that the column `"symbol"` in `adata.var` contains the symbol names for the genes.
	- `spatial`: This dictionary contains various spatial data, including:
		- `img`: a dictionary with key-values as resolution-image
		- `scale`: a dictionary describing the scales of the images.
		- `transform`: metadata that describes the transforms applied to the images (rotation, mirror) such that the originals can be recovered.
		- `local_results`: This is a dictionary which can contain Monte-Carlo simulations of spatial autocorrelation statistics, such as for local Moran statistics.
            

Raw data

            {
    "_id": null,
    "home_page": "https://pmelsted.github.io/voyagerpy",
    "name": "voyagerpy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4",
    "maintainer_email": "",
    "keywords": "Single-Cell,Spatial,voyager",
    "author": "Pall Melsted",
    "author_email": "pmelsted@hi.is",
    "download_url": "https://files.pythonhosted.org/packages/f7/e8/b0453e7aabffca9bc77e8a027c7f2268b716b3f736af7c3c9e37c0dd1999/voyagerpy-0.1.1.tar.gz",
    "platform": null,
    "description": "# VoyagerPy\n\nThis repo manages the VoyagerPy Python package, a Python implementation of the R package [Voyager](https://github.com/pachterlab/voyager)\n\n## Installation\n\nTo install the latest release of VoyagerPy, you can install it via `pip`:\n\n```pip install voyagerpy```\n\n### Clone the repo\nClone this repo either using SSH:\n\n```git clone git@github.com:pmelsted/voyagerpy.git```\n\nor HTTPS:\n\n```git clone https://github.com/pmelsted/voyagerpy.git```.\n\nTo get the bleeding edge version, change your branch to `dev` by running\n\n```git checkout dev```\n\nonce inside the `voyagerpy` directory.\n\n### Install using `pip`\n\nTo install VoyagerPy, run \n\n```pip install .```\n\nSome users may experince problems with installing GeoPandas, which VoyagerPy depends on. We refer to the [GeoPandas installation page](https://geopandas.org/en/stable/getting_started.html) if this is the case.\n\n## Structure of VoyagerPy\n\nVoyagerPy uses [AnnData](https://anndata.readthedocs.io/) as its internal datastructure. An AnnData object, `adata`, holds the following attributes:\n\n- `adata.X`: the main data matrix of size $N_{obs} \\times N_{vars}$. It holds the count data for each observation and feature (e.g. barcodes x genes), which may have gone under some transformation. Data type may be a `scipy.sparse.csr_matrix`, `numpy.ndarray`, or `numpy.matrix`. This is yet to be set in stone.\n- `adata.layers`: A dictionary-like data structure with the values being matrices of the same shape as `adata.X`. These can hold transformations of `adata.X`, such as log-normalized counts.\n- `adata.obs`: A `pandas.DataFrame` object where the rows represent the barcodes, and the columns are features of the barcodes.\n- `adata.obsp`: This is a dictionary-based object, where each value is a `pandas.DataFrame` of size $N_{obs}\\times N_{obs}$, representing a pairwise metric on the observation. For instance, `adata.obsp[\"distances\"]` can hold the pairwise distances between the positions of origin for the barcodes. This can be handy to store graphs over the barcodes.\n- `adata.obsm`: This is a dictionary-based object where each value is a `pandas.DataFrame` or `geopandas.GeoDataFrame`. The number of rows in these data frames must be $N_{obs}$. Example of data frames to be stored here:\n\t- `geometry`: a `geopandas.GeoDataFrame` where each column is of `geopandas.GeoSeries` or `pandas.Series`, used for plotting spatial objects, such as points or polygons. To use GeoPandas for plotting a column, it must be a `geopandas.GeoSeries`. These will represent the geometries of the barcodes.\n\t- `local_*`: a `pandas.DataFrame` which contains spatial results over features in `obs`. These can be e.g. local Moran's I, local spatial heteroscedasticity (LOSH) over some features `x, y, z`. The columns of `local_moran` and `local_losh` would then be `x, y, z`.\n- `adata.var`: A `pandas.DataFrame` object where the rows represent the features from the columns of `X` (e.g. genes), and the columns are features of the genes (or whatever the columns of `X` represent).\n- `adata.varp`, `adata.varm`: These are not used for the time being, but these objects can be used similarly to `adata.obsp` and `adata.obsm` but for feature (gene) data.\n\n- `adata.uns`: This is a dictionary containing data that cannot be stored in the above objects:\n\t- `config`: These can contain config or metadata about this object. By using VoyagerPy to read the scRNA-seq data, this dictionary has the following items by default:\n\t\t- `\"var_names\": \"gene_ids\"`, meaning that the index of the variables (genes) are the standardized ENSG gene IDs.\n\t\t- `\"secondary_var_names\": \"symbol\"`, meaning that the column `\"symbol\"` in `adata.var` contains the symbol names for the genes.\n\t- `spatial`: This dictionary contains various spatial data, including:\n\t\t- `img`: a dictionary with key-values as resolution-image\n\t\t- `scale`: a dictionary describing the scales of the images.\n\t\t- `transform`: metadata that describes the transforms applied to the images (rotation, mirror) such that the originals can be recovered.\n\t\t- `local_results`: This is a dictionary which can contain Monte-Carlo simulations of spatial autocorrelation statistics, such as for local Moran statistics.",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Python library for Voyager, the geo-spatialist R library.",
    "version": "0.1.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/pmelsted/voyagerpy/issues",
        "Homepage": "https://pmelsted.github.io/voyagerpy",
        "Repository": "https://github.com/pmelsted/voyagerpy"
    },
    "split_keywords": [
        "single-cell",
        "spatial",
        "voyager"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d98623d207b5ea5143e32c965a5bec2dcc3439332a329a6a893d52eb94409b91",
                "md5": "9b068c20aa8cc3b26f8fca65c6e59a70",
                "sha256": "400dda5b42e9a8fb3003b107de5e6e71d11e8829381f9240707b8df369b6244c"
            },
            "downloads": -1,
            "filename": "voyagerpy-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9b068c20aa8cc3b26f8fca65c6e59a70",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4",
            "size": 64438,
            "upload_time": "2023-07-26T10:52:07",
            "upload_time_iso_8601": "2023-07-26T10:52:07.942998Z",
            "url": "https://files.pythonhosted.org/packages/d9/86/23d207b5ea5143e32c965a5bec2dcc3439332a329a6a893d52eb94409b91/voyagerpy-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f7e8b0453e7aabffca9bc77e8a027c7f2268b716b3f736af7c3c9e37c0dd1999",
                "md5": "e1e03045fbf376f79e90e2d80fbe7c44",
                "sha256": "a6fce4c19d1c8520820464aa5a8d40e82ed7fabad240988f7bfd9c26f7199dce"
            },
            "downloads": -1,
            "filename": "voyagerpy-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e1e03045fbf376f79e90e2d80fbe7c44",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4",
            "size": 60706,
            "upload_time": "2023-07-26T10:52:10",
            "upload_time_iso_8601": "2023-07-26T10:52:10.041717Z",
            "url": "https://files.pythonhosted.org/packages/f7/e8/b0453e7aabffca9bc77e8a027c7f2268b716b3f736af7c3c9e37c0dd1999/voyagerpy-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-26 10:52:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pmelsted",
    "github_project": "voyagerpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "voyagerpy"
}
        
Elapsed time: 0.09759s