zhoupc / F-image

Functional image analysis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

F-image

F-image is a package management system used to install and manage software packages written for functional image analysis.

why F-image?

There are many independently developed toolboxes for processing functional imaging data. F-image can automatically install and load the selected packages for specific tasks. It makes reusing functions between packages easier.

Example

fi.install('cnmfe');   # install CNMF-E 
fi.usepkg('cnmfe');    # use CNMF-E functions in your code. 

Goals

  • simplify the steps of installing and using packages of functional image analysis (mainly calcium/voltage imaging for now).

  • community curated list of functional imaging analysis toolboxes.

  • standardize data communications between packages. A customized pipeline for processing data contains multiple steps, and we use F-image to ensure seamless communications.

  • share customized pipelines for processing one type of data. You can just tell what packages to be included and F-image will handle the rest.

  • reduce the effort of developing your packages by reusing other packages. All you need to do for calling functions in other packages is

    fi.install(pkg_name); 
    fi.usepkg(pkg_name); 

Installation

Open MATLAB and set the current working directly to the place you want to install F-image, then run the following command

try
    system('git clone https://github.com/zhoupc/F-image.git'); % with git
catch
    unzip('https://github.com/zhoupc/F-image/archive/master.zip');  % not git installed
    movefile('F-image-master', 'F-image')
end
cd F-image;
fimage_setup; 

How to use

Here we use CNMF-E as an example to show how F-image manages packages.

>> pkg_name = 'cnmfe'; 
  • list all supported packages (currently supported packages)

    >> fi.list_supported(); 
  • install a package

    >> fi.install(pkg_name); 
  • use a package

    >> fi.usepkg(pkg_name); 
  • remove a package

    >> fi.remove(pkg_name);
  • update a package

    >> fi.update(pkg_name);
  • get the package path

    >> pkg_path = fi.locate(pkg_name); 
  • show package information

    >> json_path = fi.pkginfo(pkg_name); 
  • add a new package info

    >> fi.add_pkginfo(pkg_name); 
  • fix errors in the package info

    >> fi.fix_pkginfo(pkg_name, only_fix_missing_values); % only_fix_missing_vlaues (default: true) is a boolean value
  • list all installed packages

    >> fi.list_installed(); 
  • show the path of F-image

    >> fi.home_dir(); 
  • push changes to the github repo

    >> fi.push_github(); 
  • update F-image

    >> fi.selfupdate(); 

Add a new package

You need two steps to add a package to F-image

  1. create a json file pkgname_matlab.json (see template.json) and save it to the folder F-image/pkgname/pkginfo. You can also provide these info in the command window,

    >> fi.add_pkginfo(pkg_name); 

    Here are some example json files.

    The package won't be installed until you run

    >> fi.install(pkg_name) 
  2. configure the way of using the package, which usually simply add the package path to the MATLAB searching paths (default option). If you need some special configurations, modify the file +fi/usepkg.m, where you can find example configurations.

    >> edit fi.usepkg   

Copyright

Pengcheng Zhou @Columbia University, 2019

About

Functional image analysis

License:GNU General Public License v3.0


Languages

Language:MATLAB 100.0%