Allen Mouse Common Coordinate Framework - Average Brain Template

Allen Mouse Common Coordinate Framework - Average Brain Template. Neurophysiology / NWB data on the DANDI Archive (4 assets, 364.0 MB). License: spdx:CC-BY-4.0.

Category
Neuroscience
Provider
Ng, Lydia
License
spdx:CC-BY-4.0
Hosted on
Amazon S3, bucket dandiarchive/dandisets/000066, us-east-2
Access
Free and public. No account with the data provider is needed.
Source
https://dandiarchive.org/dandiset/000066
Data structure and loading code

Fields

assets.jsonld[]path, contentSize, encodingFormat (application/x-nwb), contentUrl[api download url, s3 blob url], digest…
dandiset.jsonldname, description, license, doi, citation, contributor[], assetsSummary{numberOfBytes, numberOfFiles, numberOfSubjects…

Files

Allen Mouse CCF average template only (4 NIfTI files at 10/25/50/100 um), no NWB. The annotation volumes and full CCF live in the "Allen Mouse Brain Common Coordinate Framework" http archive (download.alleninstitute.org/informatics-archive/current-release/mouse_ccf).

What the mount contains: /mnt/archive/draft/{assets.jsonld, assets.yaml, collection.jsonld, dandiset.jsonld, dandiset.yaml}. NOTHING ELSE. The 4 data files (382 MB) are content-addressed blobs at s3://dandiarchive/blobs/<a>/<b>/<uuid>, resolved per asset from assets.jsonld (contentUrl[1]) or via the DANDI API; the bucket is public (anonymous read).

Logical layout (asset paths):
  derivatives/templatecreator/average_template_100.nii.gz  (749 KB)
  derivatives/templatecreator/average_template_50.nii.gz  (5 MB)
  derivatives/templatecreator/average_template_25.nii.gz  (33 MB)
  derivatives/templatecreator/average_template_10.nii.gz  (343 MB)
  extensions: .gz x4
  file sizes: min 749 KB, median 33 MB, max 343 MB
  license: spdx:CC-BY-4.0

Example file: derivatives/templatecreator/average_template_100.nii.gz — 749 KB at s3://dandiarchive/blobs/109/987/10998707-1470-4180-ba3c-30d7cafab7ad

Load the data

import json, os, glob, collections
M = os.environ.get("SCIGANTIC_MOUNT_PATH", "/mnt/archive")
# The mount holds ONLY the dandiset metadata; the NWB files are content-addressed blobs elsewhere in the
# public dandiarchive bucket. assets.jsonld maps each logical path to its blob URL.
versions = sorted(d for d in os.listdir(M) if os.path.isdir(f"{M}/{d}"))
ver = "draft" if "draft" in versions else versions[-1]
assets = json.load(open(f"{M}/{ver}/assets.jsonld"))
assets = assets.get("@graph", assets) if isinstance(assets, dict) else assets
print(f"version {ver}: {len(assets)} assets, {sum(a.get('contentSize', 0) for a in assets)/1e9:.1f} GB")
def blob_key(a):
    return next((u.split(".s3.amazonaws.com/", 1)[1] for u in a.get("contentUrl", []) if ".s3.amazonaws.com/" in u), None)
import re
def kind(path):   # BIDS-style suffix = last "_" token without a "-"; none => bare "session" file
    if not path.endswith(".nwb"): return os.path.splitext(path)[1] or "other"
    toks = os.path.basename(path).rsplit(".", 1)[0].split("_")
    suffix = toks[-1] if len(toks) > 1 and "-" not in toks[-1] else "session"
    return ("probe-" if any(t.startswith("probe-") for t in toks) else "") + suffix
kinds = collections.Counter(kind(a["path"]) for a in assets)
print("file kinds:", dict(kinds))
for a in sorted(assets, key=lambda a: a.get("contentSize", 0))[:10]:
    print(f"{a.get('contentSize',0)/1e6:9.1f} MB  {a['path']}  ->  s3://dandiarchive/{blob_key(a)}")

Written for a Scigantic notebook, where /mnt/archive is the mounted dataset.

Analyze this dataset without downloading it

On Scigantic, Allen Mouse Common Coordinate Framework - Average Brain Template opens in a hosted JupyterLab notebook with the data already mounted, so you can read files where they are stored instead of copying them first. Each notebook includes an AI assistant that can see the mounted files and write and run analysis code. Open the dataset page to launch a notebook, or browse the full catalog.

Related Neuroscience datasets