AllenInstitute/ipfx

IndexError: Cannot find ('EXTPCllATT',)

sgratiy opened this issue · 1 comments

Describe the bug
For about 40 of these experiments I had to use the default ontology file packaged with IPFX when creating the EphysDataSet object because the ontology file that was included in the network folder was causing an IndexError when calling get_sweep_numbers(). I have marked these experiments with the tag “ontology file not working, used default ontology" under the “Notes” column of the attached csv.

Example:
(nwb_filename and ont_filename are the nwb files and ontology files that are found in the network directory with the rest of the data

data_set = create_ephys_data_set(nwb_file=nwb_filename, ontology=ont_filename)

ontology  = data_set.ontology

bath_sweeps = data_set.get_sweep_numbers(ontology.seal_names) 

Results in Error:

IndexError: Cannot find ('EXTPCllATT',) sweeps with clamp mode: None

But when I don’t include the ontology argument in create_ephys_data_set() it defaults to the one included with IPFX and then there is no IndexError and the sweeps can be found with data_set.get_sweep_numbers(). I even opened up these ontology files and could find the stimulus names (e.g ‘EXTPCllATT’) in the ontology files. Do you have any idea why the stimulus ontology files that are in the network directory along with the nwb files would cause this IndexError. I can open another GitHub issue if you think that would be appropriate here.

How to fix
Issue arises from previous error in ontology:
Incorrect ontology record in network folder:

  [
     "code",
     "180424",
     "EXTPCllATT180424"
   ],
   [
     "name",
     "Test"
   ]

vs correct in the default ontology:

  [
    [
      "code",
      "EXTPCllATT",
      "EXTPCllATT180424"
    ],
    [
      "name",
      "Test"
    ]
  ],

rerunning these cells through pipeline should fix it

Reran the 40 through:
EPHYS_NWB_STIMULUS_SUMMARY_V3_QUEUE
EPHYS_QC_V3_QUEUE

ephys_roi_result_ids
1050960240
1050964924
1051346596
1051937364
1052132186
1052135223
1052313733
1052327036
1052341756
1052347484
1052503376
1052771692
1053484121
1053496985
1053514038
1053562922
1053572414
1053729543
1053940020
1054237630
1054721457
1054727901
1054776575
1054968187
1055015468
1055032266
1055042844
1055221318
1055253876
1055256006
1055258947
1055268298
1055390846
1055411762
1055417191
1055616798
1056257527
1056479324
1056685563
1056737975