Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken links #100

Merged
merged 5 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docs_build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
name: Build Sphinx Docs
runs-on: ubuntu-latest
steps:
- uses: neuroinformatics-unit/actions/build_sphinx_docs@v2
- uses: neuroinformatics-unit/actions/build_sphinx_docs@main

deploy_sphinx_docs:
name: Deploy Sphinx Docs
Expand Down
4 changes: 2 additions & 2 deletions docs/source/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Introduction
The BrainGlobe Initiative (BGI) was established by researchers at the
[Sainsbury Wellcome Centre](https://www.sainsburywellcome.org) and the [
Technical University of Munich](https://www.tum.de/en/).
[Sainsbury Wellcome Centre](https://www.sainsburywellcome.org/web/) and the
[Technical University of Munich](https://www.tum.de/en/).

The core goal of BrainGlobe is to develop a suite of Python-based software tools for computational neuroanatomy.
We have developed several software packages to access, analyze and visualize anatomical data. By ensuring the
Expand Down
6 changes: 4 additions & 2 deletions docs/source/community/developers/tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ reason, we use [pre-commit](https://pre-commit.com/). Running `pre-commit instal
[pre-commit hooks](https://pre-commit.com/) to ensure the code is formatted correctly. Currently, these are:
* [black](https://black.readthedocs.io/en/stable/) for code structure formatting (maximum line length set to 79)
* [mypy](https://mypy.readthedocs.io/en/stable/index.html) a static type checker
* [ruff](https://github.com/charliermarsh/ruff) does a number of jobs, including enforcing PEP8 and sorting imports
* [ruff](https://github.com/astral-sh/ruff) does a number of jobs, including enforcing PEP8 and sorting imports

These will prevent code from being committed if any of these hooks fail. To run them individually:
```bash
Expand Down Expand Up @@ -38,7 +38,9 @@ We use [semantic versioning](https://semver.org/), which uses a `MAJOR`.`MINOR`.
### Automated versioning
[`setuptools_scm`](https://github.com/pypa/setuptools_scm) can be used to automatically version each package. It has
been pre-configured in the `pyproject.toml` file.
[`setuptools_scm` will automatically infer the version using git](https://github.com/pypa/setuptools_scm#default-versioning-scheme). To manually set a new semantic version, create a tag and make sure the tag is pushed to GitHub. Make sure you commit any changes you wish to be included in this version. E.g. to bump the version to `1.0.0`:
`setuptools_scm` will automatically infer the version using git. To manually set a new semantic version, create a tag
and make sure the tag is pushed to GitHub. Make sure you commit any changes you wish to be included in this version.
E.g., to bump the version to `1.0.0`:

```bash
git add .
Expand Down
4 changes: 2 additions & 2 deletions docs/source/community/roadmaps/november-2023.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ easier to maintain and further develop in the long-term. We hope this will ensu
* BrainGlobe Atlas API provides a consistent interface to multiple anatomical atlases
* Separate tools for 3D cell detection ([`cellfinder-core`](https://github.com/brainglobe/cellfinder-core)),
3D atlas registration([`brainreg`](https://github.com/brainglobe/brainreg)), bulk segmentation
([`brainreg-segment`](https://github.com/brainglobe/brainreg-segment)) and 3D
([`brainreg-segment`](https://github.com/brainglobe/brainglobe-segmentation)) and 3D
visualisation ([`brainrender`](https://github.com/brainglobe/brainrender))
* Plugins for 3D cell detection ([`cellfinder-napari`](https://github.com/brainglobe/cellfinder-napari)) and
registration ([`brainreg-napari`](https://github.com/brainglobe/brainreg-napari))
Expand All @@ -33,7 +33,7 @@ registration ([`brainreg-napari`](https://github.com/brainglobe/brainreg-napari)
* Atlas registration ([`brainreg-napari`](https://github.com/brainglobe/brainreg-napari))
* Cell detection ([`cellfinder-napari`](https://github.com/brainglobe/cellfinder-napari))
* Assign cells to brain regions (TBC)
* Analyse arbitrary ROIs ([`brainreg-segment`](https://github.com/brainglobe/brainreg-segment))
* Analyse arbitrary ROIs ([`brainreg-segment`](https://github.com/brainglobe/brainglobe-segmentation))
* Visualisation ([`brainrender-napari`](https://github.com/brainglobe/brainrender-napari))
* Automated benchmarks for analysis tools (cell detection & 3D atlas registration) on "real" (full size) data
* Combine napari plugins with backend to reduce number of repositories
Expand Down
3 changes: 3 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,6 @@

# needed for GH pages (vs readthedocs)
notfound_urls_prefix = None


linkcheck_ignore = ["https://neuromorpho.org/"]
2 changes: 1 addition & 1 deletion docs/source/contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ The BrainGlobe Initiative is only possible due to the hard work of many, many pe

:::{grid-item-card} Patrick Roddy
:img-bottom: https://avatars.githubusercontent.com/u/15052188?v=4?
:link: https://github.com/padddyroddy
:link: https://github.com/paddyroddy
:::

:::{grid-item-card} Adrien Berchet
Expand Down
18 changes: 12 additions & 6 deletions docs/source/documentation/bg-atlasapi/adding-a-new-atlas.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Do not use 0 (zero) as the id of a structure, because the annotation stack will
**Atlas generation takes place in two steps:**

1. Generate an “Atlas script” written in python
2. Use the atlas generation code [available from BrainGlobe](https://github.com/brainglobe/bg-atlasgen/tree/master/bg\_atlasgen)
2. Use the atlas generation code [available from BrainGlobe](https://github.com/brainglobe/bg-atlasgen/tree/main/bg\_atlasgen)
3. to generate the atlas from the atlas script.

### Atlas scripts
Expand Down Expand Up @@ -126,8 +126,6 @@ However, regions’ meshes are used frequently by BrainGlobe tools,
especially in `brainrender` for visualizing anatomical data in 3D.
For this reason,
the atlas generation code from BrainGlobe provides functionality that can be used to generate such mesh files.
This code (https://github.com/brainglobe/bg-atlasgen/blob/86caab99317359e5f791c991febb12589c5ced8a/bg\_atlasgen/mesh\_utils.py#L125)
can be used to generate a region’s mesh starting from the annotated image.
A mask image is created which only contains the annotation for the brain region of interest,
and a marching cubes algorithm is used to identify the surface of the region;
finally, a mesh is created from the output of the marching cubes algorithm, and the results are saved to a .obj file.
Expand Down Expand Up @@ -157,9 +155,17 @@ and they will open as an image layer, and a label layer, respectively. You know
looking at upright (dorsal top, ventral bottom) frontal sections, and when you scroll the slider to inspect sections
with a higher index, you are moving from anterior to posterior.

To inspect the meshes, BrainGlobe provides
[code](https://github.com/brainglobe/bg-atlasgen/blob/86caab99317359e5f791c991febb12589c5ced8a/bg\_atlasgen/mesh\_utils.py#L227) to
load and visualize a set of .obj files for quick inspection. Once an atlas is created with BrainGlobe’s atlas generation tools,
To inspect the meshes, BrainGlobe provides a simple tool
load and visualize a set of .obj files for quick inspection, e.g.:

```python
from bg_atlasgen.mesh_utils import inspect_meshes_folder

inspect_meshes_folder("/home/username/.brainglobe/temp/allen_mouse_10um_v1.0/meshes")
```


Once an atlas is created with BrainGlobe’s atlas generation tools,
it can be used with most software from the BrainGlobe software suite, including [brainrender](/documentation/brainrender/index)
which provides a convenient GUI for visually inspecting the generated atlas meshes.

Expand Down
13 changes: 8 additions & 5 deletions docs/source/documentation/bg-atlasapi/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# BrainGlobe Atlas API (bg-atlasapi)
Many excellent brain atlases exist for different species. Some of them have an API (application programming interface) to allow users to interact with the data programmatically (e.g. the excellent [Allen Mouse Brain Atlas](https://www.brain-map.org)), but many do not, and there is no consistent way to process data from multiple sources.
Many excellent brain atlases exist for different species. Some of them have an API (application programming interface)
to allow users to interact with the data programmatically (e.g. the excellent
[Allen Mouse Brain Atlas](https://portal.brain-map.org)), but many do not, and there is no consistent way to process
data from multiple sources.

The brainglobe atlas API (BG-AtlasAPI) deals with this problem by providing a common interface for programmers to download and process data from multiple sources.

Expand All @@ -15,14 +18,14 @@ Each atlas consists of data files in a common format:

A number of atlases are in development, but those available currently are:

* [Allen Mouse Brain Atlas](https://www.brain-map.org) at 10, 25, 50 and 100 micron resolutions
* [Allen Human Brain Atlas](https://www.brain-map.org) at 100 micron resolution
* [Allen Mouse Brain Atlas](https://portal.brain-map.org/) at 10, 25, 50 and 100 micron resolutions
* [Allen Human Brain Atlas](https://portal.brain-map.org/) at 100 micron resolution
* [Max Planck Zebrafish Brain Atlas](http://fishatlas.neuro.mpg.de) at 1 micron resolution
* [Enhanced and Unified Mouse Brain Atlas](https://kimlab.io/brain-map/atlas/) at 10, 25, 50 and 100 micron resolutions
* [Smoothed version of the Kim et al. mouse reference atlas](https://doi.org/10.1016/j.celrep.2014.12.014) at 10, 25, 50 and 100 micron resolutions
* [Gubra's LSFM mouse brain atlas](https://doi.org/10.1007/s12021-020-09490-8) at 20 micron resolution
* [3D version of the Allen mouse spinal cord atlas](https://doi.org/10.1101/2021.05.06.443008) at 20 x 10 x 10 micron resolution
* [AZBA: A 3D Adult Zebrafish Brain Atlas](https://doi.org/10.1101/2021.05.04.442625) at 4 micron resolution
* [3D version of the Allen mouse spinal cord atlas](https://doi.org/10.1016/j.crmeth.2021.100074) at 20 x 10 x 10 micron resolution
* [AZBA: A 3D Adult Zebrafish Brain Atlas]( https://doi.org/10.7554/eLife.69988) at 4 micron resolution
* [Waxholm Space atlas of the Sprague Dawley rat brain](https://doi.org/10.1016/j.neuroimage.2014.04.001) at 39 micron resolution
* [3D Edge-Aware Refined Atlases Derived from the Allen Developing Mouse Brain Atlases](https://doi.org/10.7554/eLife.61408) (E13, E15, E18, P4, P14, P28 & P56)
* [Princeton Mouse Brain Atlas](https://brainmaps.princeton.edu/2020/09/princeton-mouse-brain-atlas-links) at 20 micron resolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ unique key (e.g. `example_mouse_100um` must be used).
# Available atlases

## Mouse
### [Allen Adult Mouse Brain Atlas](https://www.brain-map.org)
### [Allen Adult Mouse Brain Atlas](https://portal.brain-map.org)
For many researchers working with mice, this is the "default" atlas for a variety of tasks. It is also the basis for
the most commonly used common coordinate space (CCFv3). It is usually the best mouse atlas to start with, but it has
some disadvantages. It has a reference image based on STP, which may not produce the best
Expand Down
2 changes: 1 addition & 1 deletion docs/source/documentation/brainreg/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# brainreg

brainreg is an update to [amap](https://github.com/SainsburyWellcomeCentre/amap-python) (itself a port of the
brainreg is an update to [amap](https://github.com/SainsburyWellcomeCentre/amap_python) (itself a port of the
[original Java software](https://www.nature.com/articles/ncomms11879)) to include multiple registration backends,
and to support the many atlases provided by [bg-atlasapi](https://github.com/brainglobe/bg-atlasapi).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Choose the napari image layer you wish to be registered from `Image layer`, alon
`Atlas`. You must also set the voxel sizes in the axial (z) and in-plane (x, y) dimensions, along with the data
orientation. The orientation is defined by three letters, based on [bg-space](https://github.com/brainglobe/bg-space),
e.g. `psl`. For more details on this, see the outline
[here](https://docs.brainglobe.info/cellfinder/image-orientation#orientation). Lastly, set an `Output directory`
[here](/documentation/setting-up/image-definition). Lastly, set an `Output directory`
(where you want to save the data).

### Registering additional channels
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ ImportError: DLL load failed: The specified module could not be found.

If this occurs on Windows, it is likely that you need to install "Microsoft Visual C++ Redistributable for Visual
Studio 2015, 2017 and 2019", available from Microsoft's website
[here](https://support.microsoft.com/en-gb/help/2977003/the-latest-supported-visual-c-downloads).
[here](https://learn.microsoft.com/en-GB/cpp/windows/latest-supported-vc-redist?view=msvc-170).

### SyntaxError: invalid syntax \(logging\)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ detected_cells = cellfinder_run(signal_array,background_array,voxel_sizes)
```

The output is a list of
[imlib Cell objects](https://github.com/adamltyson/imlib/blob/51ec5a8053e738776ceaa8d44e531b3c4b0e29d8/imlib/cells/cells.py#L15).
[imlib Cell objects](https://github.com/brainglobe/brainglobe-utils/blob/main/brainglobe_utils/cells/cells.py).
Each `Cell` has a centroid coordinate, and a type:

```python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Prerequisites

* Linux machine ([most common distributions are supported](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#linux-distributions))
* Linux machine ([most common distributions are supported](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html))
* Recent NVIDIA GPU ([compute capability](https://en.wikipedia.org/wiki/CUDA) >=3)
* [NVIDIA driver](https://www.nvidia.co.uk/Download/index.aspx?lang=en-uk) >= 418.81.07
* [Docker version](https://docs.docker.com/engine/install/) >= 19.03
Expand All @@ -11,29 +11,7 @@

**Install NVIDIA Container Toolkit**

Full instructions are [here](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#setting-up-nvidia-container-toolkit), but e.g. for Ubuntu:

**Setup repository and GPG key:**

```bash
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
&& curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - \
&& curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \
sudo tee /etc/apt/sources.list.d/nvidia-docker.list
```

**Install NVIDIA docker package:**

```bash
sudo apt-get update
sudo apt-get install -y nvidia-docker2
```

**Restart docker daemon:**

```bash
sudo systemctl restart docker
```
Full instructions are [here](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html).

## Running cellfinder

Expand Down
6 changes: 3 additions & 3 deletions docs/source/documentation/morphapi/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
available datasets. It provides a number of APIs that facilitate the download of selected neurons and functionality
to create 3d meshes with the neuronal reconstruction for visualization with packages like `brainrender`.

`morphapi` relies on the [`neurom`](https://zenodo.org/record/209498#.XraWUsZ7l24) package from the BlueBrain
`morphapi` relies on the [`neurom`](https://github.com/BlueBrain/NeuroM) package from the BlueBrain
project \([github](https://github.com/BlueBrain/NeuroM)\) to reconstruct morphology from `.swc` files and on
[`vedo`](https://github.com/marcomusy/vedo) to create 3d rendering from morphological data.

## Currently supported datasets

* [Allen brain atlas - Cell Types](https://celltypes.brain-map.org/)
* [neuromorpho.org](http://neuromorpho.org/)
* [neuromorpho.org](https://neuromorpho.org/)
* [Janelia Campus - Mouse Light project](https://www.janelia.org/project-team/mouselight)
* [Kunst et al 2019 - Zebrafish neurons](https://fishatlas.neuro.mpg.de/neurons)
* [Kunst et al 2019 - Zebrafish neurons](https://mapzebrain.org)

## Installation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ neurons = am.download_neurons(neurons[:5].id.values)

## Neuromorpho

Neuromorpho.org is a vast online repository of morphological data. The `NeuroMorpOrgAPI` class can be used to
Neuromorpho is a vast online repository of morphological data. The `NeuroMorpOrgAPI` class can be used to
download data from it. Note that given the size of this huge dataset, it is not possible to download all metadata
matching specific criteria at once.

Expand Down
3 changes: 2 additions & 1 deletion docs/source/documentation/setting-up/gpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Some BrainGlobe software will run faster if you have an NVIDIA GPU, and the appr

### Requirements

The requirements are the same as those for [tensorflow GPU support](https://www.tensorflow.org/install/gpu), but essentially you need:
The requirements are the same as those for [tensorflow GPU support](https://www.tensorflow.org/install/pip),
but essentially you need:

* A relatively modern **Windows or Linux based machine** (unfortunately, CUDA acceleration on macOS is not supported).
* An **NVIDIA GPU** with CUDA Compute Capability of 3.5 or higher (see the list
Expand Down
2 changes: 1 addition & 1 deletion docs/source/governance-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ long-term direction of the project.**

****

N.B. This governance model takes inspiration from the [Napari model.](https://napari.org/docs/0.3.8/developers/GOVERNANCE.html)
N.B. This governance model takes inspiration from the [Napari model.](https://napari.org/dev/community/governance.html)