-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a higher level `BIDSTable` interface inspired by the [proposed PyBIDS API redesign](bids-standard/pybids#989). * Move entities module one level up * Move `join_bids_path()` helper into `entities` * Add `BIDSTable` subclass of `DataFrame` Add `BIDSTable` subclass of `DataFrame` with convenience methods for accessing subtables and flattened metadata. * Add long names to entities field metadata * Add table `filter()` method Add `BIDSTable.filter()` which filters rows according to a condition applied to a single column. The supported conditions follow `pandas.Series.filter()`. * Add `files` property returning list of `BIDSFile`s Also change `file` column group to `finfo` to try to limit possible confusion. * Update example and bug fixes Bug fixes: - Set the index of `flat_metadata` to the parent table's index. - Treat NA in the row mask as False in `filter()`. * Add properties for subjects, datatypes, etc * Add `sort_entities()` * Upgrade required python to >=3.8 * Add `filter_multi` method and documentation PyBIDS supports querying a layout with multiple filters specified as keyword arguments. This is a nice interface, and is also useful for programmatic filtering. Here we add a `filter_multi()` method to do something similar. * Flatten JSON metadata only to first level * Fix mypy error * Move some things around * Add `func` arg to `filter()` Add a `func` arg option to `filter` for arbitrary lambda function filtering. Also move `join_bids_path()` into the `table` module. * More moving around * Don't use `removeprefix` * Yet more moving around * Update example * Add a comment on the filter api * Change arg name output -> index_path Having the argument be `output` in `bids2table` was confusing when you only want to load a table.
- Loading branch information
Showing
19 changed files
with
2,521 additions
and
743 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,20 @@ | ||
""" | ||
Efficiently index large-scale BIDS datasets and derivatives | ||
Efficiently index and query large-scale BIDS datasets and derivatives. | ||
""" | ||
|
||
from ._bids2table import bids2table # noqa | ||
# Register elbow extension types | ||
import elbow.dtypes # noqa | ||
|
||
from ._b2t import bids2table | ||
from ._version import __version__, __version_tuple__ # noqa | ||
from .entities import BIDSEntities, parse_bids_entities | ||
from .table import BIDSFile, BIDSTable, join_bids_path | ||
|
||
__all__ = [ | ||
"bids2table", | ||
"BIDSTable", | ||
"BIDSFile", | ||
"BIDSEntities", | ||
"parse_bids_entities", | ||
"join_bids_path", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
""" | ||
[Elbow](https://github.com/cmi-dair/elbow) extract functions for BIDS datasets. | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.