Barseq blackbox acquisition#1781
Conversation
…cquisition for two subjects, plus json outputs
| "https://www.protocols.io/view/barseq-2-5-kqdg3ke9qv25/v1" | ||
| ], | ||
| "ethics_review_id": null, | ||
| "instrument_id": "Dogwood", |
There was a problem hiding this comment.
there shouldn't be an instrument for black box
There was a problem hiding this comment.
Are you sure here? I can understand instrument not being required in a black-box acquisition. But in this case we have the instrument name and the corresponding instrument.json. I don't see a downside to including it. I can remove if you'd still prefer, but I just wanted to double check first.
There was a problem hiding this comment.
yeah, I'm sure. We are treating this as we send it to a team and they send us something back. What they do is a black box.
| # Source: /allen/aind/stage/barseq/20250303_780345_slide7_maxprojection/experiment_detail.txt | ||
| # /allen/aind/stage/barseq/20250305_780345_slide8_maxprojection/experiment_detail.txt | ||
| # /allen/aind/stage/barseq/20250317_780345_slide9_maxprojection/experiment_detail.txt | ||
| "experimenters": ["Mara Rue", "Shannon Khem", "Tracy"], |
There was a problem hiding this comment.
if we're doing black box, I'd have this be Barseq team and not name people.
|
|
||
| # Instrument ID for the Nikon Ti2-E "Dogwood" spinning disk confocal. | ||
| # Source: aind-data-schema barseq instrument PR #1685 | ||
| INSTRUMENT_ID = "Dogwood" |
There was a problem hiding this comment.
no instrument id for black box.
dbirman
left a comment
There was a problem hiding this comment.
Seems fine from my perspective. I wouldn't include paths to S3, relative, or VAST locations in general
…nNeuralDynamics/aind-data-schema into barseq_blackbox_acquisition
…ed example barseq
…nNeuralDynamics/aind-data-schema into barseq_blackbox_acquisition
…nNeuralDynamics/aind-data-schema into barseq_blackbox_acquisition
|
This PR now includes a new "ExternalDataStream" class that makes Note that the two json files in the |
dbirman
left a comment
There was a problem hiding this comment.
Requesting some changes, see comments.
Also, I think you still need to add a test in test_metadata.py that creates a Metadata object with an acquisition that has only an external data stream and no instrument. This should crash the Metadata-level validator that checks the core file requirements and then we can modify how the requirements work to allow this.
…o instrument warning is raised for external acquisitions.
See this commit: aa5f520 |
|
OK, I think everything is addressed. Mind another look? |
dbirman
left a comment
There was a problem hiding this comment.
This looks good to me, hard to know whether every edge case is handled for data_stream having two kinds of objects now but we'll find out pretty quickly if there are issues!
A few minor comments on wording, not critical to change them but I think it will be a tiny bit easier for users with the changes.
| | `protocol_id` | `Optional[List[str]]` | Protocol ID (DOI for protocols.io) | | ||
| | `ethics_review_id` | `Optional[List[str]]` | Ethics review ID | | ||
| | `instrument_id` | `str` | Instrument ID (Should match the Instrument.instrument_id) | | ||
| | `instrument_id` | `Optional[str]` | Instrument ID (Should match the Instrument.instrument_id. Required when data_streams contains a DataStream.) | |
There was a problem hiding this comment.
Not blocking but I think my preferred language is "Required when instrument metadata is available."
| | `calibrations` | List[[Calibration](components/measurements.md#calibration) or [VolumeCalibration](components/measurements.md#volumecalibration) or [PowerCalibration](components/measurements.md#powercalibration)] | Calibrations (List of calibration measurements taken prior to acquisition.) | | ||
| | `maintenance` | List[[Maintenance](components/measurements.md#maintenance)] | Maintenance (List of maintenance on instrument prior to acquisition.) | | ||
| | `data_streams` | List[[DataStream](acquisition.md#datastream)] | Data streams (A data stream is a collection of devices that are acquiring data simultaneously. Each acquisition can include multiple streams. Streams should be split when configurations are changed.) | | ||
| | `data_streams` | List[[DataStream](acquisition.md#datastream) or [ExternalDataStream](acquisition.md#externaldatastream)] | Data streams (A data stream is a collection of devices that are acquiring data simultaneously. Each acquisition can include multiple streams. Streams should be split when configurations are changed. Use ExternalDataStream for acquisitions performed externally where full instrument metadata is unavailable.) | |
There was a problem hiding this comment.
Same comment as above here "for acquisitions where instrument metadata is unavailable."
|
|
||
| ### ExternalDataStream | ||
|
|
||
| A simplified data stream for acquisitions performed externally, where full instrument metadata is unavailable. |
There was a problem hiding this comment.
You can drop the "full". If there's partial instrument metadata we would still want it.
Stale review. Dan has approved after updates.
* Allow specimen_id to be a list (#1770) * Allow specimen_id to be a list * Removed nonetype test * Fixed specimen names in test * Updated specimen_id description to clarify expectation during in-vivo sessions * Spread args over multi lines to avoid lint fail * docs: rebuild docs (#1771) * docs: minor fixes to acquisition.md * docs: remove bad directives and links * docs: improve description for AcquisitionSubjectDetails (#1772) * docs: improve description for AcquisitionSubjectDetails * docs: rebuild docs * fix: throw warnings when users include multiple identically named devices in the Instrument (#1773) * fix: allow both planar and regular sectioning in sectioning procedures (#1777) * fix: allow NHPSubject as subject_details option (#1778) * docs: auto-build docs on opening PR (#1760) * docs: auto-build docs on opening PR * update docs [skip actions] * docs: update contribution.md * update docs [skip actions] * chore: remove all unnecessary graphviz dependencies * update docs [skip actions] * update docs [skip actions] --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Handle lists of specimen IDs in procedures validator (#1783) * Handle lists of specimen IDs in procedures validator * Fix to properly handle individual str as well as lists of str * refactor: simplifying code a tiny bit --------- Co-authored-by: Dan Birman <danbirman@gmail.com> * Add ticket linking workflow (#1785) * Barseq blackbox acquisition (#1781) * First pass at minimal blackbox acquisition. Has file that generates acquisition for two subjects, plus json outputs * Added reference to output files * Added specimen IDs to barseq acquisitions * Removed readme file * Updating examples/barseq_acquisition.py docstring * Cleaned up comments in examples/barseq_acquisition.py * Set timestamps to pacific with offset * Changed experimenters to 'Barseq team' * Removed references to local paths, removed duplicate jsons * Added ExternalDataStream, made instrument optional, added test, updated example barseq * Updated example json outputs for barseq subjects * update docs [skip actions] * Linting fixes * Used DiscriminatedList * Clean up stream adding logic * Simplify barseq acquisition example * Removed jsons * clean up test and import properly * Add ExternalDataStream support to Metadata validators and test that no instrument warning is raised for external acquisitions. * Wording updates as suggested by Dan --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * 1792 quality control validator has a bug at line 307 where it fails to check metrics before doing metrics0 (#1793) * fix: validator would trigger on empty metrics * fix: do this upfront by bypassing the validator, adds a test * chore: delete CHANGELOG.md (#1799) * chore: delete CHANGELOG.md * update docs [skip actions] --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * refactor: replace root calls to logging with module-level loggers (#1800) * fix: issue with actions being skipped unnecessarily * refactor: replace root logger with local loggers * test: fixes to logger patches * docs: improve docstring (#1748) * docs: improve docstring * docs: update specimen ID * docs: clarify suffix * docs: better writing * update docs * fix: bad merge * update docs --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * refactor: only allow wrapped NonSurgeryInjections in Procedures.subject_procedures (#1802) * refactor: only allow Injections in Procedures.subject_procedures when wrapped with an InjectionProcedure * chore: add ethics_review_id/protocol_id * fix: only allow Injection, BrainInjection requires a full CS from Surgery * update docs [skip actions] * refactor: NonSurgicalInjection * update docs --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Add missing `tzdata` dependency (#1811) * Add git hash to Code model (#1813) * Add git hash to Code model * update docs * Increase hash length upper bound * Change property name and emit warning if hash and version are not defined * Refactor type alias * update docs * Break lines * Update tests to reflect longer hashes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * feat: add barseq instrument (#1685) * feat: add barseq instrument * refactor: SlapPlane -> Slap2Plane * Revert "refactor: SlapPlane -> Slap2Plane" This reverts commit 6f193b8. * chore: lint * refactor: fix serialization code in example * fix: fix issues blocking build * chore: fix write function for instrument example * fix: specimen_ids validator correctly flattens lists (#1763) * feat: working on procedures_sectioning example * feat: continuing to develop chunk sections * chore: embed slide regions in python code * chore: lint * chore: docstrings * chore: lint * chore: remove full sectioning file --------- Co-authored-by: Doug Ollerenshaw <doug.ollerenshaw@alleninstitute.org> * chore: bump version * bump schema version [skip actions] * chore: bump metadata * bump schema version [skip actions] --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Doug Ollerenshaw <doug.ollerenshaw@alleninstitute.org> Co-authored-by: gouwens <ngouwens@gmail.com> Co-authored-by: Bruno Cruz <7049351+bruno-f-cruz@users.noreply.github.com>
Creates simple black-box style acquisition.json files for barseq acquisitions for subjects 780345 and 780346.
Note that I had a much more involved/complicated PR that attempted to capture the actual acquisition details here: #1690
I abandoned that effort after Polina shared the raw data paths and @saskiad and I spent some time trying to understand the structure of the actual raw acquisition files. We realized there was simply too much we didn't understand about how the image files were acquired and subsequently processed for us to be able to accurately capture the process for now.
This PR closes https://github.com/AllenNeuralDynamics/aind-scientific-computing/issues/569 and closes #1761