Skip to content

jackie623/jayaraman-importer

 
 

Repository files navigation

Jayaraman lab's importer code for Ovation

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:

  • insertXSGEpoch and appendXSG which insert a new ovation.Epoch for an XSG file or append an XSG file to an existing ovation.Epoch respectively
  • appendScanImageTiff which appends a ScanImage TIFF's data to an existing ovation.Epoch
  • appendSeq which appends a .seq data file to an existing ovation.Epoch

Documentation of the specification for each import module is available on the project wiki.

Coordinating method(s) to import an entire experiment's data have not been written yet.

Basic Usage

To use the importer:

  1. Add the src/ directory to the Matlab path

  2. Add the yamlmatlab/ directory to the Matlab path

  3. Choose an Ovation Experiment object to insert data into. To create a Project and Experiment:

    >> import ovation.*
    >> context = NewDataContext(<path_to_connection_file>, <username>);
    >> project = context.insertProject(<project name>, <project purpose>, <project start date>);
    >> experiment = project.insertExperiment(<expt purpose>, <expt start date>);
    
  4. Insert an EpochGroup, replacing <label> with the desired EpochGroup label and the arguments to datetime with the start time and date of the EpochGroup (see help ovation.datetime):

    >> epochGroup = experiment.insertEpochGroup(<label>, datetime(...));
    
  5. Insert an Epoch:

    >> epoch = insertXSGEpoch(epochGroup,...
                        xsgPath,...     % path to XSG file
                        protocolID,...  % protocolID, e.g. 'org.hhmi.janelia.jayaraman.<my protocol name>'
                        timezone)       % timezone string (e.g. 'America/New_York')
    
  6. Append ScanImage data:

    >> appendScanImageTiff(epoch, tifFilePath)
    
  7. Append Seq data:

    >> appendSeq(epoch,...
                   seqFile,...              % Path to .seq file
                   yamlFile,...             % Path to YAML metadata file
                   timeZone)                % timezone string (e.g. 'America/New_York')
    

Automated tests

To run the automated test suite:

  1. Add the jayaraman-importer/src folder to the Matlab path

  2. Add the yamlmatlab folder to the Matlab path

  3. Add yamlmatlab/external/snakeyaml-1.9.jar to your java classpath via javaaddpath

  4. Add Matlab xUnit (jayaraman-importer/matlab-xunit-doctest/xunit) to the Matlab path

  5. From within the jayaraman-importer/ directory:

    >> runtestsuite test
    
[1]Matlab is a registered trademark of The Mathworks, Inc..

About

Jayaraman Lab Data Import

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • MATLAB 91.0%
  • Objective-C 9.0%