{"id":20956481,"url":"https://github.com/bluebrain/atlas-download-tools","last_synced_at":"2025-10-03T14:28:27.988Z","repository":{"id":40349523,"uuid":"384113882","full_name":"BlueBrain/Atlas-Download-Tools","owner":"BlueBrain","description":"Search, download, and prepare brain atlas data.","archived":false,"fork":false,"pushed_at":"2023-03-10T09:38:49.000Z","size":557,"stargazers_count":17,"open_issues_count":29,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-28T13:08:46.661Z","etag":null,"topics":["brain-atlas","download","search"],"latest_commit_sha":null,"homepage":"https://atlas-download-tools.rtfd.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlueBrain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-08T12:16:06.000Z","updated_at":"2024-08-27T06:12:48.000Z","dependencies_parsed_at":"2023-02-14T06:15:40.802Z","dependency_job_id":null,"html_url":"https://github.com/BlueBrain/Atlas-Download-Tools","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueBrain%2FAtlas-Download-Tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueBrain%2FAtlas-Download-Tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueBrain%2FAtlas-Download-Tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueBrain%2FAtlas-Download-Tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlueBrain","download_url":"https://codeload.github.com/BlueBrain/Atlas-Download-Tools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076977,"owners_count":22010630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brain-atlas","download","search"],"created_at":"2024-11-19T01:26:11.919Z","updated_at":"2025-10-03T14:28:22.949Z","avatar_url":"https://github.com/BlueBrain.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"docs/_images/banner.jpg\" alt=\"Atlas Download Tools Logo\" /\u003e\n\u003c/p\u003e\n\n\u003ch4 align=\"center\"\u003eSearch, download, and prepare atlas data.\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/BlueBrain/Atlas-Download-Tools/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/BlueBrain/Atlas-Download-Tools\" alt=\"Latest release\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://doi.org/10.5281/zenodo.5195345\"\u003e\u003cimg src=\"https://zenodo.org/badge/DOI/10.5281/zenodo.5195345.svg\" alt=\"DOI\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/BlueBrain/Atlas-Download-Tools/blob/main/LICENSE.txt\"\u003e\u003cimg src=\"https://img.shields.io/github/license/BlueBrain/Atlas-Download-Tools\" alt=\"License\" /\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg src=\"https://img.shields.io/badge/code%20style-black-000000.svg\" alt=\"Black\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pycqa.github.io/isort/\"\u003e\u003cimg src=\"https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat\u0026labelColor=ef8336\" alt=\"Isort\"\u003e\u003c/a\u003e\n    \u003ca href=\"http://www.pydocstyle.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/docstrings-pydocstyle-informational\" alt=\"Pydocstyle\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://flake8.pycqa.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/PEP8-flake8-informational\" alt=\"Pydocstyle\"\u003e\u003c/a\u003e\n    \u003ca href=\"http://mypy-lang.org\"\u003e\u003cimg src=\"http://www.mypy-lang.org/static/mypy_badge.svg\" alt=\"Checked with mypy\"\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/BlueBrain/Atlas-Download-Tools/actions/workflows/run-tests.yml\"\u003e\u003cimg src=\"https://github.com/BlueBrain/Atlas-Download-Tools/actions/workflows/run-tests.yml/badge.svg?branch=main\" alt=\"Build status\" /\u003e\u003c/a\u003e\n    \u003ca href='https://atlas-download-tools.readthedocs.io/en/latest/?badge=latest'\u003e\u003cimg src='https://readthedocs.org/projects/atlas-download-tools/badge/?version=latest' alt='Documentation Status' /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nAmong different sources of data, Allen Brain Institute hosts a rich database of\ngene expression images, Nissl volumes, and annotation atlases.\nThe Atlas-Download-Tools library can help you to download single section images\nand entire datasets, as well as the corresponding metadata.\nIt can further pre-process the image data to place it in the standard reference space.\n\n* [Installation](#installation)\n    * [Installation from PyPI](#installation-from-pypi)\n    * [Installation from source](#installation-from-source)\n    * [Installation for development](#installation-for-development)\n* [How to use the package](#how-to-use-the-package)\n    * [Using the CLI](#using-the-cli)\n    * [Using the python API](#using-the-python-api)\n* [Funding \u0026 Acknowledgment](#funding-acknowledgment)\n\n## \u003ca name=\"installation\"\u003e\u003c/a\u003e Installation\n\n\n### \u003ca name=\"installation-from-pypi\"\u003e\u003c/a\u003e Installation from PyPI\nThe atldld package can be easily installed from PyPI.\n\n```shell script\npip install atldld\n```\n\n\n### \u003ca name=\"installation-from-source\"\u003e\u003c/a\u003e Installation from source\nIf you want to try the latest version, you can install from source.\n```shell script\npip install git+https://github.com/BlueBrain/Atlas-Download-Tools\n```\n\n### \u003ca name=\"installation-for-development\"\u003e\u003c/a\u003e Installation for development\nIf you want a dev install, you should install the latest version from source with\nall the extra requirements for running test.\n```shell script\ngit clone https://github.com/BlueBrain/Atlas-Download-Tools\ncd Atlas-Download-Tools\npip install -e '.[dev]'\n```\n\n## \u003ca name=\"how-to-use-the-package\"\u003e\u003c/a\u003e How to use the package\nAtlas-Download-Tools can be used through a command line interface (CLI), as well\nas programmatically through a python API.\n\nAt present the CLI is rather limited, but we are working on adding the most\nuseful functionality as soon as possible.\n\n### \u003ca name=\"using-the-cli\"\u003e\u003c/a\u003e Using the CLI\nAll functionality can be accessed through the `atldld` command and its\nsub-commands. For example:\n```bash\n$ atldld\n\n# Information about the version of atldld\n$ atldld info version\n$ atldld info version --help\n# Information about the cache folder \n$ atldld info cache\n```\n\nOne can also get dataset information through the CLI.\n```bash\n$ atldld dataset info $DATASET_ID\n$ atldld dataset preview $DATASET_ID\n```\n\nTo download a dataset use the `atldld download` command.\n```shell\n$ atldld download dataset $DATASET_ID\n```\n\nFor further information please refer to the help part of the corresponding\ncommand.\n\n### \u003ca name=\"using-the-python-api\"\u003e\u003c/a\u003e Using the python API\nThe package `atldld` has several functionalities to download data from [Allen Brain Institute](https://portal.brain-map.org/):\n\n- One can find dataset IDs from a gene expression name:\n```python\nfrom atldld.utils import get_experiment_list_from_gene\ndataset_ids = get_experiment_list_from_gene(\"Pvalb\", axis='sagittal')\n```\n\n- One can download any dataset from a dataset ID:\n```python\nfrom atldld.sync import DatasetDownloader\ndownloader = DatasetDownloader(dataset_id=DATASET_ID, **kwargs)\n# One needs to fetch metadata before downloading a dataset.\ndownloader.fetch_metadata()\ndataset = downloader.run()\nimage_id, section_number, img, img_exp, df = next(dataset)\n```\nNote that this functionality makes a simplifying assumption that\nthe slices are perfectly parallel to one of the 3 axes.\n\n- One can obtain metadata of a dataset:\n```python\nfrom atldld.utils import CommonQueries, get_3d\n# The axis {'sagittal', 'coronal'}\naxis = CommonQueries.get_axis(dataset_id=DATASET_ID)\n# The reference space\nref_space = CommonQueries.get_reference_space(dataset_id=DATASET_ID)\n# The 3d transformation of the dataset\nmatrix_3d = get_3d(dataset_id=DATASET_ID)\n```\n\n## \u003ca name=\"funding-acknowledgment\"\u003e\u003c/a\u003e Funding \u0026 Acknowledgment\n\nThe development of this software was supported by funding to the Blue Brain Project, a research center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss government’s ETH Board of the Swiss Federal Institutes of Technology.\n\nCopyright (c) 2021-2022 Blue Brain Project/EPFL\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluebrain%2Fatlas-download-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluebrain%2Fatlas-download-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluebrain%2Fatlas-download-tools/lists"}