From 8b28843318c8f4170b490a2b29a5b0436c4338f3 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Mon, 3 Apr 2023 15:03:24 -0500 Subject: [PATCH 01/26] Rename files --- images/{diagram_flowchart.drawio => flowchart.drawio} | 0 images/{diagram_flowchart.svg => flowchart.svg} | 0 images/{diagram_opto.svg => pipeline.svg} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename images/{diagram_flowchart.drawio => flowchart.drawio} (100%) rename images/{diagram_flowchart.svg => flowchart.svg} (100%) rename images/{diagram_opto.svg => pipeline.svg} (100%) diff --git a/images/diagram_flowchart.drawio b/images/flowchart.drawio similarity index 100% rename from images/diagram_flowchart.drawio rename to images/flowchart.drawio diff --git a/images/diagram_flowchart.svg b/images/flowchart.svg similarity index 100% rename from images/diagram_flowchart.svg rename to images/flowchart.svg diff --git a/images/diagram_opto.svg b/images/pipeline.svg similarity index 100% rename from images/diagram_opto.svg rename to images/pipeline.svg From 61d44b0d6dc3a1a88f0e101a7b7835c5ed5b0b75 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Mon, 3 Apr 2023 15:12:28 -0500 Subject: [PATCH 02/26] Update readme --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3cdf956..ee2d967 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,16 @@ and automate data collection and analysis for neuroscience experiments. Each El a modular pipeline for data storage and processing with corresponding database tables that can be combined with other Elements to assemble a fully functional pipeline. -![diagram](https://raw.githubusercontent.com/datajoint/element-optogenetics/main/images/diagram_flowchart.svg) +## Experiment flowchart -Installation and usage instructions can be found at the -[Element documentation](httpws://datajoint.com/docs/elements/element-optogenetics). +![flowchart](https://raw.githubusercontent.com/datajoint/element-optogenetics/main/images/flowchart.svg) + +## Data pipeline + +![pipeline](https://raw.githubusercontent.com/datajoint/element-optogenetics/main/images/pipeline.svg) + +## Getting started + +- [Interactive tutorial on GitHub Codespaces](https://github.com/datajoint/workflow-optogenetics#interactive-tutorial) + +- [Documentation](https://datajoint.com/docs/elements/element-optogenetics) From 602b86ae48610502e81fac888e8652c170bef3e2 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Mon, 3 Apr 2023 15:29:05 -0500 Subject: [PATCH 03/26] Update version and changelog --- CHANGELOG.md | 6 ++++++ element_optogenetics/version.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3bcd49..f332852 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,14 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention. +## [0.1.1] - 2023-04-03 + ++ Update - Docs ++ Update - README + ## [0.1.0] - 2022-12-19 + Add - Table structure and basic docs (changelog, contribution guidelines, etc.) +[0.1.1](https://github.com/datajoint/element-optogenetics/releases/tag/0.1.1) [0.1.0](https://github.com/datajoint/element-optogenetics/releases/tag/0.1.0) diff --git a/element_optogenetics/version.py b/element_optogenetics/version.py index ee6de92..7cab0ee 100644 --- a/element_optogenetics/version.py +++ b/element_optogenetics/version.py @@ -1,2 +1,2 @@ -"""Package metadata.""" -__version__ = "0.1.0" +"""Package metadata""" +__version__ = "0.1.1" From dd8170501951544b42b12d31a696127a863f611d Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Mon, 3 Apr 2023 15:29:18 -0500 Subject: [PATCH 04/26] Update tutorials --- docs/src/tutorials/index.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/docs/src/tutorials/index.md b/docs/src/tutorials/index.md index 7bdadd9..7bcba04 100644 --- a/docs/src/tutorials/index.md +++ b/docs/src/tutorials/index.md @@ -11,14 +11,6 @@ which can be modified for a user's specific experimental requirements. This exa workflow uses four Elements (Lab, Animal, Session, and Optogenetics) to construct a complete pipeline, and is able to ingest experimental metadata. - - ### Notebooks Each of the From 827f7b9418b5dac02313acfcdf075153be21194a Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Mon, 3 Apr 2023 15:34:15 -0500 Subject: [PATCH 05/26] Update roadmap --- docs/mkdocs.yaml | 3 ++- docs/src/concepts.md | 24 +++++++++++------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/docs/mkdocs.yaml b/docs/mkdocs.yaml index e2ada5a..e7ef986 100644 --- a/docs/mkdocs.yaml +++ b/docs/mkdocs.yaml @@ -136,7 +136,8 @@ markdown_extensions: - footnotes - pymdownx.inlinehilite - pymdownx.snippets - + - pymdownx.tasklist: # Renders check boxes in tasks lists + custom_checkbox: true extra: PATCH_VERSION: !ENV PATCH_VERSION generator: false # Disable watermark diff --git a/docs/src/concepts.md b/docs/src/concepts.md index 9125b9f..0e9e71c 100644 --- a/docs/src/concepts.md +++ b/docs/src/concepts.md @@ -20,13 +20,17 @@ University were consulted during development. The [U19 BrainCoGS MATLAB pipeline](https://github.com/BrainCOGS/U19-pipeline-matlab/tree/master/schemas/%2Boptogenetics) serves as an important precursor project to this Element. -## Element Features +## Element Roadmap -This Element stores key information about optogenetic stimulus protocols used during experimental sessions: -- Stimulus parameters (waveform properties, wavelength, power, duration, etc.) -- Implant location of the optical fiber. -- Stimulus pulse generator. -- Stimulus start and end times during an experimental session. +This Element stores key information about optogenetic stimulus protocols used during +experimental sessions. Further development of this Element is community driven. Upon +user requests and based on guidance from the Scientific Steering Group we will add +further features to this Element. + +- [x] Stimulus parameters (waveform properties, wavelength, power, duration, etc.) +- [x] Implant location of the optical fiber +- [x] Stimulus pulse generator +- [x] Stimulus start and end times during an experimental session ## Element Architecture @@ -35,7 +39,7 @@ corresponding tables in the database. Within the workflow, Element Optogenetics to upstream Elements including Lab, Animal, and Session. For more detailed documentation on each table, see the API docs for the respective schemas. -![element-optogenetics diagram](https://raw.githubusercontent.com/datajoint/element-optogenetics/main/images/diagram_opto.svg) +![pipeline](https://raw.githubusercontent.com/datajoint/element-optogenetics/main/images/pipeline.svg) ### `reference` schema ([API docs](../api/workflow_Optogenetics/pipeline/#workflow_Optogenetics.reference.Device)) @@ -77,9 +81,3 @@ documentation on each table, see the API docs for the respective schemas. | OptoStimParams | Stimulus parameters | | OptoProtocol | Protocol for a given session | | OptoEvent | Start and end time of the stimulus within a session | - -## Roadmap - -Further development of this Element is community driven. Upon user requests and based -on guidance from the Scientific Steering Group we will add further features to this -Element. From 8d5a611ddeb00e2bd5ef79747b5be78930a8664f Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Mon, 10 Apr 2023 21:10:48 -0500 Subject: [PATCH 06/26] Remove Google Analytics --- .github/workflows/u24_element_release_call.yaml | 2 -- docs/docker-compose.yaml | 1 - docs/mkdocs.yaml | 15 +++++---------- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/u24_element_release_call.yaml b/.github/workflows/u24_element_release_call.yaml index fa8deba..4324cca 100644 --- a/.github/workflows/u24_element_release_call.yaml +++ b/.github/workflows/u24_element_release_call.yaml @@ -17,7 +17,6 @@ jobs: secrets: TWINE_USERNAME: ${{secrets.TWINE_TEST_USERNAME}} TWINE_PASSWORD: ${{secrets.TWINE_TEST_PASSWORD}} - GOOGLE_ANALYTICS_KEY: ${{secrets.GOOGLE_ANALYTICS_KEY}} call_u24_elements_release_alpine: if: >- github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'datajoint' && !contains(github.event.workflow_run.head_branch, 'test') @@ -27,4 +26,3 @@ jobs: secrets: TWINE_USERNAME: ${{secrets.TWINE_USERNAME}} TWINE_PASSWORD: ${{secrets.TWINE_PASSWORD}} - GOOGLE_ANALYTICS_KEY: ${{secrets.GOOGLE_ANALYTICS_KEY}} diff --git a/docs/docker-compose.yaml b/docs/docker-compose.yaml index 232861e..66e9ba7 100644 --- a/docs/docker-compose.yaml +++ b/docs/docker-compose.yaml @@ -14,7 +14,6 @@ services: - PACKAGE - UPSTREAM_REPO - MODE - - GOOGLE_ANALYTICS_KEY - PATCH_VERSION volumes: - ../docs:/main/docs diff --git a/docs/mkdocs.yaml b/docs/mkdocs.yaml index e7ef986..db6862d 100644 --- a/docs/mkdocs.yaml +++ b/docs/mkdocs.yaml @@ -46,17 +46,14 @@ nav: # UPSTREAM_REPO=https://github.com/datajoint/element-{ELEMENT}.git \ # HOST_UID=$(id -u) docker compose -f docs/docker-compose.yaml up --build # ``` -# 02. Site analytics depend on a local environment variable GOOGLE_ANALYTICS_KEY -# You can find this in LastPass or declare with any string to suprress errors -# 03. The API section will pull docstrings. +# 02. The API section will pull docstrings. # A. Follow google styleguide e.g., # https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html # With typing suggestions: https://docs.python.org/3/library/typing.html # B. To pull a specific workflow fork, change ./docs/src/api/make_pages.py#L19 -# 04. To see your fork of the workflow-{element} in this render, change the +# 03. To see your fork of the workflow-{element} in this render, change the # URL in ./docs/src/api/make_pages.py#L19 to your fork. -# 05. For redirecting options For redirect options, see 'redirects' below. -# 06. To deploy this site on your fork, +# 04. To deploy this site on your fork, # A. declare a branch called gh-pages # B. go to the your fork > settings > pages # C. direct pages to render from the gh-pages branch at root @@ -136,14 +133,12 @@ markdown_extensions: - footnotes - pymdownx.inlinehilite - pymdownx.snippets + - pymdownx.magiclink # Displays bare URLs as links - pymdownx.tasklist: # Renders check boxes in tasks lists - custom_checkbox: true + custom_checkbox: true extra: PATCH_VERSION: !ENV PATCH_VERSION generator: false # Disable watermark - analytics: - provider: google - property: !ENV GOOGLE_ANALYTICS_KEY version: provider: mike social: From e4787b2917863cba4bcd338120d8cb87a56ab37b Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Tue, 18 Apr 2023 17:51:34 -0500 Subject: [PATCH 07/26] Update docs --- element_optogenetics/optogenetics.py | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/element_optogenetics/optogenetics.py b/element_optogenetics/optogenetics.py index b423c1c..9b5e555 100644 --- a/element_optogenetics/optogenetics.py +++ b/element_optogenetics/optogenetics.py @@ -70,8 +70,8 @@ class OptoWaveform(dj.Lookup): Attributes: waveform_name ( varchar(32) ): Name of waveform OptoWaveformType (foreign key): OptoWaveformType primary key - normalized_waveform (longblob, nullable): For one cycle, normalized to peak - waveform_description ( varchar(255), nullable ): Description of waveform + normalized_waveform (longblob, optional): For one cycle, normalized to peak + waveform_description ( varchar(255), optional ): Description of waveform """ definition = """ @@ -137,16 +137,16 @@ class Sine(dj.Part): class OptoStimParams(dj.Manual): """A single optical stimulus that repeats. - Power and intensity are both nullable. Users may wish to document one or the other. + Power and intensity are both optional. Users may wish to document one or the other. Attributes: opto_params_id (smallint): Stimulus parameter ID OptoWaveform (foreign key): OptoWaveform primary key wavelength (int): Wavelength in nm of optical stimulation light - power ( decimal(6, 2), nullable ): Total power in mW from light source - light_intensity ( decimal(6, 2), nullable ): Power for given area + power ( decimal(6, 2), optional ): Total power in mW from light source + light_intensity ( decimal(6, 2), optional ): Power for given area frequency ( decimal(5, 1) ): Frequency in Hz of the waveform - duration ( decimal(5, 1) ): Duration in ms of each optostimulus + duration ( decimal(5, 1) ): Duration in ms of each optical stimulus """ definition = """ @@ -158,7 +158,7 @@ class OptoStimParams(dj.Manual): power=null : decimal(6, 2) # (mW) total power from light source light_intensity=null : decimal(6, 2) # (mW/mm2) power for given area frequency : decimal(5, 1) # (Hz) frequency of the waveform - duration : decimal(5, 1) # (ms) duration of each opto stimulus + duration : decimal(5, 1) # (ms) duration of each optical stimulus """ @@ -171,8 +171,8 @@ class OptoProtocol(dj.Manual): protocol_id (int): Protocol ID OptoStimParams (foreign key): OptoStimParams primary key Implantation (foreign key): Implantation primary key - Device (foreign key, nullable): Device primary key - protocol_description ( varchar(255), nullable ): Description of optogenetics protocol + Device (foreign key, optional): Device primary key + protocol_description ( varchar(255), optional ): Description of optogenetics protocol """ definition = """ @@ -190,17 +190,15 @@ class OptoProtocol(dj.Manual): class OptoEvent(dj.Manual): """Start and end time of the stimulus within a session - WRT: with respect to - Attributes: OptoProtocol (foreign key): OptoProtocol primary key - stim_start_time (float): Stimulus start time in seconds wrt session start - stim_end_time (float): Stimulus end time in seconds wrt session start + stim_start_time (float): Stimulus start time in seconds relative to session start + stim_end_time (float): Stimulus end time in seconds relative to session start """ definition = """ -> OptoProtocol - stim_start_time : float # (s) opto stimulus start time wrt session start + stim_start_time : float # (s) stimulus start time relative to session start --- - stim_end_time : float # (s) opto stimulus end time wrt session start + stim_end_time : float # (s) stimulus end time relative session start """ From ce3792ace262b6f25b4126818097ebceee415959 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Tue, 18 Apr 2023 17:55:20 -0500 Subject: [PATCH 08/26] Update readme --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ee2d967..dfcc7df 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,12 @@ tables that can be combined with other Elements to assemble a fully functional p ## Getting started -- [Interactive tutorial on GitHub Codespaces](https://github.com/datajoint/workflow-optogenetics#interactive-tutorial) ++ Install from PyPI -- [Documentation](https://datajoint.com/docs/elements/element-optogenetics) + ```bash + pip install element-optogenetics + ``` + ++ [Interactive tutorial on GitHub Codespaces](https://github.com/datajoint/workflow-optogenetics#interactive-tutorial) + ++ [Documentation](https://datajoint.com/docs/elements/element-optogenetics) From 898e895cca87c485eac25fdf2a8e888a1b601319 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Tue, 18 Apr 2023 18:01:03 -0500 Subject: [PATCH 09/26] Update docs homepage --- docs/src/index.md | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index 1bd4bd1..5557688 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,12 +1,31 @@ # Element Optogenetics -DataJoint Element for managing data from optogenetics experiments. DataJoint Elements collectively standardize -and automate data collection and analysis for neuroscience experiments. Each Element is -a modular pipeline for data storage and processing with corresponding database -tables that can be combined with other Elements to assemble a fully functional pipeline. +DataJoint Element for managing data from optogenetics experiments. DataJoint Elements +collectively standardize and automate data collection and analysis for neuroscience +experiments. Each Element is a modular pipeline for data storage and processing with +corresponding database tables that can be combined with other Elements to assemble a +fully functional pipeline. -![diagram](https://raw.githubusercontent.com/datajoint/element-optogenetics/main/images/diagram_flowchart.svg) +## Experiment Flowchart -Visit the [Concepts page](./concepts.md) for more information on optogenetics research -and Element Optogenetics. To get started with building your data pipeline visit the -[Tutorials page](./tutorials/index.md). +![flowchart](https://raw.githubusercontent.com/datajoint/element-optogenetics/main/images/flowchart.svg) + +## Data Pipeline + +![pipeline](https://raw.githubusercontent.com/datajoint/element-optogenetics/main/images/pipeline.svg) + +## Getting Started + ++ Install from PyPI + + ```bash + pip install element-optogenetics + ``` + ++ [Data Pipeline](./pipeline.md) - Pipeline and table descriptions + ++ [Tutorials](./tutorials/index.md) - Start building your data pipeline + ++ [Concepts](./concepts.md) - Key concepts, partnerships, and roadmap + ++ [Code Repository](https://github.com/datajoint/element-optogenetics/){:target="_blank"} From a2eb967a4c5f348a9b4d5f675a4b97330fd64d45 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Tue, 18 Apr 2023 18:05:58 -0500 Subject: [PATCH 10/26] Update citation page --- docs/src/citation.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/src/citation.md b/docs/src/citation.md index ab6d9e2..efe5b8c 100644 --- a/docs/src/citation.md +++ b/docs/src/citation.md @@ -8,6 +8,5 @@ Resource Identifier (RRID). Reimer J, Walker EY, Tolias AS. DataJoint Elements: Data Workflows for Neurophysiology. bioRxiv. 2021 Jan 1. doi: https://doi.org/10.1101/2021.03.30.437358 -- DataJoint Elements ([RRID:SCR_021894](https://scicrunch.org/resolver/SCR_021894)) - - Element Optogenetics (version {{ PATCH_VERSION }}) - \ No newline at end of file +- DataJoint Element Optogenetics - [RRID:SCR_021894](https://scicrunch.org/resolver/SCR_021894) - Version {{ PATCH_VERSION }} + \ No newline at end of file From e0587300fc2c87b8422b914ff71212a0a90d3a2a Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Tue, 18 Apr 2023 18:07:18 -0500 Subject: [PATCH 11/26] Update mkdocs --- docs/mkdocs.yaml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/docs/mkdocs.yaml b/docs/mkdocs.yaml index db6862d..0e1b87e 100644 --- a/docs/mkdocs.yaml +++ b/docs/mkdocs.yaml @@ -6,21 +6,20 @@ repo_url: https://github.com/datajoint/element-optogenetics repo_name: datajoint/element-optogenetics nav: - Element Optogenetics: index.md + - Data Pipeline: pipeline.md + - Tutorials: + - tutorials/index.md + - Notebook: tutorials/tutorial.ipynb - Concepts: concepts.md - - Tutorials: - - Overview: tutorials/index.md - - Configure: tutorials/01-configure.ipynb - - Workflow Structure: tutorials/02-workflow-structure-optional.ipynb - - Process: tutorials/03-process.ipynb - Citation: citation.md - API: api/ # defer to gen-files + literate-nav - Changelog: changelog.md # --------------------- NOTES TO CONTRIBUTORS ----------------------- # Markdown in mkdocs -# 01. Redering concatenates across single line breaks. This means... +# 01. Rendering concatenates across single line breaks. This means... # A. We have to be careful to add extra line breaks around paragraphs, -# including between the end of a pgf and the beginnign of bullets. +# including between the end of a pgf and the beginning of bullets. # B. We can use hard wrapping to make github reviews easier to read. # VSCode Rewrap extension offers a keyboard shortcut for hard wrap # at the ruler, but don't add breaks in [multiword links](example.com) @@ -47,7 +46,7 @@ nav: # HOST_UID=$(id -u) docker compose -f docs/docker-compose.yaml up --build # ``` # 02. The API section will pull docstrings. -# A. Follow google styleguide e.g., +# A. Follow google style guide e.g., # https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html # With typing suggestions: https://docs.python.org/3/library/typing.html # B. To pull a specific workflow fork, change ./docs/src/api/make_pages.py#L19 @@ -89,9 +88,6 @@ theme: plugins: - markdownextradata: {} - search - # - redirects: # OPTIONAL REDIRECTS - # redirect_maps: - # "index.md": "getting_started.md" - mkdocstrings: default_handler: python handlers: From 09e99120a71bc34189be5233b4dee9488df6e657 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Tue, 18 Apr 2023 18:08:30 -0500 Subject: [PATCH 12/26] Move section to separate `pipeline` page --- docs/src/concepts.md | 50 -------------------------------------------- docs/src/pipeline.md | 49 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 50 deletions(-) create mode 100644 docs/src/pipeline.md diff --git a/docs/src/concepts.md b/docs/src/concepts.md index 0e9e71c..b796be6 100644 --- a/docs/src/concepts.md +++ b/docs/src/concepts.md @@ -31,53 +31,3 @@ further features to this Element. - [x] Implant location of the optical fiber - [x] Stimulus pulse generator - [x] Stimulus start and end times during an experimental session - -## Element Architecture - -Each node in the following diagram represents the analysis code in the workflow and the -corresponding tables in the database. Within the workflow, Element Optogenetics connects -to upstream Elements including Lab, Animal, and Session. For more detailed -documentation on each table, see the API docs for the respective schemas. - -![pipeline](https://raw.githubusercontent.com/datajoint/element-optogenetics/main/images/pipeline.svg) - -### `reference` schema ([API docs](../api/workflow_Optogenetics/pipeline/#workflow_Optogenetics.reference.Device)) - -| Table | Description | -| --- | --- | -| Device | Pulse generator device | - -### `subject` schema ([API docs](https://datajoint.com/docs/elements/element-animal/latest/api/element_animal/subject/#element_animal.subject.Subject)) - -- Although not required, most choose to connect the `Session` table to a `Subject` table. - -| Table | Description | -| --- | --- | -| Subject | Basic information of the research subject | - -### `surgery` schema ([API docs](https://datajoint.com/docs/elements/element-animal/latest/api/element_animal/surgery/#element_animal.surgery.Implantation)) - -- The `Implantation` table can be user-defined , or one can choose to use the `surgery.Implantation` table from `element-animal`. - -| Table | Description | -| --- | --- | -| Implantation | Location of an implanted device | - -### `session` schema ([API docs](https://datajoint.com/docs/elements/element-session/latest/api/element_session/session_with_id)) - -| Table | Description | -| --- | --- | -| Session | Unique experimental session identifier | - -### `optogenetics` schema ([API docs](../api/element_optogenetics/optogenetics)) - -| Table | Description | -| --- | --- | -| OptoWaveformType | Stimulus waveform type (e.g., square, ramp, sine) | -| OptoWaveform | Shape of one cycle of the stimulus waveform | -| OptoWaveform.Square | Square waveform properties | -| OptoWaveform.Ramp | Ramp waveform properties | -| OptoWaveform.Sine | Sine waveform properties | -| OptoStimParams | Stimulus parameters | -| OptoProtocol | Protocol for a given session | -| OptoEvent | Start and end time of the stimulus within a session | diff --git a/docs/src/pipeline.md b/docs/src/pipeline.md new file mode 100644 index 0000000..da8eba9 --- /dev/null +++ b/docs/src/pipeline.md @@ -0,0 +1,49 @@ +# Element Architecture + +Each node in the following diagram represents the analysis code in the workflow and the +corresponding tables in the database. Within the workflow, Element Optogenetics connects +to upstream Elements including Lab, Animal, and Session. For more detailed +documentation on each table, see the API docs for the respective schemas. + +![pipeline](https://raw.githubusercontent.com/datajoint/element-optogenetics/main/images/pipeline.svg) + +## `reference` schema ([API docs](../api/workflow_Optogenetics/pipeline/#workflow_Optogenetics.reference.Device)) + +| Table | Description | +| --- | --- | +| Device | Pulse generator device | + +## `subject` schema ([API docs](https://datajoint.com/docs/elements/element-animal/latest/api/element_animal/subject/#element_animal.subject.Subject)) + +- Although not required, most choose to connect the `Session` table to a `Subject` table. + +| Table | Description | +| --- | --- | +| Subject | Basic information of the research subject | + +## `surgery` schema ([API docs](https://datajoint.com/docs/elements/element-animal/latest/api/element_animal/surgery/#element_animal.surgery.Implantation)) + +- The `Implantation` table can be user-defined , or one can choose to use the `surgery.Implantation` table from `element-animal`. + +| Table | Description | +| --- | --- | +| Implantation | Location of an implanted device | + +## `session` schema ([API docs](https://datajoint.com/docs/elements/element-session/latest/api/element_session/session_with_id)) + +| Table | Description | +| --- | --- | +| Session | Unique experimental session identifier | + +## `optogenetics` schema ([API docs](../api/element_optogenetics/optogenetics)) + +| Table | Description | +| --- | --- | +| OptoWaveformType | Stimulus waveform type (e.g., square, ramp, sine) | +| OptoWaveform | Shape of one cycle of the stimulus waveform | +| OptoWaveform.Square | Square waveform properties | +| OptoWaveform.Ramp | Ramp waveform properties | +| OptoWaveform.Sine | Sine waveform properties | +| OptoStimParams | Stimulus parameters | +| OptoProtocol | Protocol for a given session | +| OptoEvent | Start and end time of the stimulus within a session | From bb3624b55e7e7db6313ac7f603840869e020fcc2 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 19 Apr 2023 11:57:12 -0500 Subject: [PATCH 13/26] Update css --- docs/src/.overrides/assets/stylesheets/extra.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/src/.overrides/assets/stylesheets/extra.css b/docs/src/.overrides/assets/stylesheets/extra.css index 36e19de..70875fc 100644 --- a/docs/src/.overrides/assets/stylesheets/extra.css +++ b/docs/src/.overrides/assets/stylesheets/extra.css @@ -90,4 +90,8 @@ html a[title="YouTube"].md-social__link svg { /* footer */ /* previous/next text */ /* --md-footer-fg-color: var(--dj-white); */ -} \ No newline at end of file +} + +[data-md-color-scheme="slate"] .jupyter-wrapper .Table Td { + color: var(--dj-black) +} From 1ddb876a52f9d74379ebd47f769e86c0e6e4c567 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 19 Apr 2023 13:01:43 -0500 Subject: [PATCH 14/26] Add roadmap --- docs/src/roadmap.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 docs/src/roadmap.md diff --git a/docs/src/roadmap.md b/docs/src/roadmap.md new file mode 100644 index 0000000..fa3e96b --- /dev/null +++ b/docs/src/roadmap.md @@ -0,0 +1,13 @@ +# Roadmap + +This Element stores key information about optogenetic stimulus protocols used during +experimental sessions. + +- [x] Stimulus parameters (waveform properties, wavelength, power, duration, etc.) +- [x] Implant location of the optical fiber +- [x] Stimulus pulse generator +- [x] Stimulus start and end times during an experimental session + +Further development of this Element is community driven. Upon +user requests and based on guidance from the Scientific Steering Group we will add +further features to this Element. From 890c3336aec821aea4871618ace073a4241e912e Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 19 Apr 2023 13:02:31 -0500 Subject: [PATCH 15/26] Update docs index page --- docs/src/index.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index 5557688..c64330b 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -26,6 +26,4 @@ fully functional pipeline. + [Tutorials](./tutorials/index.md) - Start building your data pipeline -+ [Concepts](./concepts.md) - Key concepts, partnerships, and roadmap - + [Code Repository](https://github.com/datajoint/element-optogenetics/){:target="_blank"} From c883387f1d59130920422cc32342c27c21ad0131 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 19 Apr 2023 13:03:14 -0500 Subject: [PATCH 16/26] Move sections from concepts page --- docs/src/concepts.md | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/docs/src/concepts.md b/docs/src/concepts.md index b796be6..0a5514f 100644 --- a/docs/src/concepts.md +++ b/docs/src/concepts.md @@ -12,22 +12,3 @@ causal links between the activity of neuronal populations and corresponding anim [^1]: Boyden, E. S., Zhang, F., Bamberg, E., Nagel, G., & Deisseroth, K. (2005). [Millisecond-timescale, genetically targeted optical control of neural activity](https://www.nature.com/articles/nn1525). Nature neuroscience, 8(9), 1263-1268. - -## Key Partnerships - -Key members of the [U19 BrainCoGS project](https://www.braincogs.org/) at Princeton -University were consulted during development. The -[U19 BrainCoGS MATLAB pipeline](https://github.com/BrainCOGS/U19-pipeline-matlab/tree/master/schemas/%2Boptogenetics) -serves as an important precursor project to this Element. - -## Element Roadmap - -This Element stores key information about optogenetic stimulus protocols used during -experimental sessions. Further development of this Element is community driven. Upon -user requests and based on guidance from the Scientific Steering Group we will add -further features to this Element. - -- [x] Stimulus parameters (waveform properties, wavelength, power, duration, etc.) -- [x] Implant location of the optical fiber -- [x] Stimulus pulse generator -- [x] Stimulus start and end times during an experimental session From 1b48c8d15e8979ef98428f2afb35df08f3ccff55 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 19 Apr 2023 13:03:58 -0500 Subject: [PATCH 17/26] Add partnerships page --- docs/src/partnerships.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 docs/src/partnerships.md diff --git a/docs/src/partnerships.md b/docs/src/partnerships.md new file mode 100644 index 0000000..b0213e3 --- /dev/null +++ b/docs/src/partnerships.md @@ -0,0 +1,6 @@ +# Key Partnerships + +Key members of the [U19 BrainCoGS project](https://www.braincogs.org/) at Princeton +University were consulted during development. The +[U19 BrainCoGS MATLAB pipeline](https://github.com/BrainCOGS/U19-pipeline-matlab/tree/master/schemas/%2Boptogenetics) +serves as an important precursor project to this Element. From 7b34a362bc6500cc91eb8abdd5edccf1c280cb08 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 19 Apr 2023 13:04:21 -0500 Subject: [PATCH 18/26] Update navigation --- docs/mkdocs.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/mkdocs.yaml b/docs/mkdocs.yaml index 0e1b87e..35343e2 100644 --- a/docs/mkdocs.yaml +++ b/docs/mkdocs.yaml @@ -11,6 +11,8 @@ nav: - tutorials/index.md - Notebook: tutorials/tutorial.ipynb - Concepts: concepts.md + - Key Partnerships: partnerships.md + - Roadmap: roadmap.md - Citation: citation.md - API: api/ # defer to gen-files + literate-nav - Changelog: changelog.md From c6456c49b3423d744b6b237ae9c4f075634404b1 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 19 Apr 2023 16:47:39 -0500 Subject: [PATCH 19/26] Update tutorial section --- docs/src/tutorials/index.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/src/tutorials/index.md b/docs/src/tutorials/index.md index 7bcba04..cdc03e5 100644 --- a/docs/src/tutorials/index.md +++ b/docs/src/tutorials/index.md @@ -1,5 +1,11 @@ # Tutorials ++ DataJoint Elements are modular pipelines that can be connected into a complete workflow. [Workflow Optogenetics](https://github.com/datajoint/workflow-optogenetics)) is an example that combines four DataJoint Elements - Lab, Animal, Session, and Optogenetics. + ++ Workflow Optogenetics includes an [interactive tutorial on GitHub Codespaces](https://github.com/datajoint/workflow-optogenetics#interactive-tutorial), which is configured for users to run the pipeline. + ++ In the interactive tutorial, the [example notebook](https://github.com/datajoint/workflow-optogenetics/tree/main/notebooks.tutorial.ipynb) describes the pipeline and provides instructions for adding data to the pipeline. + ## Installation Installation of the Element requires an integrated development environment and database. From 1a845e599051b40fd71461364741bf8f1c685e72 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 19 Apr 2023 16:47:58 -0500 Subject: [PATCH 20/26] Update date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f332852..aff5155 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention. -## [0.1.1] - 2023-04-03 +## [0.1.1] - 2023-04-19 + Update - Docs + Update - README From 08e1b8d758cf6aeaafda1b2f4d5cb461d07e103d Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 19 Apr 2023 21:39:50 -0500 Subject: [PATCH 21/26] Fix format --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index dfcc7df..fd09dff 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,20 @@ # DataJoint Element - Optogenetics -DataJoint Element for managing data from optogenetics experiments. DataJoint Elements collectively standardize -and automate data collection and analysis for neuroscience experiments. Each Element is -a modular pipeline for data storage and processing with corresponding database -tables that can be combined with other Elements to assemble a fully functional pipeline. +DataJoint Element for managing data from optogenetics experiments. DataJoint Elements +collectively standardize and automate data collection and analysis for neuroscience +experiments. Each Element is a modular pipeline for data storage and processing with +corresponding database tables that can be combined with other Elements to assemble a +fully functional pipeline. -## Experiment flowchart +## Experiment Flowchart ![flowchart](https://raw.githubusercontent.com/datajoint/element-optogenetics/main/images/flowchart.svg) -## Data pipeline +## Data Pipeline ![pipeline](https://raw.githubusercontent.com/datajoint/element-optogenetics/main/images/pipeline.svg) -## Getting started +## Getting Started + Install from PyPI From 4f32c7045d690a8bbd0179c6238c2a462c537677 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Thu, 20 Apr 2023 11:19:51 -0500 Subject: [PATCH 22/26] Update format --- docs/src/roadmap.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/roadmap.md b/docs/src/roadmap.md index fa3e96b..c04cef9 100644 --- a/docs/src/roadmap.md +++ b/docs/src/roadmap.md @@ -8,6 +8,6 @@ experimental sessions. - [x] Stimulus pulse generator - [x] Stimulus start and end times during an experimental session -Further development of this Element is community driven. Upon -user requests and based on guidance from the Scientific Steering Group we will add -further features to this Element. +Further development of this Element is community driven. Upon user requests and based +on guidance from the Scientific Steering Group we will add further features to this +Element. From b11c54d63f0c53b916b54e9dbe9fd6fd5ef69fc5 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Thu, 20 Apr 2023 11:28:42 -0500 Subject: [PATCH 23/26] Update changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aff5155..364bdb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,8 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and ## [0.1.1] - 2023-04-19 -+ Update - Docs -+ Update - README ++ Update - Docs by adding `Data Pipeline`, `Key Partnerships`, and `Roadmap` pages ++ Update - README with links to tutorials and docs ## [0.1.0] - 2022-12-19 From d3beb586568a569141b882d73ac196353f84cb3b Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Thu, 20 Apr 2023 11:29:55 -0500 Subject: [PATCH 24/26] Update pipeline page --- docs/src/pipeline.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/pipeline.md b/docs/src/pipeline.md index da8eba9..46884cf 100644 --- a/docs/src/pipeline.md +++ b/docs/src/pipeline.md @@ -1,4 +1,4 @@ -# Element Architecture +# Data Pipeline Each node in the following diagram represents the analysis code in the workflow and the corresponding tables in the database. Within the workflow, Element Optogenetics connects From 3e2592c3f5586c455508ec63b5ddacaa6fdbf8a9 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Thu, 20 Apr 2023 11:40:50 -0500 Subject: [PATCH 25/26] Update tutorial instructions --- docs/src/tutorials/index.md | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/docs/src/tutorials/index.md b/docs/src/tutorials/index.md index cdc03e5..bbbce47 100644 --- a/docs/src/tutorials/index.md +++ b/docs/src/tutorials/index.md @@ -6,26 +6,9 @@ + In the interactive tutorial, the [example notebook](https://github.com/datajoint/workflow-optogenetics/tree/main/notebooks.tutorial.ipynb) describes the pipeline and provides instructions for adding data to the pipeline. -## Installation +## Installation for Active Projects -Installation of the Element requires an integrated development environment and database. -Instructions to setup each of the components can be found on the -[User Instructions](https://datajoint.com/docs/elements/user-guide/) page. These -instructions use the example workflows -(e.g., [workflow-optogenetics](https://github.com/datajoint/workflow-optogenetics)), -which can be modified for a user's specific experimental requirements. This example -workflow uses four Elements (Lab, Animal, Session, and Optogenetics) to construct a -complete pipeline, and is able to ingest experimental metadata. ++ The Workflow Optogenetics described above can be modified for a user's specific experimental requirements and thereby used in active projects. -### Notebooks - -Each of the -[notebooks](https://github.com/datajoint/workflow-optogenetics/tree/main/notebooks) in -the workflow steps through ways to interact with the Element itself. - -- [Configure](./01-configure.ipynb) - helps configure your local DataJoint installation to point to the correct database. -- [Workflow Structure](./02-workflow-structure-optional.ipynb) demonstrates the table - architecture of the Element and key DataJoint basics for interacting with these - tables. -- [Process](./03-process.ipynb) steps through adding data to these tables. ++ The GitHub Codespace and Dev Container is configured for tutorials and prototyping. +We recommend users to configure a database for production pipelines. Instructions for a local installation of the integrated development environment with database can be found on the [User Guide](https://datajoint.com/docs/elements/user-guide/) page. From 52fb75f30d1234dfd84b28eb3c9c2d9d9d494f44 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Thu, 20 Apr 2023 11:44:19 -0500 Subject: [PATCH 26/26] Update tutorial instructions --- docs/src/tutorials/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/tutorials/index.md b/docs/src/tutorials/index.md index bbbce47..6554474 100644 --- a/docs/src/tutorials/index.md +++ b/docs/src/tutorials/index.md @@ -6,9 +6,9 @@ + In the interactive tutorial, the [example notebook](https://github.com/datajoint/workflow-optogenetics/tree/main/notebooks.tutorial.ipynb) describes the pipeline and provides instructions for adding data to the pipeline. -## Installation for Active Projects +## Installation Instructions for Active Projects + The Workflow Optogenetics described above can be modified for a user's specific experimental requirements and thereby used in active projects. + The GitHub Codespace and Dev Container is configured for tutorials and prototyping. -We recommend users to configure a database for production pipelines. Instructions for a local installation of the integrated development environment with database can be found on the [User Guide](https://datajoint.com/docs/elements/user-guide/) page. +We recommend users to configure a database specifically for production pipelines. Instructions for a local installation of the integrated development environment with a database can be found on the [User Guide](https://datajoint.com/docs/elements/user-guide/) page.