{"id":20956562,"url":"https://github.com/bluebrain/vascpy","last_synced_at":"2025-05-14T05:32:08.072Z","repository":{"id":38314733,"uuid":"437034922","full_name":"BlueBrain/vascpy","owner":"BlueBrain","description":"Python library for reading, writing, and manipulating large-scale vasculature graphs.","archived":false,"fork":false,"pushed_at":"2024-02-19T09:40:13.000Z","size":33143,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-19T20:01:52.013Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.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,"governance":null,"roadmap":null,"authors":"AUTHORS.txt","dei":null}},"created_at":"2021-12-10T15:59:26.000Z","updated_at":"2024-05-15T07:24:36.000Z","dependencies_parsed_at":"2024-02-17T08:32:19.359Z","dependency_job_id":null,"html_url":"https://github.com/BlueBrain/vascpy","commit_stats":{"total_commits":54,"total_committers":3,"mean_commits":18.0,"dds":0.09259259259259256,"last_synced_commit":"18232e83438cacfb22c320b4070d60c51f6ca24f"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueBrain%2Fvascpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueBrain%2Fvascpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueBrain%2Fvascpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueBrain%2Fvascpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlueBrain","download_url":"https://codeload.github.com/BlueBrain/vascpy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225277144,"owners_count":17448627,"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":[],"created_at":"2024-11-19T01:26:44.029Z","updated_at":"2025-05-14T05:32:08.054Z","avatar_url":"https://github.com/BlueBrain.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!WARNING]\n\u003e The Blue Brain Project concluded in December 2024, so development has ceased under the BlueBrain GitHub organization.\n\u003e Future development will take place at: https://github.com/openbraininstitute/vascpy\n\n![vascpy Logo](doc/source/logo/BBP-vascpy.jpg)\n\nvascpy\n======\n\n`vascpy` is a python library for reading, writing, and manipulating large-scale vasculature graphs. There are two alternative graph representations available: a section-centered and an edge-centered one. It supports the following respective formats:\n\n* H5 Morphology (see [specification](https://morphology-documentation.readthedocs.io/en/latest/h5-vasc-graph.html))\n* SONATA node population of edges (see [specification](https://github.com/AllenInstitute/sonata/blob/master/docs/SONATA_DEVELOPER_GUIDE.md))\n\nThe `vascpy` library provides two classes: `PointVasculature` and `SectionVasculature` that allow for reading and writing edge-centered and section-centered datasets respectively, as well as converting between them.\n\nDocumentation\n-------------\nvascpy documentation is built and hosted on [readthedocs](https://readthedocs.org/).\n* [latest snapshot](http://vascpy.readthedocs.org/en/latest/)\n\nUsage\n-----\n\nLoad and write an h5 morphology file:\n\n```python\nfrom vascpy import SectionVasculature\n\nv = SectionVasculature.load(\"sample.h5\")\n\nprint(v.points)\nprint(v.diameters)\nprint(v.connectivity)\nprint(v.sections)\n\nv.save(\"sample2.h5\")\n```\n\nLoad and write an h5 SONATA file:\n```python\nfrom vascpy import PointVasculature\n\nv = PointVasculature.load_sonata(\"sample_sonata.h5\")\n\nprint(v.node_properties)\nprint(v.edge_properties)\nprint(v.points)\nprint(v.edges)\nprint(v.edge_types)\nprint(v.segment_points)\nprint(v.segment_diameters)\nprint(v.area)\nprint(v.volume)\n\nv.save_sonata(\"sample_sonata2.h5\")\n```\n\nRepresentation conversions\n-----------\n\n`vascpy` allows the conversion between the two representations:\n\n```python\nfrom vascpy import PointVasculature\npoint_vasculature = PointVasculature.load_hdf5(\"sample_sonata.h5\")\n\nsection_vasculature = point_vasculature.as_section_graph()\npoint_vasculature = section_vasculature.as_point_graph()\n```\n\nCreate and save an edge-centered vascular graph\n-----------------------------------------------\n\n```python\nimport numpy as np\nimport pandas as pd\nfrom vascpy import PointVasculature\n\nnode_properties = DataFrame({\n    'x': np.array([0., 1., 2.]),\n    'y': np.array([3., 4., 5.]),\n    'z': np.array([6., 7., 8.]),\n    'diameter': np.array([0.1, 0.2, 0.3])\n})\n\nedge_properties = pd.DataFrame({\n    'start_node': np.array([0, 0, 1]),\n    'end_node': np.array([1, 2, 2]),\n    'type': np.array([1, 1, 1])\n})\n\nv = PointVasculature(node_properties=node_properties, edge_properties=edge_properties)\nv.save_sonata('my_vasculature.h5')\n```\nFunding \u0026 Acknowledgements\n-------------------------\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) 2022-2024 Blue Brain Project/EPFL\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluebrain%2Fvascpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluebrain%2Fvascpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluebrain%2Fvascpy/lists"}