BIDS Query Language - A powerful SQL-like query language for BIDS neuroimaging datasets
Project description
BIQL - BIDS Query Language
A powerful query language for Brain Imaging Data Structure (BIDS) datasets that allows you to search, filter, and extract information using SQL-like syntax.
Features
- Entity-based queries: Search by BIDS entities (subject, session, task, run, etc.)
- Logical operators: AND, OR, NOT with proper bracketing support
- Advanced filtering: Wildcards, regular expressions, range queries
- Metadata queries: Access JSON sidecar metadata with dot notation
- Multiple output formats: JSON, table, CSV, file paths
- SQL-like syntax: SELECT, WHERE, GROUP BY, ORDER BY clauses
Installation
pip install biql
Quick Start
# Find all T1w anatomical files
biql "suffix=T1w"
# Find functional files for specific subjects
biql "subject IN ['01', '02'] AND datatype=func"
# Complex query with metadata filtering
biql "task=rest AND metadata.RepetitionTime<3.0"
# Select specific fields and format as table
biql "SELECT subject, session, filepath WHERE datatype=anat FORMAT table"
Query Language Syntax
Basic Entity Queries
subject=01
task=rest
datatype=func
run=[1:5]
Logical Operations
subject=01 AND task=rest
(subject=01 OR subject=02) AND datatype=func
NOT task=localizer
Wildcards and Patterns
subject=control*
task=*memory*
suffix~=/T[12]w/
Metadata Queries
metadata.RepetitionTime<3.0
metadata.EchoTime=[0.01:0.05]
participants.age>18
SELECT Clauses
SELECT subject, session, filepath WHERE task=rest
SELECT COUNT(*) GROUP BY subject
SELECT DISTINCT datatype
Documentation
For complete documentation, examples, and API reference, visit: https://biql.readthedocs.io
License
MIT License - see LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file biql-0.1.0.tar.gz.
File metadata
- Download URL: biql-0.1.0.tar.gz
- Upload date:
- Size: 36.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
155ec677293f6b75a655d7a705296406e241e0b556446332ef03f2eaae6968c4
|
|
| MD5 |
9ebd3184d6e357aaad4ac465f6135c42
|
|
| BLAKE2b-256 |
e305f6749591c1ee28f95b7261ea7131cc087d8afbc335f40d33b932b3273046
|
Provenance
The following attestation bundles were made for biql-0.1.0.tar.gz:
Publisher:
publish.yaml on astewartau/biql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
biql-0.1.0.tar.gz -
Subject digest:
155ec677293f6b75a655d7a705296406e241e0b556446332ef03f2eaae6968c4 - Sigstore transparency entry: 254494923
- Sigstore integration time:
-
Permalink:
astewartau/biql@5c59daffb4b8cc6275a2bfa1a6e461301bbf29b2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/astewartau
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@5c59daffb4b8cc6275a2bfa1a6e461301bbf29b2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file biql-0.1.0-py3-none-any.whl.
File metadata
- Download URL: biql-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8544943e21b45c5e0bb56597b22a3ecebe458b883f92bee72811033781b004ab
|
|
| MD5 |
269f710a76cacdf613810ffc31824378
|
|
| BLAKE2b-256 |
1596cfa843fbc525b665ee8b2ea2fc665ac33c7f37feef444e5dc6f728901560
|
Provenance
The following attestation bundles were made for biql-0.1.0-py3-none-any.whl:
Publisher:
publish.yaml on astewartau/biql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
biql-0.1.0-py3-none-any.whl -
Subject digest:
8544943e21b45c5e0bb56597b22a3ecebe458b883f92bee72811033781b004ab - Sigstore transparency entry: 254494925
- Sigstore integration time:
-
Permalink:
astewartau/biql@5c59daffb4b8cc6275a2bfa1a6e461301bbf29b2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/astewartau
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@5c59daffb4b8cc6275a2bfa1a6e461301bbf29b2 -
Trigger Event:
release
-
Statement type: