diff --git a/README.md b/README.md index dbded8a..df17de6 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,9 @@ If you encounter any bugs or have suggestions for new features, please open an i Our package requires `python >= 3.9`. +You can install the package directly from [PyPI](https://pypi.org/project/metaspace-converter/): ```bash -pip install -U git+https://github.com/metaspace2020/metaspace-converter@master +pip install metaspace-converter ``` ### Import package @@ -39,6 +40,8 @@ import metaspace_converter ## Short tutorial +The full documentation for the package can be found here: [https://metaspace2020.github.io/metaspace-converter/](https://metaspace2020.github.io/metaspace-converter/) + The METASPACE-converter package is using the [python client](https://github.com/metaspace2020/metaspace/tree/master/metaspace/python-client) download datasets from METASPACE. @@ -160,6 +163,11 @@ sdata.points["maldi_points"] = sdata.transform_element_to_coordinate_system( ![Image](docs/_static/img/example_img_sd.png) +## License + +Unless specified otherwise in file headers or LICENSE files present in subdirectories, all files are licensed under the [Apache 2.0 license](https://github.com/metaspace2020/metaspace/blob/master/LICENSE). + + [badge-docs]: https://img.shields.io/github/actions/workflow/status/metaspace2020/metaspace-converter/docs.yml?label=documentation [badge-pypi]: https://img.shields.io/pypi/v/metaspace-converter [badge-tests]: https://img.shields.io/github/actions/workflow/status/metaspace2020/metaspace-converter/tests.yml?branch=master&label=tests diff --git a/docs/conf.py b/docs/conf.py index ed364dd..ff16b8f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,8 +18,8 @@ # -- Project information ----------------------------------------------------- project = "METASPACE Converter" -copyright = "2023, Tim Daniel Rose" -author = "Tim Daniel Rose" +copyright = "2023; Tim Daniel Rose, Andreas Eisenbarth, Theodore Alexandrov" +author = "Tim Daniel Rose, Andreas Eisenbarth" # -- General configuration --------------------------------------------------- diff --git a/docs/examples.rst b/docs/examples.rst index c6b06af..4437811 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -51,6 +51,28 @@ SquidPy .. image:: ./_static/img/example_img_sq.png :alt: Visualization with SquidPy +Convert AnnData objects to ion image arrays +------------------------------------------- + +If you want to work with the ion images as numpy arrays, the function `anndata_to_image_array` can +convert previously downloaded AnnData objects to numpy arrays. + +.. testcode:: + + from metaspace_converter import metaspace_to_anndata, anndata_to_image_array + + # Download data + adata2 = metaspace_to_anndata(dataset_id="2023-11-14_21h58m39s", fdr=0.1) + + ion_images = anndata_to_image_array(adata2) + + # 6 ion images of shape 61x78 + print(ion_images.shape) + +.. testoutput:: + + (20, 130, 143) + SpatialData ----------- diff --git a/docs/index.rst b/docs/index.rst index cce353e..599efc3 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,10 +6,24 @@ Welcome to METASPACE Converter's documentation! =============================================== +|Tests badge| +|Docs badge| +|PyPI badge| + Functions to convert `METASPACE`_ datasets to `AnnData`_ objects. This makes it easy to work with the `ScanPy`_, `SquidPy`_ and `SpatialData`_ ecosystem with METASPACE data. +Installation +------------ +You can install the package via pip: + + +.. code-block:: + + pip install metaspace-converter + + .. toctree:: :maxdepth: 2 :caption: Contents: @@ -22,3 +36,11 @@ This makes it easy to work with the `ScanPy`_, `SquidPy`_ and `SpatialData`_ eco .. _ScanPy: https://scanpy.readthedocs.io/en/stable/ .. _SquidPy: https://squidpy.readthedocs.io/en/stable/ .. _SpatialData: https://spatialdata.scverse.org/en/latest/ + + +.. |Tests badge| image:: https://img.shields.io/github/actions/workflow/status/metaspace2020/metaspace-converter/tests.yml?branch=master&label=tests + :target: https://github.com/metaspace2020/metaspace-converter/actions/workflows/tests.yml +.. |Docs badge| image:: https://img.shields.io/github/actions/workflow/status/metaspace2020/metaspace-converter/docs.yml?label=documentation + :target: https://metaspace2020.github.io/metaspace-converter/ +.. |PyPI badge| image:: https://img.shields.io/pypi/v/metaspace-converter + :target: https://pypi.org/project/metaspace-converter/