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

I/O for multiple basepaths #198

Open
dlevenstein opened this issue May 18, 2018 · 9 comments
Open

I/O for multiple basepaths #198

dlevenstein opened this issue May 18, 2018 · 9 comments
Assignees

Comments

@dlevenstein
Copy link
Collaborator

I'm adding functionality to bz_LoadCellinfo (which can then be copied to the other I/O functions) to load from an entire dataset of basePaths

Why? I calculated ISI statistics (function for this coming soon) for cells from a bunch of recordings, and saved as baseName.ISIStats.cellinfo.mat in each basePath...
I would now like to load those from ALL basePaths in the dataset.

My question for y'all is: how would we like this to be output.

  1. Should it just return a 1/N structure array where:
    ISIStats(1) is the cellinfo structure from the first recording
    ISIStats(2) is the cellinfo structure from the second recording
    ...
    ISIStats(N) is the cellinfo structure from the Nth recording.
    These are a little unwieldy, and will be need to be combined post-hoc for easy comparison.

Or
2) should it be a single structure where each of the fields are concatenated? This is a little harder to code up and will inevitably have some bugs to iron out relating to alignment etc. But will be much easier to analyze.

or
3) other

Either way, it will tack on the baseName from which the cellInfo was loaded, so that things don't get lost. I.e. each cell will have a UID (unitID) and baseName, both of which will be needed to uniquely identify that cell.
We can make a function to align two multi-basePath structures so that UIDs and baseNames line up.

@brendonw1
Copy link
Collaborator

brendonw1 commented May 19, 2018 via email

@dlevenstein
Copy link
Collaborator Author

Input side:

user provides a dataset folder (i.e. topPath, with many basePaths in it).
[ basePaths,baseNames ] = bz_FindBasePaths(topPath) crawls through folders in topPath and gets any basePaths. I just updated bz_FindBasePath so the user can select which basePaths they want from a list of those in topPath. (Kind of like you can do with SleepScoreMaster)
Will push this soon, along with the update to bz_LoadCellinfo that doesn't combine but makes a structure array, so y'all can try it out.

We can also make it so a list of baseNames can be provided (i.e. to avoid selecting manually multiple times etc etc)

@dlevenstein
Copy link
Collaborator Author

Output:

the default is to load as a (1 x N) structure array:
cellinfo(1) is the cellinfo structure from the first recording
cellinfo(2) is the cellinfo structure from the second recording
...
cellinfo(N) is the cellinfo structure from the Nth recording.

there's an option ('catcall',true), which will try to concatenate all into a single structure.
cellinfo.UID will have the UIDs from all the cells loaded
cellinfo.baseName will have the baseName from which they were each pulled
cellinfo.arbitrarydataname will have whatever metric is in the cellinfo file........

this will probably fail a bit if you have complicated cellinfo files, but for simple things like, for example
NREM rate, etc etc, this will be super straightforward/useful.

I'll push it all soon, would like to have dev merged into master first so it's not part of that big dump....

@petersenpeter
Copy link
Collaborator

petersenpeter commented May 19, 2018 via email

@dlevenstein
Copy link
Collaborator Author

dlevenstein commented May 19, 2018 via email

@petersenpeter
Copy link
Collaborator

petersenpeter commented May 20, 2018 via email

@brendonw1
Copy link
Collaborator

brendonw1 commented May 21, 2018 via email

@petersenpeter
Copy link
Collaborator

petersenpeter commented May 21, 2018 via email

@brendonw1
Copy link
Collaborator

brendonw1 commented May 21, 2018 via email

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

No branches or pull requests

3 participants