Skip to content

Commit

Permalink
Merge pull request #55 from dandi/bf-codespell
Browse files Browse the repository at this point in the history
codespell: ignore any lines which have data.*base64 - embedded binaries, fix typos introduced in recent PRs
  • Loading branch information
yarikoptic authored Sep 7, 2023
2 parents 7c9ef30 + 18968a0 commit cd963a3
Show file tree
Hide file tree
Showing 34 changed files with 62 additions and 62 deletions.
4 changes: 2 additions & 2 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[codespell]
skip = .git,*.pdf,*.svg
# all images embedded in .ipynb jsons
ignore-regex = "image/png": ".*
# all images and other binaries embedded in .ipynb jsons
ignore-regex = "image/png": ".*|^ *".*data:\S+;base64.*
# nd - people just like it
ignore-words-list = nd
Original file line number Diff line number Diff line change
Expand Up @@ -1760,10 +1760,10 @@
" <span class=\"djtooltiptext\">in mm, anterior positive, posterior negative</span>\n",
" </div></th><th><div class=\"djtooltip\">\n",
" <p id=\"primary\">coordinate_ml</p>\n",
" <span class=\"djtooltiptext\">in mm, always postive, number larger when more lateral</span>\n",
" <span class=\"djtooltiptext\">in mm, always positive, number larger when more lateral</span>\n",
" </div></th><th><div class=\"djtooltip\">\n",
" <p id=\"primary\">coordinate_dv</p>\n",
" <span class=\"djtooltiptext\">in mm, always postive, number larger when more ventral (deeper)</span>\n",
" <span class=\"djtooltiptext\">in mm, always positive, number larger when more ventral (deeper)</span>\n",
" </div></th><th><div class=\"djtooltip\">\n",
" <p id=\"nonprimary\">spike_times</p>\n",
" <span class=\"djtooltiptext\">(s) time of each spike, with respect to the start of session</span>\n",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Schema of aquisition information.
Schema of acquisition information.
'''
import re
import os
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ class ActionLocation(dj.Manual):
-> BrainLocation
-> CoordinateReference
coordinate_ap: decimal(4,2) # in mm, anterior positive, posterior negative
coordinate_ml: decimal(4,2) # in mm, always postive, number larger when more lateral
coordinate_dv: decimal(4,2) # in mm, always postive, number larger when more ventral (deeper)
coordinate_ml: decimal(4,2) # in mm, always positive, number larger when more lateral
coordinate_dv: decimal(4,2) # in mm, always positive, number larger when more ventral (deeper)
"""


Expand Down
2 changes: 1 addition & 1 deletion 000005/DataJoint/DJ-NWB-Yu-Gutnisky-2016/pipeline/virus.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Virus(dj.Manual):
virus: varchar(64) # name of the virus
---
-> VirusSource
virus_lot_number="": varchar(128) # lot numnber of the virus
virus_lot_number="": varchar(128) # lot number of the virus
virus_titer=null: float # x10^12GC/mL
"""

Expand Down
4 changes: 2 additions & 2 deletions 000006/DataJoint/DJ-NWB-Economo-2018/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ This notebook presents data and results associated with the following papers:
>Michael N. Economo, Sarada Viswanathan, Bosiljka Tasic, Erhan Bas, Johan Winnubst, Vilas Menon, Lucas T. Graybuck, Thuc Nghi Nguyen, Kimberly A. Smith, Zizhen Yao, Lihua Wang, Charles R. Gerfen, Jayaram Chandrashekar, Hongkui Zeng, Loren L. Looger & Karel Svoboda. "Distinct descending motor cortex
pathways and their roles in movement" (2018) Nature (https://doi.org/10.1038/s41586-018-0642-9)

The study identified two types of pyramidal track (PT) neuron in the mouse motor cortex, referred to as PT<sub>upper</sub> and PT<sub>lower</sub>. Further investigation using extracellular recordings in the anterior lateral motor cortex (ALM) during a delay-response task, the study revealed specialized roles for the two neuron types: i) PT<sub>upper</sub> neurons are preferentially involed in motor planning, ii) PT<sub>lower</sub> neurons are more involved in movement execution.
The study identified two types of pyramidal track (PT) neuron in the mouse motor cortex, referred to as PT<sub>upper</sub> and PT<sub>lower</sub>. Further investigation using extracellular recordings in the anterior lateral motor cortex (ALM) during a delay-response task, the study revealed specialized roles for the two neuron types: i) PT<sub>upper</sub> neurons are preferentially involved in motor planning, ii) PT<sub>lower</sub> neurons are more involved in movement execution.

A ***DataJoint*** data pipeline has been constructed for this study, with the presented data ingested into this pipeline. This notebook demonstrates the queries, processing, and reproduction of several figures from the paper. From the pipeline, export capability to ***NWB 2.0*** format is also available.

## About the data

The dataset comprises of extracellular recordings and spike sorted results of the mouse's ALM during a delay-response task. The behavior data includes detailed description of the trial structure (e.g. trial timing, trial instruction, trial response, etc.) and the timing of the lick events (e.g. lick left, lick right onset).

Original data is publically available at: doi: 10.25378/janelia.7007846
Original data is publicly available at: doi: 10.25378/janelia.7007846

The data in original MATLAB format (.mat) have been ingested into a DataJoint data pipeline presented below.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
">Michael N. Economo, Sarada Viswanathan, Bosiljka Tasic, Erhan Bas, Johan Winnubst, Vilas Menon, Lucas T. Graybuck,Thuc Nghi Nguyen, Kimberly A. Smith, Zizhen Yao, Lihua Wang, Charles R. Gerfen, Jayaram Chandrashekar, Hongkui Zeng, Loren L. Looger & Karel Svoboda. \"Distinct descending motor cortex\n",
"pathways and their roles in movement\" (2018) Nature (https://doi.org/10.1038/s41586-018-0642-9)\n",
"\n",
"The study identified two types of pyramidal track (PT) neuron in the mouse motor cortex, referred to as PT<sub>upper</sub> and PT<sub>lower</sub>. Further investigation using extracellular recordings in the anterior lateral motor cortex (ALM) during a delay-response task, the study revealed specialized roles for the two neuron types: i) PT<sub>upper</sub> neurons are preferentially involed in motor planning, ii) PT<sub>lower</sub> neurons are more involved in movement execution. \n",
"The study identified two types of pyramidal track (PT) neuron in the mouse motor cortex, referred to as PT<sub>upper</sub> and PT<sub>lower</sub>. Further investigation using extracellular recordings in the anterior lateral motor cortex (ALM) during a delay-response task, the study revealed specialized roles for the two neuron types: i) PT<sub>upper</sub> neurons are preferentially involved in motor planning, ii) PT<sub>lower</sub> neurons are more involved in movement execution. \n",
"\n",
"A ***DataJoint*** data pipeline has been constructed for this study, with the presented data ingested into this pipeline. This notebook demonstrates the queries, processing, and reproduction of several figures from the paper. From the pipeline, export capability to ***NWB 2.0*** format is also available."
]
Expand All @@ -23,7 +23,7 @@
"\n",
"The dataset comprises of extracellular recordings and spike sorted results of the mouse's ALM during a delay-response task. The behavior data includes detailed description of the trial structure (e.g. trial timing, trial instruction, trial response, etc.) and the timing of the lick events (e.g. lick left, lick right onset). \n",
"\n",
"Original data is publically available at: doi: 10.25378/janelia.7007846\n",
"Original data is publicly available at: doi: 10.25378/janelia.7007846\n",
"\n",
"The data in original MATLAB format (.mat) have been ingested into a DataJoint data pipeline presented below. \n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions 000006/DataJoint/DJ-NWB-Economo-2018/pipeline/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ class ActionLocation(dj.Manual):
-> BrainLocation
-> CoordinateReference
coordinate_ap: decimal(4,2) # in mm, anterior positive, posterior negative
coordinate_ml: decimal(4,2) # in mm, always postive, number larger when more lateral
coordinate_dv: decimal(4,2) # in mm, always postive, number larger when more ventral (deeper)
coordinate_ml: decimal(4,2) # in mm, always positive, number larger when more lateral
coordinate_dv: decimal(4,2) # in mm, always positive, number larger when more ventral (deeper)
"""


Expand Down
6 changes: 3 additions & 3 deletions 000007/DataJoint/DJ-NWB-Gao-2018/pipeline/acquisition.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Schema of aquisition information.
Schema of acquisition information.
'''
import datajoint as dj
from pipeline import reference, subject
Expand Down Expand Up @@ -49,6 +49,6 @@ class PhotoStim(dj.Manual):
-> reference.Hemisphere
-> reference.CoordinateReference
photo_stim_coordinate_ap: float # in mm, anterior positive, posterior negative
photo_stim_coordinate_ml: float # in mm, always postive, number larger when more lateral
photo_stim_coordinate_dv: float # in mm, always postive, number larger when more ventral (deeper)
photo_stim_coordinate_ml: float # in mm, always positive, number larger when more lateral
photo_stim_coordinate_dv: float # in mm, always positive, number larger when more ventral (deeper)
"""
2 changes: 1 addition & 1 deletion 000007/DataJoint/DJ-NWB-Gao-2018/pipeline/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class Virus(dj.Lookup):
virus: varchar(32) # name of the virus
---
-> VirusSource
virus_lot_number="": varchar(128) # lot numnber of the virus
virus_lot_number="": varchar(128) # lot number of the virus
"""
contents = [{
'virus': 'AAV2-hSyn-hChR2(H134R)-EYFP',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"\n",
"The study sheds new insights into the persistnent neural activity of the frontal thalamocortical circuit, suggesting that reciprocal excitation between the anterior lateral motor cortex (ALM) and the thalamus is needed to maintain persistent activity in motor preparation. Intracellular and extracellular recordings were performed on mouse ALM and thalamus neurons during tectile discrimination task with and without optogenetic perturbation. The study reported near-complete collapse of ALM activity upon photoinhibition of the thalamus, and photoinhibition of the ALM resulted in diminished thalamic activity. \n",
"\n",
"This notebook provides demonstrations of working with a ***DataJoint*** data pipeline in querying data, apply data conditioning and reproduce some key figures in the paper. The orignal data available in NWB 2.0 format had been ingested into a DataJoint data pipeline (data pipeline schema is given below). As a validation of complete ingestion of the original data into DataJoint, figures 3b,e, 6b,e and 4b,e,h will be reproduced in this notebook."
"This notebook provides demonstrations of working with a ***DataJoint*** data pipeline in querying data, apply data conditioning and reproduce some key figures in the paper. The original data available in NWB 2.0 format had been ingested into a DataJoint data pipeline (data pipeline schema is given below). As a validation of complete ingestion of the original data into DataJoint, figures 3b,e, 6b,e and 4b,e,h will be reproduced in this notebook."
]
},
{
Expand Down Expand Up @@ -1565,10 +1565,10 @@
" <span class=\"djtooltiptext\">in mm, anterior positive, posterior negative</span>\n",
" </div></th><th><div class=\"djtooltip\">\n",
" <p id=\"primary\">coordinate_ml</p>\n",
" <span class=\"djtooltiptext\">in mm, always postive, number larger when more lateral</span>\n",
" <span class=\"djtooltiptext\">in mm, always positive, number larger when more lateral</span>\n",
" </div></th><th><div class=\"djtooltip\">\n",
" <p id=\"primary\">coordinate_dv</p>\n",
" <span class=\"djtooltiptext\">in mm, always postive, number larger when more ventral (deeper)</span>\n",
" <span class=\"djtooltiptext\">in mm, always positive, number larger when more ventral (deeper)</span>\n",
" </div></th><th><div class=\"djtooltip\">\n",
" <p id=\"primary\">unit_id</p>\n",
" <span class=\"djtooltiptext\"></span>\n",
Expand Down Expand Up @@ -3110,7 +3110,7 @@
"source": [
"The following parts of this example relates to the extracellular recording results of this study, namely the neuronal spiking patterns in response to photostimulation.\n",
"\n",
"Fairly similar to the routine layed out above, we wish to query neuronal spike times, segmented time-locked to the \"delay\" period, categorized by recording locations and photostimulation locations:\n",
"Fairly similar to the routine laid out above, we wish to query neuronal spike times, segmented time-locked to the \"delay\" period, categorized by recording locations and photostimulation locations:\n",
"+ Recording at ALM, stimulation at ALM\n",
"+ Recording at ALM, stimulation at Thalamus\n",
"+ Recording at Thalamus, stimulation at Thalamus\n",
Expand Down Expand Up @@ -3309,7 +3309,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Here, we define a helper function to query and fetch the trial-segmented spike times for a single unit in a specifed session: `query_unit_segmented_spiketimes()`"
"Here, we define a helper function to query and fetch the trial-segmented spike times for a single unit in a specified session: `query_unit_segmented_spiketimes()`"
]
},
{
Expand All @@ -3318,7 +3318,7 @@
"metadata": {},
"outputs": [],
"source": [
"# get trial-segmented spiketimes for a single unit in the specifed session\n",
"# get trial-segmented spiketimes for a single unit in the specified session\n",
"def query_unit_segmented_spiketimes(sess_key, unit, trial_key, seg_param_key):\n",
" data_keys = (extracellular.TrialSegmentedUnitSpikeTimes & sess_key & {'unit_id': unit} & seg_param_key &\n",
" ((acquisition.TrialSet.Trial & trial_key) & (stimulation.TrialPhotoStimInfo & trial_key))).fetch('KEY')\n",
Expand Down Expand Up @@ -3619,7 +3619,7 @@
"metadata": {},
"outputs": [],
"source": [
"# get trial-segmented spiketimes for all units in all specifed sessions\n",
"# get trial-segmented spiketimes for all units in all specified sessions\n",
"def extract_segmented_spiketimes_histogram(units, trial_cond, seg_param_key, time_range=(-1.5, 3), bin_counts=1000):\n",
" unit_keys = units.fetch('KEY')\n",
" print(f'Found {len(unit_keys)} units') \n",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
Schema of aquisition information.
Schema of acquisition information.
'''
import re
import os
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ class ActionLocation(dj.Manual):
-> BrainLocation
-> CoordinateReference
coordinate_ap: decimal(4,2) # in mm, anterior positive, posterior negative
coordinate_ml: decimal(4,2) # in mm, always postive, number larger when more lateral
coordinate_dv: decimal(4,2) # in mm, always postive, number larger when more ventral (deeper)
coordinate_ml: decimal(4,2) # in mm, always positive, number larger when more lateral
coordinate_dv: decimal(4,2) # in mm, always positive, number larger when more ventral (deeper)
"""


Expand Down Expand Up @@ -133,7 +133,7 @@ class Virus(dj.Lookup):
virus: varchar(64) # name of the virus
---
-> VirusSource
virus_lot_number="": varchar(128) # lot numnber of the virus
virus_lot_number="": varchar(128) # lot number of the virus
virus_titer=null: float # x10^12GC/mL
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1985,7 +1985,7 @@
"---\n",
"-> imaging.CellType\n",
"roi_trace : longblob # average fluorescence of roi obj-timeSeriesArrayHash-value(1, 1)-valueMatrix\n",
"neuropil_trace : longblob # average fluorescence of neuopil surounding each ROI, obj-timeSeriesArrayHash-value(1, 1)-valueMatrix\n",
"neuropil_trace : longblob # average fluorescence of neuopil surrounding each ROI, obj-timeSeriesArrayHash-value(1, 1)-valueMatrix\n",
"roi_pixel_list : longblob # pixel list of this roi\n",
"neuropil_pixel_list : longblob # pixel list of the neuropil surrounding the roi\n",
"inc : tinyint # whether included (criteria - cells > 1.05 times brighter than neuropil)\n",
Expand Down Expand Up @@ -3023,7 +3023,7 @@
" {'subject_id': 216219, 'session': 5, 'roi_idx': 22}, # contra preferring, response starting from the sample period\n",
" {'subject_id': 216219, 'session': 5, 'roi_idx': 49}, # contra preferring, response starting from the delay period\n",
" {'subject_id': 221541, 'session': 13, 'roi_idx': 44}, # contra preferring, response starting from the response period\n",
" {'subject_id': 216219, 'session': 14, 'roi_idx': 9}, # ipsi preferring, repsonse starting from the sample period\n",
" {'subject_id': 216219, 'session': 14, 'roi_idx': 9}, # ipsi preferring, response starting from the sample period\n",
" {'subject_id': 216219, 'session': 5, 'roi_idx': 35}, # ipsi preferring, response starting from the delay period\n",
" {'subject_id': 216219, 'session': 6, 'roi_idx': 47}, # ipsi preferring, response starting from the response period\n",
"]"
Expand Down Expand Up @@ -4903,10 +4903,10 @@
" ipsi_cells = (imaging.RoiAnalyses & 'is_responsive=1' & 'selectivity=\"Ipsi\"') & \\\n",
" (imaging.Scan.Roi & f'cell_type=\"{cell_type}\"' & 'inc=1') & L5_key\n",
" \n",
" # average df/f of contra trials, sorted by the reponse time of the half peak.\n",
" # average df/f of contra trials, sorted by the response time of the half peak.\n",
" contra_avg_l, contra_avg_r = contra_cells.fetch('dff_m_l', 'dff_m_r', order_by='frame_rise_half')\n",
" \n",
" # average df/f of contra trials, sorted by the reponse time of the half peak.\n",
" # average df/f of contra trials, sorted by the response time of the half peak.\n",
" ipsi_avg_l, ipsi_avg_r = ipsi_cells.fetch('dff_m_l', 'dff_m_r', order_by='frame_rise_half')\n",
" \n",
" \n",
Expand Down
2 changes: 1 addition & 1 deletion 000010/DataJoint/DJ-NWB-Li-2015b/pipeline/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class Photostim(dj.Manual):
ml_location=null: float # um from ref ; right is positive; based on manipulator coordinates/reconstructed track
ap_location=null: float # um from ref; anterior is positive; based on manipulator coordinates/reconstructed track
dv_location=null: float # um from dura; ventral is positive; based on manipulator coordinates/reconstructed track
ml_angle=null: float # Angle between the manipulator/reconstructed track and the Medio-Lateral axis. A tilt towards the right hemishpere is positive.
ml_angle=null: float # Angle between the manipulator/reconstructed track and the Medio-Lateral axis. A tilt towards the right hemisphere is positive.
ap_angle=null: float # Angle between the manipulator/reconstructed track and the Anterior-Posterior axis. An anterior tilt is positive.
waveform=null: longblob # normalized to maximal power. The value of the maximal power is specified for each PhotostimTrialEvent individually
frequency=null: float # (Hz)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def export_to_nwb(session_key, nwb_output_dir=default_nwb_output_dir, save=False
conversion=1e-6,
unit='micrometers')

# ----- Segementation information -----
# ----- Segmentation information -----
# link the imaging segmentation to the nwb file
ophys = nwbfile.create_processing_module('ophys', 'Processing result of imaging')
img_seg = pynwb.ophys.ImageSegmentation()
Expand Down
2 changes: 1 addition & 1 deletion 000010/DataJoint/DJ-NWB-Li-2015b/pipeline/imaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Roi(dj.Part):
---
-> CellType
roi_trace: longblob # average fluorescence of roi obj-timeSeriesArrayHash-value(1, 1)-valueMatrix
neuropil_trace: longblob # average fluorescence of neuopil surounding each ROI, obj-timeSeriesArrayHash-value(1, 1)-valueMatrix
neuropil_trace: longblob # average fluorescence of neuopil surrounding each ROI, obj-timeSeriesArrayHash-value(1, 1)-valueMatrix
roi_pixel_list: longblob # pixel list of this roi
neuropil_pixel_list:longblob # pixel list of the neuropil surrounding the roi
inc: bool # whether included (criteria - cells > 1.05 times brighter than neuropil)
Expand Down
Loading

0 comments on commit cd963a3

Please sign in to comment.