-
Notifications
You must be signed in to change notification settings - Fork 14
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
Database redesign to add upstream recording
schema
#24
Conversation
u19_pipeline/recording.py
Outdated
['ephys', '', '/braininit/Data/eletrophysiology'], | ||
['imaging', '', '/braininit/Data/eletrophysiology'], | ||
['video_acquisition', '', '/braininit/Data/video_acquisition'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
['ephys', '', '/braininit/Data/eletrophysiology'], | |
['imaging', '', '/braininit/Data/eletrophysiology'], | |
['video_acquisition', '', '/braininit/Data/video_acquisition'] | |
['ephys', 'Neuropixels', '/mnt/cup/braininit/Data/electrophysiology'], | |
['imaging', 'Two-photon calcium imaging', '/mnt/cup/braininit/Data/imaging'], | |
['video_acquisition', '', '/mnt/cup/braininit/Data/video_acquisition'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prepended /mnt/cup
. Is this required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well I was thinking just /braininit is ok to be a reference for the actual path.
/braininit is /mnt/cup/braininit in spock, scotty
/braininit is /Volumes/braininit on Mac
/braininit is \cup.pni.princeton.edu\braininit\ on Windows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying. Sounds great.
u19_pipeline/recording.py
Outdated
recording_modality: varchar(64) # modalities for recording (ephys, imaging, video_recording, etc.) | ||
--- | ||
modality_description: varchar(255) # description for the modality | ||
root_direcory: varchar(255) # root directory where that modality is stored (e.g. ephys = /braininit/Data/eletrophysiology) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
root_direcory: varchar(255) # root directory where that modality is stored (e.g. ephys = /braininit/Data/eletrophysiology) | |
root_directory: varchar(255) # root directory where that modality is stored |
Since we have the contents
property, perhaps we don't need the example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed !
cls.insert1(param_dict) | ||
|
||
@schema | ||
class Recording(dj.Manual): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would not effect the functionality of this module, but perhaps the Recording
table should be placed directly after the RecordingModality
table?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All right,
My "logic" was to put all lookup tables first.
But your proposal makes a lot of sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Either way works. I am just used to ordering the tables in approximately the same order as how the data flows.
u19_pipeline/recording.py
Outdated
-> [nullable] acquisition.Session # acquisition Session key | ||
-> [nullable] subject.Subject.proj(acquisition_subject='subject_fullname') # Recording subject when no behavior Session present | ||
recording_datetime=null: datetime # Recording datetime when no bheavior Session present |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a difficult task to implement. Perhaps we could use Part
tables.
class Recording(dj.Manual):
definition = """
recording_id: INT(11) AUTO_INCREMENT
---
-> RecordingModality
recording_directory: varchar(255)
"""
class BehaviorSession(dj.Part):
definition = """
-> master
---
-> acquisition.Session.proj(recording_datetime='session_start_time')
"""
class RecordingSession(dj.Part):
definition = """
-> master
---
-> subject.Subject
recording_datetime: datetime
"""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this design is indeed cleaner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
recording
schema
Co-authored-by: Kabilar Gunalan <kabilar@datajoint.com>
Co-authored-by: Kabilar Gunalan <kabilar@datajoint.com>
Co-authored-by: Kabilar Gunalan <kabilar@datajoint.com>
Co-authored-by: Kabilar Gunalan <kabilar@datajoint.com>
Co-authored-by: Kabilar Gunalan <kabilar@datajoint.com>
Co-authored-by: Kabilar Gunalan <kabilar@datajoint.com>
u19_pipeline/recording.py
Outdated
--- | ||
status_definition: VARCHAR(256) # Status definition | ||
""" | ||
contents = get_content_list_from_status_dict() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we do not need to define a separate function (get_content_list_from_status_dict
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do it without a separate function
u19_pipeline/ephys.py
Outdated
|
||
|
||
# ephys element requires table with name Session | ||
Session = EphysSession | ||
Session = EphysSorting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we set Session
to EphysRecording
or EphysSorting
? Not sure what the correct answer is.
Hi @Alvalunasan, within the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @Alvalunasan! Very thorough design. Looking forward to seeing it in action.
Co-authored-by: Kabilar Gunalan <kabilar@datajoint.com>
Co-authored-by: Kabilar Gunalan <kabilar@datajoint.com>
Co-authored-by: Kabilar Gunalan <kabilar@datajoint.com>
Co-authored-by: Kabilar Gunalan <kabilar@datajoint.com>
Co-authored-by: Kabilar Gunalan <kabilar@datajoint.com>
Co-authored-by: Kabilar Gunalan <kabilar@datajoint.com>
Co-authored-by: Kabilar Gunalan <kabilar@datajoint.com>
Co-authored-by: Kabilar Gunalan <kabilar@datajoint.com>
Co-authored-by: Kabilar Gunalan <kabilar@datajoint.com>
Co-authored-by: Kabilar Gunalan <kabilar@datajoint.com>
Co-authored-by: Kabilar Gunalan <kabilar@datajoint.com>
Co-authored-by: Kabilar Gunalan <kabilar@datajoint.com>
First draft of recording schema (schema for automatic process of acquisitions. Also serve as "Parent" for ephys/imaging)