Skip to content

*Common issues and fixes

Biafra Ahanonu edited this page Feb 13, 2019 · 13 revisions

Common issues and fixes

Page outlines some common issues and fixes to them that may be encountered while using calciumImagingAnalysis. These are mostly due to quirks specific to MATLAB, Fiji, or the computing environment calciumImagingAnalysis is used on.

PCA-ICA, CNMF-E, or other cell extraction algorithm's don't produce sensible output.

  • When running modelPreprocessMovie a dialog box appears showing the available analysis steps. Certain combinations of these steps make sense while others should be avoided.
  • For example, normally users want turboreg->crop->dfof->downsampleTime.
  • An invalid input would be turboreg->crop->dfof->dfstd->downsampleTime. Since calculating the dF/F then dF/std is problematic.
  • For two photon data, it is sometimes desired to have medianFilter->turboreg->crop->dfstd (or dfof)->downsampleTime.
  • In general, fft_highpass and fft_lowpass should be avoided since they are meant to be run on stand-alone movies for specific purposes rather than included in the general pipeline.

image

  • Remember at the options screen (see below) to select a spatial filtering there under the option filterBeforeRegister instead of selecting the spatialFilter option before the turboreg option in the analysis steps screen.

image

Out of memory using Miji

  • If you get a java.lang.OutOfMemoryError: GC overhead limit exceeded style error (see below) when trying to open a movie with Miji, make sure that you initialize MATLAB in the calciumImagingAnalysis path or place the java.opts file in your MATLAB start-up folder.
  • This increases the amount of memory allocated so that Java doesn't run out when using Miji to load movies.
java.lang.OutOfMemoryError: GC overhead limit exceeded
	at java.lang.AbstractStringBuilder.<init>(Unknown Source)
	at java.lang.StringBuilder.<init>(Unknown Source)

Selecting scripts folder in Fiji.app on Mac OS X

Navigate to the applications folder and select Fiji.app and Show Package Contents. screen shot 2019-02-12 at 6 46 45 pm

Then navigate to /Fiji.app/scripts and select Miji.m then Get Info. Select and copy the path as below. screen shot 2019-02-12 at 6 49 11 pm

When Matlab ask for the Fiji path, press command + shift + G in the dialog box to enter the full path manually, press enter, then select open. screen shot 2019-02-12 at 6 52 42 pm

Fiji won't start using Miji or MIJ.start

  • If calling Miji or MIJ.start does not lead to a Fiji GUI appearing (e.g. the below output is seen in the command window), this is likely because the last Fiji/ImageJ instance was closed improperly (e.g. by closing ImageJ with File->Quit or pressing the close button instead of MIJ.exit in the Matlab command window), leading to a headless Fiji that cannot be properly closed by Miji/Matlab.
--------------------------------------------------------------
Status> ImageJ is already started.
--------------------------------------------------------------

If this occurs, run the following commands one at a time:

resetMiji
% An instance of Miji should appear.
currP=pwd;Miji;cd(currP);
MIJ.exit

downloadCnmfGithubRepositories.m not downloading correctly

  • If when trying to download using downloadCnmfGithubRepositories.m the below error is encountered, try to run downloadCnmfGithubRepositories several more times as websave (MATLAB built-in function) sometimes momentarily does not obtain the correct write permissions and fails.
@@@@@@@
Error using websave (line 104)
Unable to open output file: 'signal_extraction\cnmfe.zip' for writing. Common reasons include that the file exists and does not have write permission or the folder does not have write permissions.

modelPreprocessMovie analysis options list not showing

  • MATLAB changed uitables internal implementation, hence findjobj (File Exchange function) broke causing reorderableListbox (File Exchange function) to also break. An updated findjobj has been added to the calciumImagingAnalysis repository and this error (see below) should no longer occur.
Error in reorderableListbox (line 127)
jScrollPane = jScrollPane(1);

Miji not loading correctly

  • The below error occurs when the wrong version of Fiji is downloaded. Please 2015 December 22 version download from https://imagej.net/Fiji/Downloads as that implementation of Miji.m appears to work correctly with MATLAB.
@@@@@@@
Error using javaObject
No class MIJ can be located on the Java class path

viewMovie or other functions where movies need to be loaded end without executing

  • It is likely that the regular expression given to calciumImagingAnalysis does not match any of the files in the folder being analyzed.
  • For example, in viewMovie, the below Image movie regexp setting should be changed to concat correspond to the demo raw imaging data's name.

image

Contrast is low on cell transient ΔF/F movies using computeManualSortSignals

  • The contrast (e.g. min/max) are estimated automatically from movie data, but will not always be the optimal display for manual human sorting of data. To improve the contrast, press q while in the interface and adjust the min/max values until you are in a satisfactory range. See below.

Default contrast:

image

Contrast after user editing:

image

Traces in computeManualSortSignals GUI are flat.

  • Likely this is due to one of the traces having values that are very high, throwing off the estimate used set the y-axis in the GUI (which is constant across all candidate cells). This can be changed by pressing w, see below.

Can't see transients.

image

Change the min/max.

image

Can now see transients.

image

Blank frames or entire frames have baseline shifted after motion correction in modelPreprocessMovie

  • This normally occurs when transfturboreg is selected as the registrationFxn, in some Windows editions and OSX versions this leads to random baseline shifts. If this occurs change registrationFxn to imtransform. See below (green selected option).

image

File or folder dialog box with no instructions

  • This is mainly on OS X, where in some versions the dialog boxes are not styled with title bars (see below). This is outside of MATLAB's control. If this occurs, check the command window as the instructions should also be provided there (e.g. with Dialog box: [TITLE] style text).

image