This project contains Matlab [1] code for importing data for Vivek Jayaraman's lab into the Ovation Scientific Data Management System.
The importer is modularized into individual Matlab functions that import components of the Jayaraman data:
insertFlyArenaEpochwhich inserts a newovation.Epochcorresponding to single trial in the fly arenaappendTreadmillwhich appends Treadmill data to an existingovation.EpochappendXSGwhich appends an Ephus XSG file to an existingovation.EpochappendScanImageTiffwhich appends a ScanImage TIFF's data to an existingovation.EpochappendSeqwhich appends a .seq data file to an existingovation.Epoch
Documentation of the specification for each import module is available on the project wiki.
The top-level ImportJayaramanTrials function calls the individual modules to import appropriate data for a number of trials. Trial information (including necessary metadata and paths to the relevant data files) is provided as a Matlab struct per trial. See https://github.com/physion/jayaraman-importer/wiki for a description of the trial structure.
To use the importer:
Add the Importer
src/directory to the Matlab pathChoose an Ovation
Experimentobject to insert data into. To create aProjectandExperiment:>> import ovation.* >> context = NewDataContext(<path_to_connection_file>, <username>); >> project = ovation.projectForInsertion(context, <project name>, (<project start date>), (<project purpose>)); >> experiment = ovation.experimentForInsertion(project, <year>, <month>, <day> <timezone>, (<expt purpose>), (<hr>, <min>, <sec>));
Insert one or more
EpochGroupobjects, replacing<label>with the desiredEpochGrouplabel and the arguments todatetimewith the start time and date of theEpochGroup(seehelp ovation.datetime):>> epochGroup = experiment.insertEpochGroup(<label>, datetime(...));
Create a Matlab structure array of trial structures (see https://github.com/physion/jayaraman-importer/wiki) and import the corresponding trial data:
>> for i = 1:ntrials % fill in trials(i) structure end >> InsertJayaramanTrials(epochGroup, trials);
To run the automated test suite:
Add the
jayaraman-importer/srcfolder to the Matlab pathAdd the
jayaraman-importer/testfolder to the Matlab pathAdd Matlab xUnit (
jayaraman-importer/matlab-xunit-doctest/xunit) to the Matlab pathFrom within the
jayaraman-importer/directory:>> runtestsuite test
Please see license.txt for bundled project licenses
Copyright (c) 2012, Physion Consulting LLC All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
| [1] | Matlab is a registered trademark of The Mathworks, Inc.. |