This is a data pipeline, constructed in DataJoint, used across Princeton's U19. It specifies a number of tables and their relational structure to organizes all metadata to
- mouse management,
- training management,
- microscope management,
- und recording
in one coherent framework.
- Install DataJoint for MATLAB
- Utilize MATLAB built-in GUI i.e. Top Ribbon -> Add-Ons -> Get Add-Ons
- Search, select, and install DataJoint
-
First time:
- Add this repository to MATLAB Path or cd to this repository folder.
dj_initial_conf(1)
- Insert user and password for the DB
-
Subsequent times:
- Add this repository to MATLAB Path or cd to this repository folder.
connect_datajoint00
Follow the steps to go through the tutorial:
-
Get into the directory of the current tutorial
tutorials/202103/
-
Choose your tutorial
-
Querying data (Strongly recommended)
- go through
session01_queries_fetches.mlx
- go through
-
Building analysis pipeline (Recommended only if you are going to create new databases or tables for analysis)
- go through
session02_build_pipeline.mlx
- go through
-
-
There are several data files (behavior, imaging & electrophysiology) that are referenced in the database
-
To access these files you should mount PNI file server volumes on your system.
-
There are three main file servers across PNI where data is stored (braininit, Bezos & u19_dj)
- From Windows Explorer, select "Map Network Drive" and enter:
\\cup.pni.princeton.edu\braininit\ (for braininit)
\\cup.pni.princeton.edu\Bezos-center\ (for Bezos)
\\cup.pni.princeton.edu\u19_dj\ (for u19_dj) - Authenticate with your NetID and PU password (NOT your PNI password, which may be different). When prompted for your username, enter PRINCETON\netid (note that PRINCETON can be upper or lower case) where netid is your PU NetID.
- Select "Go->Connect to Server..." from Finder and enter:
smb://cup.pni.princeton.edu/braininit/ (for braininit)
smb://cup.pni.princeton.edu/Bezos-center/ (for Bezos)
smb://cup.pni.princeton.edu/u19_dj/ (for u19_dj) - Authenticate with your NetID and PU password (NOT your PNI password, which may be different).
- Follow extra steps depicted in this link: https://npcdocs.princeton.edu/index.php/Mounting_the_PNI_file_server_on_your_desktop
Here are some shortcuts to common used data accross PNI
Sue Ann's Towers Task
- Imaging: /Bezos-center/RigData/scope/bay3/sakoay/{protocol_name}/imaging/{subject_nickname}/
- Behavior: /braininit/RigData/scope/bay3/sakoay/{protocol_name}/data/{subject_nickname}/
Lucas Pinto's Widefield
- Imaging /braininit/RigData/VRwidefield/widefield/{subject_nickname}/{session_date}/
- Behavior /braininit/RigData/VRwidefield/behavior/lucas/blocksReboot/data/{subject_nickname}/
Lucas Pinto's Opto inactivacion experiments
- Imaging /braininit/RigData/VRLaser/LaserGalvo1/{subject_nickname}/
- Behavior /braininit/RigData/VRLaser/behav/lucas/blocksReboot/data/{subject_nickname}/
- Mount needed file server
- Connect to the Database
- Create a structure with subject_fullname and session_date from the session
key.subject_fullname = 'koay_K65'
key.session_Date = '2018-02-05'
- Read file
[status, data] = lab.utils.read_behavior_file(key)
- Mount needed file server
- Connect to the Database
- Create a structure with subject_fullname and session_date from the session
key.subject_fullname = 'koay_K65'
key.session_Date = '2018-02-05'
- Fetch filepath info:
data_dir = fetch(acquisition.SessionStarted & key, 'remote_path_behavior_file');
[~, filepath] = lab.utils.get_path_from_official_dir(data_dir.remote_path_behavior_file);
- From Windows Explorer, select "Map Network Drive" and enter:
The backend is a SQL server [MariaDB].
The rigs talk to the database directly [SSL, wired connection].