Skip to content

Commit 2e63edc

Browse files
authored
Merge pull request #111 from kabilar/main
Fix for cicd and other ux fixes
2 parents 34912bf + 8f006c0 commit 2e63edc

File tree

7 files changed

+35
-172
lines changed

7 files changed

+35
-172
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
3838
+ Add - NWB export function
3939

4040
## [0.1.0b4] - 2021-11-29
41-
### Added
42-
+ Processing with Kilosort and pyKilosort for Open Ephys and SpikeGLX
41+
42+
+ Add - Processing with Kilosort and pyKilosort for Open Ephys and SpikeGLX
4343

4444

4545
## [0.1.0b0] - 2021-05-07

docs/src/concepts.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,17 @@ Over the past few years, several labs have developed DataJoint-based data manage
5555

5656
Each of the DataJoint Elements creates a set of tables for common neuroscience data modalities to organize, preprocess, and analyze data. Each node in the following diagram is a table within the Element or a table connected to the Element.
5757

58-
![element-array-ephys diagram](https://raw.githubusercontent.com/datajoint/element-array-ephys/main/images/attached_array_ephys_element_acute.svg)
58+
### `ephys_acute` module
59+
60+
![diagram](https://raw.githubusercontent.com/datajoint/element-array-ephys/main/images/attached_array_ephys_element_acute.svg)
61+
62+
### `ephys_chronic` module
63+
64+
![diagram](https://raw.githubusercontent.com/datajoint/element-array-ephys/main/images/attached_array_ephys_element_chronic.svg)
65+
66+
### `ephys_precluster` module
67+
68+
![diagram](https://raw.githubusercontent.com/datajoint/element-array-ephys/main/images/attached_array_ephys_element_precluster.svg)
5969

6070
### `subject` schema ([API docs](https://datajoint.com/docs/elements/element-animal/api/element_animal/subject))
6171
- Although not required, most choose to connect the `Session` table to a `Subject` table.

docs/src/index.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,4 @@ developed to handle various use cases of this pipeline and workflow:
2626

2727
Visit the [Concepts page](./concepts.md) for more information about the use cases of
2828
`ephys` schemas and an explanation of the tables. To get started with building your own
29-
data pipeline, visit the [Tutorials page](./tutorials.md).
30-
31-
### `ephys_acute` module
32-
33-
![element-array-ephys-acute diagram]
34-
(https://raw.githubusercontent.com/datajoint/element-array-ephys/main/images/attached_array_ephys_element_acute.svg)
35-
36-
### `ephys_chronic` module
37-
38-
![element-array-ephys-chronic diagram]
39-
(https://raw.githubusercontent.com/datajoint/element-array-ephys/main/images/attached_array_ephys_element_chronic.svg)
40-
41-
### `ephys_precluster` module
42-
43-
![element-array-ephys-precluster diagram]
44-
(https://raw.githubusercontent.com/datajoint/element-array-ephys/main/images/attached_array_ephys_element_precluster.svg)
29+
data pipeline, visit the [Tutorials page](./tutorials.md).

element_array_ephys/ephys_acute.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ def activate(
3636
create_schema (bool): If True, schema will be created in the database.
3737
create_tables (bool): If True, tables related to the schema will be created in the database.
3838
linking_module (str): A string containing the module name or module containing the required dependencies to activate the schema.
39-
39+
4040
Dependencies:
4141
Upstream tables:
4242
Session: A parent table to ProbeInsertion
4343
Probe: A parent table to EphysRecording. Probe information is required before electrophysiology data is imported.
44-
44+
4545
Functions:
4646
get_ephys_root_data_dir(): Returns absolute path for root data director(y/ies) with all electrophysiological recording sessions, as a list of string(s).
4747
get_session_direction(session_key: dict): Returns path to electrophysiology data for the a particular session as a list of strings.
@@ -125,8 +125,8 @@ class AcquisitionSoftware(dj.Lookup):
125125
Attributes:
126126
acq_software ( varchar(24) ): Acquisition software, e.g,. SpikeGLX, OpenEphys
127127
"""
128-
129-
definition = """ # Name of software used for recording of neuropixels probes - SpikeGLX or Open Ephys
128+
129+
definition = """ # Software used for recording of neuropixels probes
130130
acq_software: varchar(24)
131131
"""
132132
contents = zip(["SpikeGLX", "Open Ephys"])
@@ -271,7 +271,7 @@ class EphysRecording(dj.Imported):
271271
---
272272
-> probe.ElectrodeConfig
273273
-> AcquisitionSoftware
274-
sampling_rate: float # (Hz)
274+
sampling_rate: float # (Hz)
275275
recording_datetime: datetime # datetime of the recording from this probe
276276
recording_duration: float # (seconds) duration of the recording from this probe
277277
"""
@@ -296,6 +296,7 @@ def make(self, key):
296296
session_dir = find_full_path(
297297
get_ephys_root_data_dir(), get_session_directory(key)
298298
)
299+
299300
inserted_probe_serial_number = (ProbeInsertion * probe.Probe & key).fetch1(
300301
"probe"
301302
)
@@ -708,7 +709,7 @@ class ClusteringTask(dj.Manual):
708709
EphysRecording (foreign key): EphysRecording primary key.
709710
ClusteringParamSet (foreign key): ClusteringParamSet primary key.
710711
clustering_outdir_dir (varchar (255) ): Relative path to output clustering results.
711-
task_mode (enum): `Trigger` and `load` either computes clustering or imports existing clustering data, respectively.
712+
task_mode (enum): `Trigger` computes clustering or and `load` imports existing data.
712713
"""
713714

714715
definition = """
@@ -732,9 +733,7 @@ def infer_output_dir(cls, key: dict, relative: bool = False, mkdir: bool = False
732733
e.g.: sub4/sess1/probe_2/kilosort2_0
733734
"""
734735
processed_dir = pathlib.Path(get_processed_root_data_dir())
735-
session_dir = find_full_path(
736-
get_ephys_root_data_dir(), get_session_directory(key)
737-
)
736+
session_dir = find_full_path(get_ephys_root_data_dir(), get_session_directory(key))
738737
root_dir = find_root_directory(get_ephys_root_data_dir(), session_dir)
739738

740739
method = (
@@ -798,7 +797,7 @@ class Clustering(dj.Imported):
798797
clustering_time (datetime): Time when clustering results are generated.
799798
package_version (varchar(16) ): Package version used for a clustering analysis.
800799
"""
801-
800+
802801
definition = """
803802
# Clustering Procedure
804803
-> ClusteringTask
@@ -998,7 +997,7 @@ class Unit(dj.Part):
998997
spike_depths (longblob): Array of depths associated with each spike, relative to each spike.
999998
"""
1000999

1001-
definition = """
1000+
definition = """
10021001
# Properties of a given unit from a round of clustering (and curation)
10031002
-> master
10041003
unit: int

element_array_ephys/ephys_chronic.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from .readers import spikeglx, kilosort, openephys
1414
from . import probe, get_logger, ephys_report
1515

16-
1716
log = get_logger(__name__)
1817

1918
schema = dj.schema()
@@ -49,7 +48,6 @@ def activate(
4948
get_processed_data_dir(): Optional. Returns absolute path for processed data. Defaults to root directory.
5049
"""
5150

52-
5351
if isinstance(linking_module, str):
5452
linking_module = importlib.import_module(linking_module)
5553
assert inspect.ismodule(
@@ -96,8 +94,8 @@ def get_session_directory(session_key: dict) -> str:
9694
"""Retrieve the session directory with Neuropixels for the given session.
9795
9896
Args:
99-
session_key (dict): A dictionary mapping subject to an entry in the subject table, and session_datetime corresponding to a session in the database.
100-
97+
session_key (dict): A dictionary mapping subject to an entry in the subject table, and session_datetime corresponding to a session in the database.
98+
10199
Returns:
102100
A string for the path to the session directory.
103101
"""
@@ -861,15 +859,15 @@ class Curation(dj.Manual):
861859
curation_id: int
862860
---
863861
curation_time: datetime # time of generation of this set of curated clustering results
864-
curation_output_dir: varchar(255) # output directory of the curated results, relative to clustering root data directory
862+
curation_output_dir: varchar(255) # output directory of the curated results, relative to root data directory
865863
quality_control: bool # has this clustering result undergone quality control?
866864
manual_curation: bool # has manual curation been performed on this clustering result?
867865
curation_note='': varchar(2000)
868866
"""
869867

870-
def create1_from_clustering_task(self, key, curation_note str: = ""):
868+
def create1_from_clustering_task(self, key, curation_note: str = ""):
871869
"""
872-
A function to create a new corresponding "Curation" for a particular
870+
A function to create a new corresponding "Curation" for a particular
873871
"ClusteringTask"
874872
"""
875873
if key not in Clustering():
@@ -1367,8 +1365,7 @@ def get_openephys_probe_data(ephys_recording_key: dict) -> list:
13671365
return probe_data
13681366

13691367

1370-
def get_neuropixels_channel2electrode_map(ephys_recording_key: dict,
1371-
acq_software: str) -> dict:
1368+
def get_neuropixels_channel2electrode_map(ephys_recording_key: dict, acq_software: str) -> dict:
13721369
"""Get the channel map for neuropixels probe.
13731370
"""
13741371
if acq_software == "SpikeGLX":
@@ -1461,7 +1458,7 @@ def generate_electrode_config(probe_type: str, electrodes: list) -> dict:
14611458

14621459

14631460
def get_recording_channels_details(ephys_recording_key: dict) -> np.array:
1464-
"""Get details of recording channels for a givenn recording.
1461+
"""Get details of recording channels for a given recording.
14651462
"""
14661463
channels_details = {}
14671464

images/diagram_flowchart.drawio

Lines changed: 1 addition & 75 deletions
Large diffs are not rendered by default.

images/diagram_flowchart.svg

Lines changed: 3 additions & 57 deletions
Loading

0 commit comments

Comments
 (0)