Skip to content

Commit 13bf5a0

Browse files
rlycalderast
andauthored
Refactor to store complete set of photometry metadata (calderast#152)
* Refactor to store more photometry metadata * Update optic fiber and indicator names to be unique, only add recorded indicators to table * Add virus info and photometry mappings * Standardize references to gACh4h (its the same as GRAB-ACh3.8) * Update tests to reflect metadata changes * Update example metadata --------- Co-authored-by: Stephanie Crater <[email protected]> Co-authored-by: Stephanie Crater <[email protected]>
1 parent 3cd0689 commit 13bf5a0

File tree

7 files changed

+814
-231
lines changed

7 files changed

+814
-231
lines changed

metadata_example.yaml

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -52,44 +52,36 @@ photometry:
5252

5353
# see Methods > Photometry section in https://pmc.ncbi.nlm.nih.gov/articles/PMC6555489/#S6 and
5454
# see Star Methods > Fiber Photometry section in https://pmc.ncbi.nlm.nih.gov/articles/PMC10841332/#S11
55+
# NOTE: this setup assumes that only one fiber was recorded in the session
56+
# NOTE: the mapping of recorded signals to identity of the signal is hardcoded in the conversion code
5557
excitation_sources: # reference existing excitation sources from resources/photometry_devices.yaml
5658
- Thorlabs Purple LED
5759
- Thorlabs Blue LED
58-
optic_fibers: # reference existing optic fibers from resources/photometry_devices.yaml
59-
- Doric 0.66mm Flat 40mm Optic Fiber
60-
61-
# Note "optic_fiber_implant_sites", "viruses", and "virus_injections"
62-
# are not currently parsed and will be ignored.
63-
# This is waiting on changes to be pushed to ndx-fiber-photometry.
64-
# For now, specify all virus/fiber info as plain text in the "surgery" and "virus" fields (see below).
65-
optic_fiber_implant_sites:
66-
- reference: bregma at the cortical surface
67-
hemisphere: right
60+
61+
photodetector: Doric iFMC7-G2 (7 ports Fluorescence Mini Cube - Three Fluorophores) # reference existing photodetectors from resources/photometry_devices.yaml
62+
63+
optic_fiber_implant_sites: # for bilateral implants, specify two entries with the same virus_name and change the ml_in_mm
64+
- optic_fiber: Doric 0.66mm Flat 40mm Optic Fiber # reference existing optic fibers from resources/photometry_devices.yaml
65+
targeted_location: NAcc
6866
ap_in_mm: 1.7
6967
ml_in_mm: 1.7
7068
dv_in_mm: -6.0 # 6.0 mm deep for males, 5.8 mm deep for females
71-
optic_fiber: Doric 0.66mm Flat 40mm Optic Fiber # name of an optic fiber in the 'optic_fibers' field
72-
excitation_sources: # names of excitation sources in the 'excitation_sources' field
73-
- Thorlabs Purple LED
74-
- Thorlabs Blue LED
75-
viruses:
76-
- name: dLight
77-
construct_name: AAVDJ-CAG-dLight1.3b
78-
description: AAV virus with dLight1.3b sensor
79-
manufacturer: Vigene
80-
titer_in_vg_per_ml: 2e12
81-
virus_injections:
82-
- description: Injection of dLight AAV virus into nucleus accumbens core
83-
location: NAcc
84-
hemisphere: right
85-
reference: bregma at the cortical surface
69+
recording: true # ONLY ONE of the optic fibers should have recording set to true
70+
- optic_fiber: Doric 0.66mm Flat 40mm Optic Fiber # reference existing optic fibers from resources/photometry_devices.yaml
71+
targeted_location: NAcc
72+
ap_in_mm: 1.7
73+
ml_in_mm: -1.7
74+
dv_in_mm: -6.0 # 6.0 mm deep for males, 5.8 mm deep for females
75+
76+
virus_injections: # for bilateral injections, specify two entries with the same virus_name and change the ml_in_mm
77+
- virus_name: dLight1.3b # reference existing indicator or opsin name in the virus_info.yaml
78+
targeted_location: NAcc
8679
ap_in_mm: 1.7
8780
ml_in_mm: 1.7
8881
dv_in_mm: -6.2 # 6.2 mm deep for males, 6.0 mm deep for females
8982
volume_in_uL: 1.0
90-
virus: dLight # name of a virus in the 'viruses' field
91-
photodetectors: # reference existing photodetectors from resources/photometry_devices.yaml
92-
- Doric iFMC7-G2 (7 ports Fluorescence Mini Cube - Three Fluorophores)
83+
titer_in_vg_per_mL: 2e12 # after dilution
84+
9385

9486
behavior:
9587
arduino_text_file_path: "tests/test_data/behavior/arduinoraw0.txt"
@@ -107,14 +99,14 @@ surgery:
10799
Specify surgery type (virus injection or probe implantation), date, and
108100
any probe/virus details not already found in 'virus' or 'device' fields
109101

110-
virus:
111-
Description of relevant virus information as text.
102+
virus:
103+
Description of relevant virus information as text.
112104
Specify injection date, manufacturer, titer, location/coordinates, etc.
113105

114106
notes:
115-
General notes about this session, if any.
116-
For example - Reward used was 15uL sucrose solution (10% sucrose, 0.1% NaCl)
117-
at each reward port. The rat was water deprived before the experiment.
107+
General notes about this session, if any.
108+
For example - Reward used was 15uL sucrose solution (10% sucrose, 0.1% NaCl)
109+
at each reward port. The rat was water deprived before the experiment.
118110
Behavior was ok, but this rat likes to climb over the barriers.
119111

120112
keywords:

resources/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,16 @@ Extra 8 channels for 6mm probe:
5151
2880,1
5252

5353
# Photometry resources
54-
The `photometry_devices.yaml` file contains a running list of excitation sources (i.e. LEDs and their metadata/wavelengths), optic fibers, and photodetectors used by the Berke Lab for the hex maze task. Note that this list is currently in-progress and some values are placeholders. The ndx-fiber-photometry extension for nwb is still in development, so how we specify these values is subject to change.
54+
The `photometry_devices.yaml` file contains a running list of excitation sources (i.e. LEDs and their metadata/wavelengths), optic fibers, and photodetectors used by the Berke Lab for the hex maze task.
55+
56+
`virus_info.yaml` contains a running list of all indicators used for fiber photometry, as well as any excitatory/inhibitory opsins used for experiments.
57+
58+
`photometry_mappings.yaml` maps each indicator to a list of possible excitation sources.
59+
Our current photometry processing code makes a lot of assumptions about which channel is which signal based on known experimental choices (e.g. we always record dLight in the old maze room, and always do dual recordings of rDA3m and gACh4h in the new maze room). Currently the old maze room has blue (470 nm) and purple (405 nm) LEDs, and the new maze room has blue (470 nm), purple (405 nm), and green (565 nm) LEDs.
60+
61+
See Github issue #28 (https://github.com/calderast/jdb_to_nwb/issues/28) for a complete overview of the current setup and assumptions.
62+
63+
As we move towards adding more photometry metadata and flexibility to our photometry processing, we will allow the user to specify which wavelength was recorded by each channel. Knowing the indicators present and the wavelengths of each channel allows us to flexibly process signals for various recording setups. Each time we use a new indicator, it should be added to both `virus_info.yaml` and `photometry_mappings.yaml`
64+
65+
Note that these lists are currently in-progress. The ndx-fiber-photometry extension for nwb is still in development, so how we specify these values is subject to change.
5566

resources/photometry_mappings.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Map each indicator to a list of possible excitation sources.
2+
# Each indicator should match a named virus in `virus_info.yaml`
3+
4+
dLight1.3b:
5+
# Old maze room (Thorlabs LEDs)
6+
- Thorlabs Blue LED # 470 nm (signal wavelength)
7+
- Thorlabs Purple LED # 405 nm (isosbestic wavelength)
8+
# New maze room (Doric LEDs)
9+
- Doric Blue LED # 470 nm (signal wavelength)
10+
- Doric Purple LED # 405 nm (isosbestic wavelength)
11+
12+
dLight3.8:
13+
# Old maze room (Thorlabs LEDs)
14+
- Thorlabs Blue LED # 470 nm (signal wavelength)
15+
- Thorlabs Purple LED # 405 nm (isosbestic wavelength)
16+
# New maze room (Doric LEDs)
17+
- Doric Blue LED # 470 nm (signal wavelength)
18+
- Doric Purple LED # 405 nm (isosbestic wavelength)
19+
20+
rDA3m (AAV9):
21+
- Doric Green LED # 565 nm (signal wavelength)
22+
23+
rDA3m (rAAV):
24+
- Doric Green LED # 565 nm (signal wavelength)
25+
26+
gACh4h:
27+
# Old maze room (Thorlabs LEDs)
28+
- Thorlabs Blue LED # 470 nm (peak signal wavelength)
29+
- Thorlabs Purple LED # 405 nm (for ratiometric index)
30+
# New maze room (Doric LEDs)
31+
- Doric Blue LED # 470 nm (peak signal wavelength)
32+
- Doric Purple LED # 405 nm (for ratiometric index)

resources/virus_info.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
indicators:
2+
- name: dLight1.3b
3+
construct_name: AAVDJ-CAG-dLight1.3b
4+
description: AAV-DJ virus expressing the dopamine sensor dLight1.3b under the CAG promoter
5+
manufacturer: Vigene
6+
7+
- name: dLight3.8
8+
construct_name: AAV-DJ-CAG-dLight3.8
9+
description: AAV-DJ virus expressing the dopamine sensor dLight3.8 under the CAG promoter
10+
manufacturer: UNC
11+
12+
- name: rDA3m (AAV9)
13+
construct_name: AAV9-hsyn-rDA3m
14+
description: AAV9 virus expressing the red-shifted dopamine sensor GRAB rDA3m under the hSyn promoter
15+
manufacturer: BrainVTA
16+
17+
- name: rDA3m (rAAV)
18+
construct_name: rAAV-hsyn-rDA3m
19+
description: Recombinant AAV expressing the red-shifted dopamine sensor GRAB rDA3m under the hSyn promoter
20+
manufacturer: BrainVTA
21+
22+
- name: gACh4h
23+
construct_name: AAV-hSyn-ACh3.8
24+
description: >
25+
AAV virus expressing the acetylcholine sensor GRAB-ACh3.8 under the hSyn promoter. Unpublished, Yulong Li Lab
26+
manufacturer: BrainVTA
27+
28+
opsins:

0 commit comments

Comments
 (0)