Skip to content

Converter for Plexon Offline Sorter format #146

Closed

Description

@jsiegle

Does anyone have code to convert Open Ephys data files to the format required for Offline Sorter? Or is anyone planning to write it? This would be useful for a lot of people.

Ideally, issues like this should go in the "analysis-tools" repository, but many more people are following GUI issues right now.

Activity

  1. guangxingli commented on Aug 11, 2014

    @guangxingli

    I wrote a Matlab mex function to convert Open Ephys data files to the Plexon .plx file. I put them on GitHub, https://github.com/guangxingli/ephys2plx

  2. jvoigts commented on Aug 15, 2014

    @jvoigts
    Member

    This looks great!
    I think the best might be to pull-request this into https://github.com/open-ephys/analysis-tools , probably into a new directory?

    We should probably start re-organizing the analysis tools into a few folders..

  3. guangxingli commented on Aug 15, 2014

    @guangxingli

    Sure, I will create a pull-request and put files into a new directory.

  4. jvoigts commented on Aug 15, 2014

    @jvoigts
    Member

    Awesome, just merged it. Thx!
    Josh: Was there anyone who was specifically waiting for this and who we should let know?

  5. jsiegle commented on Aug 15, 2014

    @jsiegle
    MemberAuthor

    Probably, but I forget who…let's just announce it in the next newsletter

  6. ygparklab commented on Jan 16, 2015

    @ygparklab

    Hi! I happily tried this today but receive this message.


    mex ephys2plx_mex.c
    /Applications/MATLAB_R2012b.app/bin/mex: line 305: gcc-4.2: command not found
    /Applications/MATLAB_R2012b.app/bin/mex: line 1326: gcc-4.2: command not found

    mex: compile of ' "ephys2plx_mex.c"' failed.
    

    Error using mex (line 206)
    Unable to complete
    successfully.


    Is it the problem of compiler I used? I am using Matlab 2012b in Mac, and compiler I chose is '/Applications/MATLAB_R2012b.app/bin/mexopts.sh : '

    Looking forward to you reply!

  7. guangxingli commented on Jan 16, 2015

    @guangxingli

    Hello Young-gyun,

    This error is happening probably because your MATLAB version (R2012b) dose
    not support the Xcode installed on your computer. The MATLAB is expecting
    GCC 4.2 to be present. This compiler was distributed with Xcode 4.0 and
    4.1, but is no longer supplied as of Xcode 4.2. You could solve this
    problem by applying a patch from MathWorks. The patch and detail
    information could be found from here:

    http://www.mathworks.com/matlabcentral/answers/94092-can-i-use-xcode-4-2-to-4-6-as-my-c-or-c-compiler-in-matlab-updated-2013-02-04

    hope this helps.

    Guangxing

    On 16 January 2015 at 07:25, young-gyun [email protected] wrote:

    Hi! I happily tried this today but receive this message.

    mex ephys2plx_mex.c
    /Applications/MATLAB_R2012b.app/bin/mex: line 305: gcc-4.2: command not
    found
    /Applications/MATLAB_R2012b.app/bin/mex: line 1326: gcc-4.2: command not
    found

    mex: compile of ' "ephys2plx_mex.c"' failed.

    Error using mex (line 206)
    Unable to complete
    successfully.


    Is it the problem of compiler I used? I am using Matlab 2012b in Mac,
    and compiler I chose is '/Applications/MATLAB_R2012b.app/bin/mexopts.sh : '

    Looking forward to you reply!

    —
    Reply to this email directly or view it on GitHub
    #146 (comment).

  8. JMHyman commented on Mar 5, 2015

    @JMHyman

    Hi Guangxing,

    I'm trying to use this converter and I keep getting this error:

    Undefined function or variable 'header'.

    Error in getFileHeader (line 7)
    Header=header;

    Error in ephysConv (line 6)
    FileHeaders{1,1}=getFileHeader([pathName ephysInfo.events_file]);

    Error in ephys2plx (line 16)
    ephysConv; %get .xml file, and read information

    I have the most recent version of OpenEphys and just recorded a tetrode file from the sample data.

    Any help would be appreciated,
    James

  9. Mlanzilo commented on Mar 13, 2015

    @Mlanzilo

    Hi Guangxing,
    I have the same problem of JMHyman.
    I have 2014b version of Matlab. Can you help me?
    best
    Marco

  10. mmyros commented on Mar 13, 2015

    @mmyros

    James and Marco, this is likely due to your event files getting corrupted. If that's so, the bug is in the way recording is getting done rather than the import function. Are you using PSTH module? Try recording without it or turn off saving inside PSTH module. Aarón said that PSTH module might have some conflicting features right now (#262).

  11. JMHyman commented on Mar 16, 2015

    @JMHyman

    Thanks for the input but I don't think that's the problem.

    All my files have been recorded without a PSTH module. While it looks like the problem is with the events file, I don't see any way to disable the events file. When I comment out the events file read lines (5-6 on EphysConv) then it goes til I get this error with the spike files:

    ephys2plx
    Error using fread
    Invalid file identifier. Use fopen to generate a valid file identifier.

    Error in getFileHeader (line 5)
    hdr = fread(fid, 1024, 'char*1');

    Error in ephysConv (line 17)
    FileHeaders{2,1}{i,1}=getFileHeader(SpikeFileName);

    Error in ephys2plx (line 16)
    ephysConv; %get .xml file, and read information

    It seems like there's been a change to the file formatting in this new version of OpenEphys or something.

  12. mmyros commented on Mar 16, 2015

    @mmyros

    So this must affect the spike files as well, I have not dealt with those. At least the .continuous files are intact in my experience. I hope we can figure this out soon. In the meantime, I think I will be switching to one of the older releases.

  13. aacuevas commented on Mar 17, 2015

    @aacuevas
    Collaborator

    From the looks of it, the issue with this is mainly not because of the corruption (can be in case of the events files, but not the spike ones), but because of the file format having changed (now is version .04, the ephys2plx files seem designed for version .02). What I've noticed is that the description field of the header is not up to date with all the changes, I'll fix that ASAP.

    Regarding the converter itself, @guangxingli, as the original author, could you please update the format when I peoperly update the format descriptions? If not, I'll try to look at the code and do it myself.

  14. JMHyman commented on Apr 10, 2015

    @JMHyman

    Any updates on the file format header or .plx converters?

    Thanks in advance.

  15. guangxingli commented on Apr 10, 2015

    @guangxingli

    Sorry, I missed the messages before. I will look into the issue and fix it
    ASAP.

    Guangxing

    On 10 April 2015 at 12:55, JMHyman [email protected] wrote:

    Any updates on the file format header or .plx converters?

    Thanks in advance.

    —
    Reply to this email directly or view it on GitHub
    #146 (comment).

  16. flamesugar commented on May 23, 2015

    @flamesugar

    Any progress with ephys2plx.m adapt to newest GUI 0.3.5 ? So anxious waiting...

  17. JMHyman commented on Jun 4, 2015

    @JMHyman

    Guangxing,

    Have you had a chance to look into updating this conversion script for the new OpenEphys file format?

    James

  18. DiegoBenusiglio commented on Dec 14, 2015

    @DiegoBenusiglio

    Hello everyone,

    I am using ephys2plx to convert Open Ephys data into .plx (Plexon) file readable by Offline Sorter.
    So far, it works with Single Channel Mode (SE_.spikes), but it does NOT work with Stereotrode (ST_.spikes) or Tetrode mode (TT*.spikes). It returns me the following errors:

    ephys2plx

    Error using fread
    Invalid file identifier. Use fopen to generate a valid file identifier.

    Error in getFileHeader (line 5)
    hdr = fread(fid, 1024, 'char*1');

    Error in ephysConv (line 26)
    FileHeaders{2,1}{i,1}=getFileHeader(SpikeFileName);

    Error in ephys2plx (line 15)
    ephysConv; %get .xml file, and read information

    I am using Mac OSX 10.11.1, Matlab 2015a and Xcode 7.1.1 to compile the mex file.
    Does anyone have any idea how to fix it?

    Thanks in advance for your help,
    Diego.

  19. oferyizhar commented on Mar 28, 2016

    @oferyizhar

    Has anyone been able to update the converter to work with the new version of the header? We are using version 0.3.6 and it would be great if this converter would work for our data.

    Thanks for your help,
    Ofer

  20. JMHyman commented on Mar 28, 2016

    @JMHyman

    I've been using an admittedly convoluted, but functional, workaround.

    It's discussed in this thread: open-ephys/analysis-tools#7 (comment)

    Briefly, I use load_open_ehpys to get files into Matlab. Next, I use the Neuralynx script (MattoNlx) to make .ntt files. I then can open those with OFS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions