Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotImplementedError: This meta file version of spikeglxis not implemented spikinterface 0.98.1 #1949

Closed
gmaggi opened this issue Aug 31, 2023 · 16 comments
Labels
extractors Related to extractors module

Comments

@gmaggi
Copy link

gmaggi commented Aug 31, 2023

Hi,

One of the users of spikeinterface has a single recording which is in a directory together to its metafile.. Te full content of the dir is: sh0br80bvd_g0_tcat.imec0.ap.bin sh0br80bvd_g0_tcat.imec0.ap.meta sh0br80bvd_g0_tcat.imec0.lf.bin sh0br80bvd_g0_tcat.imec0.lf.meta

we are running se.read_spikeglx( DIRPATH , stream_id = 'imec0.ap')
and we get (last part of the error)

File "/opt/anaconda/anaconda3/envs/spikeinterfacefull_0.98.1/lib/python3.10/site-packages/neo/rawio/spikeglxrawio.py", line 406, in extract_stream_info raise NotImplementedError('This meta file version of spikeglx' NotImplementedError: This meta file version of spikeglxis not implemented

any idea what is the issue could be?

thanks!

@alejoe91 alejoe91 added the extractors Related to extractors module label Aug 31, 2023
@alejoe91
Copy link
Member

Can you share the .meta file?

@gmaggi
Copy link
Author

gmaggi commented Aug 31, 2023

I just sent it to your gmail. Sorry if this is not the right way of sharing it

@alejoe91
Copy link
Member

Thanks! It works on my side! What version of neo are you using? Can you pip install -U neo to be sure?

@gmaggi
Copy link
Author

gmaggi commented Aug 31, 2023 via email

@gmaggi
Copy link
Author

gmaggi commented Aug 31, 2023

neo 0.12.0 seems to be the latest one. The update did not fix the issue.
The spikeinterface we have is 0.98.1

@alejoe91
Copy link
Member

Can you paste the full error?

@gmaggi
Copy link
Author

gmaggi commented Aug 31, 2023

Traceback (most recent call last):
  File "/opt/git_nerf_common/nerf_spikeinterface/nerf_spikeinterface_pipeline.py", line 350, in <module>
    recording = run_extractor()
  File "/opt/git_nerf_common/nerf_spikeinterface/nerf_spikeinterface_pipeline.py", line 218, in run_extractor
    subrecording = se.read_spikeglx( Path(args.INPUTFILE) , stream_id = 'imec0.ap')
  File "/opt/anaconda/anaconda3/envs/spikeinterfacefull_0.98.1/lib/python3.10/site-packages/spikeinterface/extractors/neoextractors/spikeglx.py", line 51, in __init__
    NeoBaseRecordingExtractor.__init__(
  File "/opt/anaconda/anaconda3/envs/spikeinterfacefull_0.98.1/lib/python3.10/site-packages/spikeinterface/extractors/neoextractors/neobaseextractor.py", line 185, in __init__
    _NeoBaseExtractor.__init__(self, block_index, **neo_kwargs)
  File "/opt/anaconda/anaconda3/envs/spikeinterfacefull_0.98.1/lib/python3.10/site-packages/spikeinterface/extractors/neoextractors/neobaseextractor.py", line 25, in __init__
    self.neo_reader = self.get_neo_io_reader(self.NeoRawIOClass, **neo_kwargs)
  File "/opt/anaconda/anaconda3/envs/spikeinterfacefull_0.98.1/lib/python3.10/site-packages/spikeinterface/extractors/neoextractors/neobaseextractor.py", line 64, in get_neo_io_reader
    neo_reader.parse_header()
  File "/opt/anaconda/anaconda3/envs/spikeinterfacefull_0.98.1/lib/python3.10/site-packages/neo/rawio/baserawio.py", line 179, in parse_header
    self._parse_header()
  File "/opt/anaconda/anaconda3/envs/spikeinterfacefull_0.98.1/lib/python3.10/site-packages/neo/rawio/spikeglxrawio.py", line 81, in _parse_header
    self.signals_info_list = scan_files(self.dirname)
  File "/opt/anaconda/anaconda3/envs/spikeinterfacefull_0.98.1/lib/python3.10/site-packages/neo/rawio/spikeglxrawio.py", line 254, in scan_files
    info = extract_stream_info(meta_filename, meta)
  File "/opt/anaconda/anaconda3/envs/spikeinterfacefull_0.98.1/lib/python3.10/site-packages/neo/rawio/spikeglxrawio.py", line 406, in extract_stream_info
    raise NotImplementedError('This meta file version of spikeglx'
NotImplementedError: This meta file version of spikeglxis not implemented

@alejoe91
Copy link
Member

Ah! I think that the problem is that it's a NP2 probe (imDatPrb_type=24), but you have LF streams too! NP2 probes should only generate AP streams, since they are broad-band...

Can you confirm you are using a NP2-4 shank probe?

@Shrh627
Copy link

Shrh627 commented Aug 31, 2023

Hi,
Yes, we are using a 4-shank NP2.0 probe. I also need to mention that I found a difference between the raw data meta file and the output of the CatGT.

catGTCmdline0=<CatGT -dir=E:/Data/ephys/raw/Chronic/SH049/230823/sh0br80bvd_g0/sh0br80bvd_g0_imec0 -run=sh0br80bvd -g=0 -t=0 -no_run_fld -t_miss_ok -prb=0 -ap -lf -aphipass=300 -aplopass=5000 -lfhipass=1 -lflopass=300 -gbldmx -gfix=0.4,0.1,0.02 -dest=//nerffs17/boninlabwip2023/data/ephys/shahriar/Raw/NP2.0/Chronic/SH049/230823>
catGVals=0,0
catNFiles=1
catTVals=0,0

These lines are in the output of the CatGT .meta file which is not in the GLX output file.

@alejoe91
Copy link
Member

Do you have lf.bin in the original folder (before CatGT)?

@Shrh627
Copy link

Shrh627 commented Aug 31, 2023

No, I don't.

@alejoe91
Copy link
Member

Then try to move them somewhere else! It should work! We made that assumption that NP2 only has ap, but if CatGT produces an lf too we'll probably need to relax thta assumption

@gmaggi
Copy link
Author

gmaggi commented Sep 1, 2023

Putting only the ap* files in a dir works fine.
Thanks!!

@gmaggi
Copy link
Author

gmaggi commented Sep 27, 2023

Then try to move them somewhere else! It should work! We made that assumption that NP2 only has ap, but if CatGT produces an lf too we'll probably need to relax thta assumption

Hi @alejoe91 , would this assumption be relaxed in the next version?

@alejoe91
Copy link
Member

Yes: see NeuralEnsemble/python-neo#1327

@alejoe91
Copy link
Member

alejoe91 commented Nov 6, 2023

Closing because related to NEO (and already fixed in SI)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extractors Related to extractors module
Projects
None yet
Development

No branches or pull requests

3 participants