pydra-templateflow


Namepydra-templateflow JSON
Version 0.0.2 PyPI version JSON
download
home_page
SummaryPydra tasks for TemplateFlow
upload_time2023-04-18 11:14:37
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords atlas brain neuroimaging pydra reference template templateflow
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pydra-templateflow

[![PyPI - Version][pypi-version]][pypi-project]
[![PyPI - Python Version][pypi-pyversions]][pypi-project]
[![PyPI - Downloads][pypi-downloads]][pypi-project]
![][status-test]

----

Pydra tasks for TemplateFlow.

[Pydra][pydra] is a dataflow engine which provides
a set of lightweight abstractions for DAG
construction, manipulation, and distributed execution.

[TemplateFlow][templateflow] provides a framework
for publicly hosting and distributing neuroimaging templates
for human and nonhuman brains.

**Table of contents**

- [Available tasks](#available-tasks)
- [Installation](#installation)
- [Development](#development)
- [License](#license)

## Available tasks

This package provides a `get_template` task, which takes a mandatory `template_id` argument
and an optional `output_queries` mapping from output names to their respective query entities.

The following example showcases using `get_template` to download the template image,
brain and head masks for the Linear ICBM Average Brain (ICBM152).

```python
from pydra.tasks import templateflow

task = templateflow.get_template(
    template_id="MNI152Lin",
    output_queries={
        "brain_mask": {"resolution": "1", "suffix": "mask", "desc": "head"},
        "head_mask": {"resolution": "1", "suffix": "mask", "desc": "brain"},
        "t1w_image": {"resolution": "1", "suffix": "T1w"},
    },
)

result = task()

# result.output.brain_mask
# result.output.head_mask
# result.output.t1w_image
```

Please check the list of available templates [here][templateflow-browse].  

## Installation

```console
pip install pydra-templateflow
```

## Development

This project is managed with [Hatch][hatch]:

```console
pipx install hatch
```

To run the test suite:

```console
hatch run test
```

To fix linting issues:

```console
hatch run lint:fix
```

## License

This project is distributed under the terms of the [Apache License, Version 2.0][license].

[pypi-project]: https://pypi.org/project/pydra-templateflow/
[pypi-version]: https://img.shields.io/pypi/v/pydra-templateflow.svg
[pypi-pyversions]: https://img.shields.io/pypi/pyversions/pydra-templateflow.svg
[pypi-downloads]: https://static.pepy.tech/badge/pydra-templateflow
[status-test]: https://github.com/ghisvail/pydra-templateflow/actions/workflows/test.yaml/badge.svg
[pydra]: https://pydra.readthedocs.io/
[templateflow]: https://www.templateflow.org/
[templateflow-browse]: https://www.templateflow.org/browse/
[hatch]: https://hatch.pypa.io/
[license]: https://spdx.org/licenses/Apache-2.0.html

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pydra-templateflow",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "atlas,brain,neuroimaging,pydra,reference,template,templateflow",
    "author": "",
    "author_email": "Ghislain Vaillant <ghisvail@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/4e/16/082fd3b0366bee046f1e946eae0b568c8cca0f515b728b9684554c10167a/pydra_templateflow-0.0.2.tar.gz",
    "platform": null,
    "description": "# pydra-templateflow\n\n[![PyPI - Version][pypi-version]][pypi-project]\n[![PyPI - Python Version][pypi-pyversions]][pypi-project]\n[![PyPI - Downloads][pypi-downloads]][pypi-project]\n![][status-test]\n\n----\n\nPydra tasks for TemplateFlow.\n\n[Pydra][pydra] is a dataflow engine which provides\na set of lightweight abstractions for DAG\nconstruction, manipulation, and distributed execution.\n\n[TemplateFlow][templateflow] provides a framework\nfor publicly hosting and distributing neuroimaging templates\nfor human and nonhuman brains.\n\n**Table of contents**\n\n- [Available tasks](#available-tasks)\n- [Installation](#installation)\n- [Development](#development)\n- [License](#license)\n\n## Available tasks\n\nThis package provides a `get_template` task, which takes a mandatory `template_id` argument\nand an optional `output_queries` mapping from output names to their respective query entities.\n\nThe following example showcases using `get_template` to download the template image,\nbrain and head masks for the Linear ICBM Average Brain (ICBM152).\n\n```python\nfrom pydra.tasks import templateflow\n\ntask = templateflow.get_template(\n    template_id=\"MNI152Lin\",\n    output_queries={\n        \"brain_mask\": {\"resolution\": \"1\", \"suffix\": \"mask\", \"desc\": \"head\"},\n        \"head_mask\": {\"resolution\": \"1\", \"suffix\": \"mask\", \"desc\": \"brain\"},\n        \"t1w_image\": {\"resolution\": \"1\", \"suffix\": \"T1w\"},\n    },\n)\n\nresult = task()\n\n# result.output.brain_mask\n# result.output.head_mask\n# result.output.t1w_image\n```\n\nPlease check the list of available templates [here][templateflow-browse].  \n\n## Installation\n\n```console\npip install pydra-templateflow\n```\n\n## Development\n\nThis project is managed with [Hatch][hatch]:\n\n```console\npipx install hatch\n```\n\nTo run the test suite:\n\n```console\nhatch run test\n```\n\nTo fix linting issues:\n\n```console\nhatch run lint:fix\n```\n\n## License\n\nThis project is distributed under the terms of the [Apache License, Version 2.0][license].\n\n[pypi-project]: https://pypi.org/project/pydra-templateflow/\n[pypi-version]: https://img.shields.io/pypi/v/pydra-templateflow.svg\n[pypi-pyversions]: https://img.shields.io/pypi/pyversions/pydra-templateflow.svg\n[pypi-downloads]: https://static.pepy.tech/badge/pydra-templateflow\n[status-test]: https://github.com/ghisvail/pydra-templateflow/actions/workflows/test.yaml/badge.svg\n[pydra]: https://pydra.readthedocs.io/\n[templateflow]: https://www.templateflow.org/\n[templateflow-browse]: https://www.templateflow.org/browse/\n[hatch]: https://hatch.pypa.io/\n[license]: https://spdx.org/licenses/Apache-2.0.html\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Pydra tasks for TemplateFlow",
    "version": "0.0.2",
    "split_keywords": [
        "atlas",
        "brain",
        "neuroimaging",
        "pydra",
        "reference",
        "template",
        "templateflow"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "46c7ba29bca57b7db3f6844968dfeafc7bebb09293f6af4b52162adc698b23b9",
                "md5": "2c5a66e74bbc562e64e6aa68a28dba2d",
                "sha256": "f8e806fd2ca482f41007d705e7241f00391aedc5f760cd1e1c4ad10b2a3688f5"
            },
            "downloads": -1,
            "filename": "pydra_templateflow-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2c5a66e74bbc562e64e6aa68a28dba2d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7373,
            "upload_time": "2023-04-18T11:14:35",
            "upload_time_iso_8601": "2023-04-18T11:14:35.756939Z",
            "url": "https://files.pythonhosted.org/packages/46/c7/ba29bca57b7db3f6844968dfeafc7bebb09293f6af4b52162adc698b23b9/pydra_templateflow-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4e16082fd3b0366bee046f1e946eae0b568c8cca0f515b728b9684554c10167a",
                "md5": "bd72197810fddf4a6ac820be77cf48b3",
                "sha256": "4a583c2c7ff63a1879127962929ac64821a38c69634d4aa252cfbffdf427739e"
            },
            "downloads": -1,
            "filename": "pydra_templateflow-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "bd72197810fddf4a6ac820be77cf48b3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 8440,
            "upload_time": "2023-04-18T11:14:37",
            "upload_time_iso_8601": "2023-04-18T11:14:37.488920Z",
            "url": "https://files.pythonhosted.org/packages/4e/16/082fd3b0366bee046f1e946eae0b568c8cca0f515b728b9684554c10167a/pydra_templateflow-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-18 11:14:37",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "pydra-templateflow"
}
        
Elapsed time: 0.08116s