Raw data search and processing tools for the Flipping Task in the Systems Neuroscience lab at the Champalimaud Foundation, Portugal.
The main process function is
DataIndex, Pokes, Bouts, Streaks = process_dataset(dir::String; mouse_tag = nothing, exp_name = nothing)
Process pokes, bouts and streaks dataframes for all data raw data found in the
directory dir
and stores them in a folder called Results followed by the
current date. Returns a Tuple
with 4 DataFrame
in the following order:
each row contains information about a file: Path, Session, MouseID, Day, Turn
each row contains information about a single poke
A bout is defined as a series of consecutive pokes until either a reward is delivered or if the animal changes side.
A streak is defined as a series of consecutive poke on the same side.
-
mouse_tag
: a string to filter the file to process according to a label. -
exp_name
: if aString
is provided the Results folder will be created in a folder namedexp_name
located in the parent folder ofdir
.
Alternatively the index of raw data to be processed can be created separately
process_dataset(DataIndex::AbstractDataFrame; exp_name = nothing)
see get_DataIndex
The main search function is get_DataIndex
get_DataIndex(dir::String; mouse_tag = nothing)
Read all .csv files in directory dir
and extract informations from the
filename.
It returns a DataFrame with File path, Session, MouseID, Day, Turn.
mouse_tag
: a string to filter the results according to a label.