# Motex Overview

Some matlab routines for downloading, processing and converting mouse GCaMP data from Benucci lab to mrTools format.

Requires two repositories:

Instructions for connecting to server and downloading data are here

You can download files using the motexGetData function to a local directory that you should create on your computer. The default is ~/data/motex/raw

% make the local directory (assuming you have not already)
mkdir ~/data/motex/raw;
motexGetData('M190802_RN');

Note that it defaults to looking in particular directories for the data and the log files (see help motexGetData). You can override these by doing:

% specify the paths where data and logs will be read from. Note that either
% of these can be cell arrays if you want the program to search multiple directories
motexGetData('M190802_RN','fromDataPaths=/Volumes/tex/IMAGING','fromLogPaths=/Volumes/DATA/MOUSE/LOGS','toPath=~/data/motex/raw');

# Convert data to mrTools

After you have downloaded the raw data locally then you can convert it to mrTools with the function motex2mrtools

% convert all of the runs in M190718_RN which have been dowloaded with motexGetData
motex2mrtools('M190718_RN');

If you only want to process a particular session/run you can specify that as follows:

% convert only a specific session / run
motex2mrtools('M190718_RN','sessionNum=1','runNum=1');

You can also specify the stimulus type:

% convert only a specific session / run
motex2mrtools('M190718_RN','sessionNum=1','runNum=1', 'stimulusType=manual');

See help on motex2mrtools for more details.

This function first analyzes the raw data folders and then the logs. If you just want that information, you can run those independently:

% load raw info (if you don't need to convert to mrtools but want to use these functions)
d = motexGetRawInfo('M190718_RN');
d = motexGetLogs(d);