[ENH] BEP032: Extend sample_type and add anatomical location to samples.tsv - #2484
Open
bendichter wants to merge 2 commits into
Open
[ENH] BEP032: Extend sample_type and add anatomical location to samples.tsv#2484bendichter wants to merge 2 commits into
bendichter wants to merge 2 commits into
Conversation
Follow up on the working group discussion on 2026-07-29 about the samples table. The sample_type enum was taken from ENCODE Biosample Type, which does not describe the samples that microelectrode electrophysiology works with. There was no value for a slice, which is what a patch clamp recording is usually made from, none for the block a slice is cut from, and none for a whole organ, so an extracted brain had to be recorded as a whole organism. Add whole organ, tissue block, tissue slice, single cell, and cell population, using the names openMINDS gives them so that a joint list is easier to arrive at later, and describe the enum as drawing on both sources rather than on ENCODE alone. Add optional anatomical_location and anatomical_location_id columns to samples.tsv. A sample is taken from somewhere, and until now there was no standard column to say where, even though the same information is recorded for probes and electrodes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…column Drop anatomical_location_id from samples.tsv, matching the change made to the electrode and probe tables in bids-standard#2481. BIDS already documents what the values of a tabular column mean through TermURL and Levels in the sidecar, so the identifier column duplicated machinery the standard already has. Show the sidecar form in the samples.json example. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## bep032-review #2484 +/- ##
==============================================
Coverage 83.09% 83.09%
==============================================
Files 22 22
Lines 1698 1698
==============================================
Hits 1411 1411
Misses 287 287 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows up on the working group discussion on 2026-07-29 about the samples table. This targets
bep032-review, so it merges into #2307 rather than into master.Unlike the four preceding items, this one changes modality-agnostic files rather than anything under the microephys datatypes, so it deserves wider scrutiny than the rest of the BEP. Nothing here is specific to electrophysiology, and the gaps it fills were reported independently by the atlas curation work as well.
Extending
sample_typeThe enum was taken from ENCODE Biosample Type, and it does not describe the samples this BEP deals with. There is no value for a slice, which is what a patch clamp recording is usually made from; none for the block a slice is cut from; and none for a whole organ, so an extracted brain has to be recorded as a
whole organisms, which it is not.This adds five values:
whole organ,tissue block,tissue slice,single cell, andcell population. The description now says the list draws on ENCODE Biosample Type and on the openMINDS tissue sample types, rather than on ENCODE alone, and notes that further additions may be proposed.I took only the five values that our discussion actually motivated, not the whole openMINDS list. openMINDS also has
biopsy sample,fluid specimen,hemisphere,nerve, and splits cell populations into homogeneous and heterogeneous. Adding all of them is a bigger and more speculative change, and it seemed better to add what we know we need and pursue the joint list separately.@lzehl, this is the part where you offered to raise a joint list with Tom Gillespie. Nothing here forecloses that. If a joint list comes together, these values can be reconciled with it.
Anatomical Location on
samples.tsvanatomical_locationis added as an OPTIONAL column. A sample is taken from somewhere, and until now there was no standard column to say where, even though the same information is recorded for probes and electrodes.It holds a plain human readable name. The ontology or atlas the name comes from is documented in
samples.jsonthroughTermURLandLevels, in the way BIDS documents any other tabular column, and the example shows that form.An earlier version of this PR also added an
anatomical_location_idcolumn. @effigies pointed out on #2481 that this duplicates machinery the standard already has, and he is right, so it is gone. Every other identifier column in BIDS names an entity within the dataset rather than carrying an external ontology reference, so it would have been introducing a pattern that does not otherwise exist.The column is defined as
anatomical_location__samplesso it can carry a sample-appropriate description. That also keeps this PR independent of #2481, which defines the probe and electrode variants. The two can merge in either order.Verification
bidsschematoolstests pass (81 passed, 1 skipped), as dopre-commiton the changed files andnpm run remark. I confirmed the extended enum and the new column resolve in the loaded schema and render in the samples table.The
samples.tsvandsamples.jsonexamples are updated to show a slice derived from a block, which exercisesderived_fromand the new values together. The example term resolves toUBERON:0000955for the brain, chosen because I am confident it is correct rather than because it is the most illustrative.The other items from the meeting are #2480, #2481, #2482, and #2483.