Skip to main content

Automated mouse atlas propagation

Project description

Python Version PyPI Wheel Development Status Travis Coverage Status Dependabot Status Code style: black Gitter DOI

amap-python

Automated mouse atlas propagation

About

amap is python software for registration of brain templates to sample whole-brain microscopy datasets, and subsequent atlas-based segmentation by Adam Tyson, Charly Rousseau & Christian Niedworok from the Margrie Lab at the Sainsbury Wellcome Centre.

This is a Python port of aMAP (originally written in Java), which has been validated against human segmentation.

The actual registration is carried out by NiftyReg.

Details

The aim of amap is to register the template brain (e.g. from the Allen Reference Atlas) to the sample image. Once this is complete, any other image in the template space can be aligned with the sample (such as region annotations, for segmentation of the sample image). The template to sample transformation can also be inverted, allowing sample images to be aligned in a common coordinate space.

To do this, the template and sample images are filtered, and then registered in a three step process (reorientation, affine registration, and freeform registration.) The resulting transform from template to standard space is then applied to the atlas.

Full details of the process are in the original paper. process Overview of the registration process

Installation

pip install amap

Usage

amap was designed with generality in mind, but is currently used for a single application. If anyone has different uses (e.g. requires a different atlas, or the data is in a different format), please get in touch by email or by raising an issue.

Basic usage

amap /path/to/raw/data /path/to/output/directory -x 2 -y 2 -z 5

Arguments

Mandatory

  • Path to the directory of the images. Can also be a text file pointing to the files.
  • Output directory for all intermediate and final results

Either

  • -x or --x-pixel-um Pixel spacing of the data in the first dimension, specified in um.
  • -y or --y-pixel-um Pixel spacing of the data in the second dimension, specified in um.
  • -z or --z-pixel-um Pixel spacing of the data in the third dimension, specified in um.

Or

  • --metadata Metadata file containing pixel sizes (any format supported by micrometa can be used). If both pixel sizes and metadata are provided, the command line arguments will take priority.

Additional options

  • -d or --downsample Paths to N additional channels to downsample to the same coordinate space.

Full command-line arguments are available with amap -h, but please get in touch if you have any questions.

Citing amap.

If you find amap useful, and use it in your research, please cite the original Nature Communications paper along with this repository:

Adam L. Tyson, Charly V. Rousseau, Christian J. Niedworok and Troy W. Margrie (2019). amap: automatic atlas propagation. doi:10.5281/zenodo.3582162

Visualisation

amap has a built in visualisation function (built using napari).

Usage

amap_vis /path/to/amap/output/directory

Mandatory

  • Path to amap output directory

Additional options

  • -r or --raw. Rather than viewing the downsampled data, view the raw data at full resolution. This will stream image planes as required, and so may be slow.
  • -c or --raw-channels Paths to N additional channels to view. Will only work if using the raw image viewer.

N.B. If you have a high-resolution monitor, the scaling of the viewer may not work, this is a known napari issue.

amap_viewer

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

amap-0.1.20rc1.tar.gz (22.8 kB view details)

Uploaded Source

Built Distribution

amap-0.1.20rc1-py3-none-any.whl (40.6 kB view details)

Uploaded Python 3

File details

Details for the file amap-0.1.20rc1.tar.gz.

File metadata

  • Download URL: amap-0.1.20rc1.tar.gz
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.10

File hashes

Hashes for amap-0.1.20rc1.tar.gz
Algorithm Hash digest
SHA256 684675ddd77f2e310716c380c83677a55f0627a463b5d397cec86e4832221294
MD5 006316b0e7edea9d994023fa95af0390
BLAKE2b-256 02d6054219885c09ebff38ac84f5387408e8756d659b0b094df29291a22279e1

See more details on using hashes here.

File details

Details for the file amap-0.1.20rc1-py3-none-any.whl.

File metadata

  • Download URL: amap-0.1.20rc1-py3-none-any.whl
  • Upload date:
  • Size: 40.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.10

File hashes

Hashes for amap-0.1.20rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 9945bcef4e703fef1b22f0c0127eea064a5803cfc535d788a23acad2a0d0e8fc
MD5 485b9bc4c1721acdca9944a563e0d1f1
BLAKE2b-256 4298d884a27a72cfbf5afcc94fe2fe96c604113a01dd3c956d4119a8dca928df

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page