banc


Namebanc JSON
Version 0.4.0 PyPI version JSON
download
home_pagehttps://github.com/jasper-tms/the-BANC-fly-connectome
SummaryTools for the GridTape-TEM dataset of an adult female fly's Brain And Nerve Cord
upload_time2024-04-14 16:20:54
maintainerNone
docs_urlNone
authorJasper Phelps
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements numpy matplotlib cloud-volume python-catmaid meshparty navis flybrains transformix nglui pyperclip numpyimage pandas connected-components-3d fill_voids task-queue caveclient cloud-files urllib3 trimesh pcg_skel anytree
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # The Brain And Nerve Cord fly connectome

The BANC (pronounced "bank") is the Brain And Nerve Cord, a GridTape-TEM dataset of an adult _Drosophila melanogaster_'s entire central nervous system. This dataset was generated by [Jasper Phelps](http://jasper.science) and [Minsu Kim](https://www.linkedin.com/in/mindy-minsu-kim/) in Wei-Chung Lee's lab at Harvard Medical School. A paper describing the dataset is currently in preparation.

This repository contains:
- A python package for interacting with the connectome data (see the folder [`banc/`](banc), and installation instructions below).
  - The `banc` package is a fork on the `fanc` (Female Adult Nerve Cord) package, which can be found at the [upstream repository](https://github.com/htem/FANC_auto_recon). Note that to make it easier to synchronize new features in `banc` and `fanc` packages, the folder `banc/` in this repo is a link to the folder `fanc/` – but files in this repo's version of the `fanc/` folder have been adapted for use with the BANC.
- Other information about the dataset and about the community effort to proofread the connectome (see the [wiki](https://github.com/jasper-tms/BANC-fly-connectome/wiki)).

Have any questions? Please [open an issue](https://github.com/jasper-tms/BANC-fly-connectome/issues/new) or contact [Jasper Phelps (jasper.s.phelps@gmail.com)](http://jasper.science).

## Installing and configuring the `banc` python package

### Before you start

As is always the case in python, consider making a virtual environment (using your preference of virtualenv/virtualenvwrapper or conda) before installing.

### Installation option 1: pip install from PyPI

    pip install banc

### Installation option 2: pip install directly from GitHub
The code on GitHub will sometimes be slightly more up to date than the version on PyPI

    pip install git+https://github.com/jasper-tms/BANC-fly-connectome.git

### Installation option 3: Clone then install
This is the best option if you want to make changes yourself to the code

    cd ~/repos  # or wherever you keep your repos
    git clone https://github.com/jasper-tms/BANC-fly-connectome.git
    cd BANC-fly-connectome
    pip install -e .

### Troubleshooting
Depending on your Python 3 version and your operating system, you may need to battle some bugs in order to get the `pip install` commands above to succeed.

If you get something that looks like

    .. ERROR:: Could not find a local HDF5 installation.
       You may need to explicitly state where your local HDF5 headers and
       library can be found by setting the ``HDF5_DIR`` environment
       variable or by using the ``--hdf5`` command-line option.

and you're on a Mac, install `brew` (https://brew.sh) if you haven't yet, then use `brew` to install HDF5 with `brew install hdf5`, then put `HDF5_DIR=/opt/homebrew/opt/hdf5` in front of your `pip install` command (e.g. `HDF5_DIR=/opt/homebrew/opt/hdf5 pip install banc`).

If you get an error that contains

    Error compiling Cython file:
    ...
    Cython.Compiler.Errors.CompileError: tables/utilsextension.pyx

try to `pip install` the latest version of `tables` from GitHub by running `HDF5_DIR=/opt/homebrew/opt/hdf5 pip install git+https://github.com/PyTables/PyTables`, or alternatively, use conda to install it (`conda install tables`). After you get this package installed successfully, try installing `banc` again.

### Provide credentials

Access to the latest reconstruction of BANC is restricted to authorized users. If you are a member of the BANC community (see [Collaborative community](../../wiki#collaborative-community) on this repo's wiki) and have been granted access, you can generate an API key by visiting [https://global.daf-apis.com/auth/api/v1/create_token](https://global.daf-apis.com/auth/api/v1/create_token) and logging in with your BANC-authorized google account. Copy the key that is displayed, then run the following commands in python to save your key to the appropriate file:
```python
import banc
banc.save_cave_credentials("THE API KEY YOU COPIED")
```

Alternatively, you can manually do what the command above accomplishes, which is to create a text file at `~/.cloudvolume/secrets/cave-secret.json` with these contents:

    {
      "token": "THE API KEY YOU COPIED",
      "brain_and_nerve_cord": "THE API KEY YOU COPIED"
    }

You can verify that your API key has been saved successfully by running:
```python
import banc
client = banc.get_caveclient()
```

### Optional installation steps for additional functionality

#### Install Elastix to transform neurons into alignment with the VNC template
The mesh manipulation and coordinate transform code requires `pytransformix`, which is itself a Python wrapper for Elastix. Therefore, Elastix must be installed and its lib and bin paths must be appended to the `LD_LIBRARY_PATH` and `PATH` environment variables. See [`pytransformix` documentation](https://github.com/jasper-tms/pytransformix#installation) for specific instructions.

## Documentation
- First go through [`fanc_python_package_examples.ipynb`](https://github.com/jasper-tms/BANC-fly-connectome/blob/main/example_notebooks/fanc_python_package_examples.ipynb)
- Then check out other notebooks in [`example_notebooks/`](https://github.com/jasper-tms/BANC-fly-connectome/tree/main/example_notebooks)
- Finally you can [browse the code](https://github.com/jasper-tms/BANC-fly-connectome/tree/main/banc), check out modules that have names that interest you, and read the docstrings.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jasper-tms/the-BANC-fly-connectome",
    "name": "banc",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Jasper Phelps",
    "author_email": "jasper.s.phelps@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/cf/81/141dfe579b3b5fcf2bada21778cacdadec4904409ff6f68f1866970b6576/banc-0.4.0.tar.gz",
    "platform": null,
    "description": "# The Brain And Nerve Cord fly connectome\n\nThe BANC (pronounced \"bank\") is the Brain And Nerve Cord, a GridTape-TEM dataset of an adult _Drosophila melanogaster_'s entire central nervous system. This dataset was generated by [Jasper Phelps](http://jasper.science) and [Minsu Kim](https://www.linkedin.com/in/mindy-minsu-kim/) in Wei-Chung Lee's lab at Harvard Medical School. A paper describing the dataset is currently in preparation.\n\nThis repository contains:\n- A python package for interacting with the connectome data (see the folder [`banc/`](banc), and installation instructions below).\n  - The `banc` package is a fork on the `fanc` (Female Adult Nerve Cord) package, which can be found at the [upstream repository](https://github.com/htem/FANC_auto_recon). Note that to make it easier to synchronize new features in `banc` and `fanc` packages, the folder `banc/` in this repo is a link to the folder `fanc/` \u2013 but files in this repo's version of the `fanc/` folder have been adapted for use with the BANC.\n- Other information about the dataset and about the community effort to proofread the connectome (see the [wiki](https://github.com/jasper-tms/BANC-fly-connectome/wiki)).\n\nHave any questions? Please [open an issue](https://github.com/jasper-tms/BANC-fly-connectome/issues/new) or contact [Jasper Phelps (jasper.s.phelps@gmail.com)](http://jasper.science).\n\n## Installing and configuring the `banc` python package\n\n### Before you start\n\nAs is always the case in python, consider making a virtual environment (using your preference of virtualenv/virtualenvwrapper or conda) before installing.\n\n### Installation option 1: pip install from PyPI\n\n    pip install banc\n\n### Installation option 2: pip install directly from GitHub\nThe code on GitHub will sometimes be slightly more up to date than the version on PyPI\n\n    pip install git+https://github.com/jasper-tms/BANC-fly-connectome.git\n\n### Installation option 3: Clone then install\nThis is the best option if you want to make changes yourself to the code\n\n    cd ~/repos  # or wherever you keep your repos\n    git clone https://github.com/jasper-tms/BANC-fly-connectome.git\n    cd BANC-fly-connectome\n    pip install -e .\n\n### Troubleshooting\nDepending on your Python 3 version and your operating system, you may need to battle some bugs in order to get the `pip install` commands above to succeed.\n\nIf you get something that looks like\n\n    .. ERROR:: Could not find a local HDF5 installation.\n       You may need to explicitly state where your local HDF5 headers and\n       library can be found by setting the ``HDF5_DIR`` environment\n       variable or by using the ``--hdf5`` command-line option.\n\nand you're on a Mac, install `brew` (https://brew.sh) if you haven't yet, then use `brew` to install HDF5 with `brew install hdf5`, then put `HDF5_DIR=/opt/homebrew/opt/hdf5` in front of your `pip install` command (e.g. `HDF5_DIR=/opt/homebrew/opt/hdf5 pip install banc`).\n\nIf you get an error that contains\n\n    Error compiling Cython file:\n    ...\n    Cython.Compiler.Errors.CompileError: tables/utilsextension.pyx\n\ntry to `pip install` the latest version of `tables` from GitHub by running `HDF5_DIR=/opt/homebrew/opt/hdf5 pip install git+https://github.com/PyTables/PyTables`, or alternatively, use conda to install it (`conda install tables`). After you get this package installed successfully, try installing `banc` again.\n\n### Provide credentials\n\nAccess to the latest reconstruction of BANC is restricted to authorized users. If you are a member of the BANC community (see [Collaborative community](../../wiki#collaborative-community) on this repo's wiki) and have been granted access, you can generate an API key by visiting [https://global.daf-apis.com/auth/api/v1/create_token](https://global.daf-apis.com/auth/api/v1/create_token) and logging in with your BANC-authorized google account. Copy the key that is displayed, then run the following commands in python to save your key to the appropriate file:\n```python\nimport banc\nbanc.save_cave_credentials(\"THE API KEY YOU COPIED\")\n```\n\nAlternatively, you can manually do what the command above accomplishes, which is to create a text file at `~/.cloudvolume/secrets/cave-secret.json` with these contents:\n\n    {\n      \"token\": \"THE API KEY YOU COPIED\",\n      \"brain_and_nerve_cord\": \"THE API KEY YOU COPIED\"\n    }\n\nYou can verify that your API key has been saved successfully by running:\n```python\nimport banc\nclient = banc.get_caveclient()\n```\n\n### Optional installation steps for additional functionality\n\n#### Install Elastix to transform neurons into alignment with the VNC template\nThe mesh manipulation and coordinate transform code requires `pytransformix`, which is itself a Python wrapper for Elastix. Therefore, Elastix must be installed and its lib and bin paths must be appended to the `LD_LIBRARY_PATH` and `PATH` environment variables. See [`pytransformix` documentation](https://github.com/jasper-tms/pytransformix#installation) for specific instructions.\n\n## Documentation\n- First go through [`fanc_python_package_examples.ipynb`](https://github.com/jasper-tms/BANC-fly-connectome/blob/main/example_notebooks/fanc_python_package_examples.ipynb)\n- Then check out other notebooks in [`example_notebooks/`](https://github.com/jasper-tms/BANC-fly-connectome/tree/main/example_notebooks)\n- Finally you can [browse the code](https://github.com/jasper-tms/BANC-fly-connectome/tree/main/banc), check out modules that have names that interest you, and read the docstrings.\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Tools for the GridTape-TEM dataset of an adult female fly's Brain And Nerve Cord",
    "version": "0.4.0",
    "project_urls": {
        "Homepage": "https://github.com/jasper-tms/the-BANC-fly-connectome"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fcb130b0c5e1a6da1d7d9252d625bd3c2017d3f11c2a92490ac1696f825b6444",
                "md5": "acd5cc5a2fc7b0109ececb7ee7b6d8ed",
                "sha256": "5a105e11f18702ff085db2ce5a8c6daf6aa7a043c8830839125631a2819fceba"
            },
            "downloads": -1,
            "filename": "banc-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "acd5cc5a2fc7b0109ececb7ee7b6d8ed",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 72405,
            "upload_time": "2024-04-14T16:20:52",
            "upload_time_iso_8601": "2024-04-14T16:20:52.614029Z",
            "url": "https://files.pythonhosted.org/packages/fc/b1/30b0c5e1a6da1d7d9252d625bd3c2017d3f11c2a92490ac1696f825b6444/banc-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cf81141dfe579b3b5fcf2bada21778cacdadec4904409ff6f68f1866970b6576",
                "md5": "645b9fea9c6051f8f0219fe2edc9a28d",
                "sha256": "0787d823ed589464dabbb2b3a2c4e154a6f52f60a993c7bfd61223a98d4d3d54"
            },
            "downloads": -1,
            "filename": "banc-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "645b9fea9c6051f8f0219fe2edc9a28d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 67272,
            "upload_time": "2024-04-14T16:20:54",
            "upload_time_iso_8601": "2024-04-14T16:20:54.397452Z",
            "url": "https://files.pythonhosted.org/packages/cf/81/141dfe579b3b5fcf2bada21778cacdadec4904409ff6f68f1866970b6576/banc-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-14 16:20:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jasper-tms",
    "github_project": "the-BANC-fly-connectome",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "matplotlib",
            "specs": []
        },
        {
            "name": "cloud-volume",
            "specs": []
        },
        {
            "name": "python-catmaid",
            "specs": []
        },
        {
            "name": "meshparty",
            "specs": []
        },
        {
            "name": "navis",
            "specs": []
        },
        {
            "name": "flybrains",
            "specs": []
        },
        {
            "name": "transformix",
            "specs": []
        },
        {
            "name": "nglui",
            "specs": []
        },
        {
            "name": "pyperclip",
            "specs": []
        },
        {
            "name": "numpyimage",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "connected-components-3d",
            "specs": []
        },
        {
            "name": "fill_voids",
            "specs": []
        },
        {
            "name": "task-queue",
            "specs": []
        },
        {
            "name": "caveclient",
            "specs": []
        },
        {
            "name": "cloud-files",
            "specs": []
        },
        {
            "name": "urllib3",
            "specs": []
        },
        {
            "name": "trimesh",
            "specs": []
        },
        {
            "name": "pcg_skel",
            "specs": []
        },
        {
            "name": "anytree",
            "specs": []
        }
    ],
    "lcname": "banc"
}
        
Elapsed time: 0.20905s