@@ -57,9 +57,9 @@ def activate(ephys_schema_name, probe_schema_name=None, *, create_schema=True,
57
57
58
58
def get_ephys_root_data_dir () -> list :
59
59
"""
60
- All data paths, directories in DataJoint Elements are recommended to be
61
- stored as relative paths, with respect to some user-configured "root"
62
- directory, which varies from machine to machine (e.g. different mounted
60
+ All data paths, directories in DataJoint Elements are recommended to be
61
+ stored as relative paths, with respect to some user-configured "root"
62
+ directory, which varies from machine to machine (e.g. different mounted
63
63
drive locations)
64
64
65
65
get_ephys_root_data_dir() -> list
@@ -142,7 +142,7 @@ class EphysFile(dj.Part):
142
142
143
143
def make (self , key ):
144
144
145
- session_dir = find_full_path (get_ephys_root_data_dir (),
145
+ session_dir = find_full_path (get_ephys_root_data_dir (),
146
146
get_session_directory (key ))
147
147
148
148
inserted_probe_serial_number = (ProbeInsertion * probe .Probe & key ).fetch1 ('probe' )
@@ -191,7 +191,7 @@ def make(self, key):
191
191
'acq_software' : acq_software ,
192
192
'sampling_rate' : spikeglx_meta .meta ['imSampRate' ]})
193
193
194
- root_dir = find_root_directory (get_ephys_root_data_dir (),
194
+ root_dir = find_root_directory (get_ephys_root_data_dir (),
195
195
meta_filepath )
196
196
self .EphysFile .insert1 ({
197
197
** key ,
@@ -294,8 +294,8 @@ def make(self, key):
294
294
shank , shank_col , shank_row , _ = spikeglx_recording .apmeta .shankmap ['data' ][recorded_site ]
295
295
electrode_keys .append (probe_electrodes [(shank , shank_col , shank_row )])
296
296
elif acq_software == 'Open Ephys' :
297
-
298
- session_dir = find_full_path (get_ephys_root_data_dir (),
297
+
298
+ session_dir = find_full_path (get_ephys_root_data_dir (),
299
299
get_session_directory (key ))
300
300
301
301
loaded_oe = openephys .OpenEphys (session_dir )
@@ -457,8 +457,14 @@ class Curation(dj.Manual):
457
457
458
458
def create1_from_clustering_task (self , key , curation_note = '' ):
459
459
"""
460
- A function to create a new corresponding "Curation" for a particular
460
+ <<<<<<< HEAD
461
+ A function to create a new corresponding "Curation" for a particular
461
462
"ClusteringTask"
463
+ =======
464
+ A function to create a new corresponding "Curation" for a particular
465
+ "ClusteringTask", which assumes that no curation was performed on the
466
+ dataset
467
+ >>>>>>> dee1c29 (Rebase, squashed. See Details)
462
468
"""
463
469
if key not in Clustering ():
464
470
raise ValueError (f'No corresponding entry in Clustering available'
@@ -472,9 +478,9 @@ def create1_from_clustering_task(self, key, curation_note=''):
472
478
# Synthesize curation_id
473
479
curation_id = dj .U ().aggr (self & key , n = 'ifnull(max(curation_id)+1,1)' ).fetch1 ('n' )
474
480
self .insert1 ({** key , 'curation_id' : curation_id ,
475
- 'curation_time' : creation_time ,
481
+ 'curation_time' : creation_time ,
476
482
'curation_output_dir' : output_dir ,
477
- 'quality_control' : is_qc ,
483
+ 'quality_control' : is_qc ,
478
484
'manual_curation' : is_curated ,
479
485
'curation_note' : curation_note })
480
486
@@ -622,7 +628,7 @@ def yield_unit_waveforms():
622
628
spikeglx_meta_filepath = get_spikeglx_meta_filepath (key )
623
629
neuropixels_recording = spikeglx .SpikeGLX (spikeglx_meta_filepath .parent )
624
630
elif acq_software == 'Open Ephys' :
625
- session_dir = find_full_path (get_ephys_root_data_dir (),
631
+ session_dir = find_full_path (get_ephys_root_data_dir (),
626
632
get_session_directory (key ))
627
633
openephys_dataset = openephys .OpenEphys (session_dir )
628
634
neuropixels_recording = openephys_dataset .probes [probe_serial_number ]
@@ -669,7 +675,7 @@ def get_spikeglx_meta_filepath(ephys_recording_key):
669
675
except FileNotFoundError :
670
676
# if not found, search in session_dir again
671
677
if not spikeglx_meta_filepath .exists ():
672
- session_dir = find_full_path (get_ephys_root_data_dir (),
678
+ session_dir = find_full_path (get_ephys_root_data_dir (),
673
679
get_session_directory (
674
680
ephys_recording_key ))
675
681
inserted_probe_serial_number = (ProbeInsertion * probe .Probe
@@ -708,7 +714,7 @@ def get_neuropixels_channel2electrode_map(ephys_recording_key, acq_software):
708
714
for recorded_site , (shank , shank_col , shank_row , _ ) in enumerate (
709
715
spikeglx_meta .shankmap ['data' ])}
710
716
elif acq_software == 'Open Ephys' :
711
- session_dir = find_full_path (get_ephys_root_data_dir (),
717
+ session_dir = find_full_path (get_ephys_root_data_dir (),
712
718
get_session_directory (ephys_recording_key ))
713
719
openephys_dataset = openephys .OpenEphys (session_dir )
714
720
probe_serial_number = (ProbeInsertion & ephys_recording_key ).fetch1 ('probe' )
0 commit comments