Skip to main content

scigantic-facebase

CI PyPI PyPI - Python Version License

Search FaceBase, the craniofacial research data hub, and read its open-access data from Python.

FaceBase holds about 1,070 open datasets: micro-CT and light-sheet imaging, ChIP-seq and RNA-seq tracks, expression tables and more, from mouse, zebrafish, human and other models. This package is a typed layer over FaceBase's open metadata API and file store. No key or login is needed.

Browse more open scientific datasets in the Scigantic catalog.

Installation

$ pip install scigantic-facebase

Quickstart

import scigantic_facebase as fb

hits = fb.search("zebrafish thyroid microCT")     # newest first
ds = hits[0]
print(ds.title, ds.doi_url)
print(fb.cite(ds))

files = fb.files(ds)                               # size, MD5, download URL
fb.download(files[0], "data/")                     # MD5-checked

Search matches every word against the whole record, and treats "zebrafish" and "Danio rerio", "mouse" and "Mus musculus" as the same thing.

Read a micro-CT scan without downloading it

Many micro-CT datasets are a zip of TIFF slices. A zip keeps its directory at the end, so one slice costs one HTTP range request.

stack = fb.microct.open_stack(files[0])
len(stack)                  # 596 slices
stack.voxel_size_um         # 10.5, from the scan log
img = stack.read_slice(300)
vol = stack.volume(step=10) # every 10th slice, (z, y, x)
stack.bytes_fetched         # a few MB of a 49 MB file

fb.microct.thyroid_atlas() lists the zebrafish thyroid-hormone atlas: 81 head scans from 12 to 25 mm standard length, raised hypothyroid, euthyroid or hyperthyroid.

fb.open_remote(file) gives any FaceBase file as a seekable file object backed by range requests, which zipfile, tifffile and h5py accept.

What is not here

Protected human-subjects datasets sit behind FaceBase's data access request. Their metadata is public and fb.search(include_protected=True) lists them, but reading their files raises FacebaseAccessError.

Terms of use

Copyright to FaceBase data belongs to the contributing investigators. FaceBase's Terms of Use ask users to cite the dataset, acknowledge FaceBase, and send other people to FaceBase instead of circulating downloaded files. fb.cite() produces the citation. This package fetches from FaceBase on request and does not mirror anything.

License

MIT-0 for this code. The data carries its own terms.

Metadata

Release files for scigantic-facebase 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scigantic-facebase 0.1.1
File Size Uploaded Provenance Actions
scigantic_facebase-0.1.1.tar.gz 15.4 kB Without provenance Details for scigantic_facebase-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scigantic-facebase 0.1.1
File Interpreter ABI Platform Actions
scigantic_facebase-0.1.1-py3-none-any.whl Python 3 none any Details for scigantic_facebase-0.1.1-py3-none-any.whl

Total release size: 29.7 kB

Release files / scigantic_facebase-0.1.1.tar.gz

Download URL scigantic_facebase-0.1.1.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8460d12f26bf6c99883f72f103fa8c2cbbf8963dc6598ae0b7d49bec134be20a
BLAKE2b-256 checksum
How to use checksums
257a4e144f33513c7ce1394e8df87d663a7bfb5ad8b35e9ae2cd415b2accb720
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Release files / scigantic_facebase-0.1.1-py3-none-any.whl

Download URL scigantic_facebase-0.1.1-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c004156d38b197f8576b729ba9faa31b55793d4507a50ad5a72adc98f4ac16b3
BLAKE2b-256 checksum
How to use checksums
b386fd021be08555d2f86ac00e1da73621265583096560a8892fa07a65f35195
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Security for scigantic-facebase 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page