GithubHelp home page GithubHelp logo

yu-lab-vt / aqua Goto Github PK

View Code? Open in Web Editor NEW
47.0 9.0 14.0 3.02 MB

An event-based tool for analyzing and quantifying calcium or neurotransmitter imaging data

MATLAB 90.92% M 0.11% C++ 8.89% C 0.01% Java 0.07%

aqua's Introduction

AQuA Logo


AQuA (Astrocyte Quantification and Analysis) is a tool to detect signalling events from microscopic time-lapse imaging data of astrocytes or other cell types. The algorithm is data-driven and based on machine learning principles, so, potentially, it can be applied across model organisms, fluorescent indicators, experimental modes, cell types, and imaging resolutions and speeds.

We have developed its improved version, Activity Quantification and Analysis, AQuA2. It can be found here. .

If you have any feedback or issue, you are welcome to either post issue in Issues section or send email to [email protected] (Guoqiang Yu at Virginia Tech).

More about AQuA

From raw data to events

  • In vivo and ex vivo
  • GCaMP, GluSnFr
  • And more

Event detection pipeline of AQuA

Extract features from events

  • Size and location
  • Duration, delta F/F, rising/falling time, decay time constant
  • Propagation direction, speed
  • And more

Feature extraction

Graphical user interface

  • Step by step guide
  • Event viewer
  • Feature visualizer
  • Proofreading and filtering
  • Side by side view
  • Region and landmark tool
  • And more

User interface

Download and installation

MATLAB GUI

  1. Download latest version here.
  2. Unzip the downloaded file.
  3. Start MATLAB.
  4. Switch the current folder to AQuA's folder.
  5. Double click aqua_gui.m, or type aqua_gui in MATLAB command line.

We tested on MATLAB versions later than 2017a. Earlier versions are not supported.

MATLAB Without GUI

Use aqua_cmd.m file

  1. Double click aqua_cmd.m file.
  2. Set the folder path 'p0' and target dataset name 'f0'.
  3. Run the file.
  4. The output files will be saved in a subfolder of 'p0'.

Use aqua_batch.m file

  1. Double click aqua_batch.m file.
  2. Set the folder path 'p0', and for each target dataset, set the parameters in AQuA/cfg/parameters_for_batch.csv. Each dataset is corresponding to one parameter setting.
  3. Run the file.
  4. The output files will be saved in subfolders of 'p0'.

Fiji plugin

  1. Download here.
  2. Put the downloaded Aqua.jar to the plugins folder of Fiji.
  3. Open Fiji.
  4. In the Plugins menu, click Aqua.
  5. Open movie and choose project path in AQuA GUI.

Some browsers may show a warning when downloading the 'jar' file. Please choose 'keep file'.

Note: Our updates are mainly on MATLAB platform, but the latest updates have also been synchronized to the Fiji version. Due to the resolution issue and the implementation (some MATLAB functions cannot be found in Java and implemented by authors), there could be slight differences between the results of Fiji version and MATLAB version. The Fiji version does not save the results in 'res' data structure in 'mat' file. If users want to obtain the results and process them by themselves, the MATLAB version is more recommended.

Getting started

If you are using AQuA for the first time, please read the step by step user guide.

Or you can check the details on output files, extracted features, and parameter settings.

Example datasets

You can try these real data sets in AQuA. These data sets are used in the supplemental of the paper.

Ex-vivo GCaMP dataset

In-vivo GCaMP dataset

GluSnFr dataset

We also provide some synthetic data sets. These are used in the simulation part of the paper.

Synthetic data sets

Reference

Yizhi Wang$, Nicole V. DelRosso$, Trisha V. Vaidyanathan, Michelle K. Cahill, Michael E. Reitman, Silvia Pittolo, Xuelong Mi, Guoqiang Yu#, Kira E. Poskanzer#, Accurate quantification of astrocyte and neurotransmitter fluorescence dynamics for single-cell and population-level physiology, Nature Neuroscience, 2019, https://www.nature.com/articles/s41593-019-0492-2 ($ co-first authors, # co-corresponding authors)

Yizhi Wang, Nicole V. DelRosso, Trisha Vaidyanathan, Michael Reitman, Michelle K. Cahill, Xuelong Mi, Guoqiang Yu, Kira E. Poskanzer, An event-based paradigm for analyzing fluorescent astrocyte activity uncovers novel single-cell and population-level physiology, BioRxiv 504217; doi: https://doi.org/10.1101/504217. [Link to BioRxiv]

Updates

9/28/2023:

This update modifies feature names in the output Excel to eliminate the misunderstanding.

7/10/2023:

This update solves one issue not detected before. In some special cases, two connected distinct signals that have a obviously different rising time difference may be considered as one (super) event. This update is to solve it.

7/04/2023:

The major updates of the AQuA framework have been synchronized to the Fiji version.

3/17/2021:

This update allows AQuA to load data with the format of BIGTIFF.

3/15/2021:

This update makes changes in the reading step. Previous version will report error when the input data is a color image since AQuA can only deal with gray image. This updated version will automatically convert the input color image into gray image to avoid the error.

8/20/2020:

This update makes loading preset step compatible with Matlab 2020b.

5/13/2020:

This update changes the exported table's extension from '.xlsx' to '.csv' to avoid the error when the number of detected events is huge.

5/9/2020:

Some users think the results in first step are all they need. This update allows users to skip step 2,3 and 4 so that the first step can be directly used to extract features.

5/8/2020:

This update changes the estimated noise in step 1. Previous version estimated the noise before smoothing and used it to detect active regions, which created inconsistency since the detection is based on the smoothed data. This updated version estimates the noise after smoothing. With the accurate estimation, users can feel safe to set the intensity threshold as 2 or 3 instead of adjusting this parameter extensively and empirically.

2/5/2020:

The update solves the problem that AQuA cannot detect event in the first frame and end frame.

1/18/2020:

Add 'Save waves' button in favorite list part. Users could export the waves data of selected events as '.csv' files.

1/17/2020:

Add area under the curve feature for each event. Users could find them in 'fts.curve' structure. Update the step by step user guide and details on output files, extracted features, and parameter settings.

1/16/2020:

The update adds the features of favorited events into the '.mat' result.

12/20/2019:

Add new functin for cell regions and landmark reigons. The button "->" in the top-left corner of the GUI can let users to drag regions.

12/19/2019:

Solve the issue that the detected events are forced to merge in "aqua_cmd.m" and "aqua_cmd_batch.m".

12/18/2019:

The update fixes one bug existing in 'fix_events'.

12/3/2019:

The update fixes one bug. Now each time "Update features" in GUI is clicked , the proof reading table will be updated.

11/25/2019:

The update changes the GUI panel. Now users could select whether to output feature table or not.

11/22/2019:

The update saves the use of memory, while the results will not change.

10/30/2019:

The update adds the random seed and makes the random variables controllable. Now with same parameter setting, AQuA will give same results. (Due to the randomness, the results will have a little difference before.)

10/19/2019:

Repair the bug in Fiji version that 'minimum correlation' in merging step cannot be set to float data.

10/17/2019:

  1. The update avoids the error report when nothing is detected for aqua_batch.m.

  2. Allow aqua_batch.m to read a batch of cell boundaries and landmarks.

10/16/2019:

The update adds the new script aqua_batch.m which can let users deal with multiple files. MATLAB Without GUI shows how to use it.

aqua's People

Contributors

freemanwyz avatar xuelongmi avatar yu-lab-vt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aqua's Issues

How is res.dffMatFilter calculated?

Hi XuelongMi, I would like to learn more about res.dffMatFilter. For example, how is the df/f curve of calcium events calculated? Is it the average fluorescence value on all regions of the calcium event in each frame? Or can you tell me the relevant functions and file location used for calculating the res.dffMatFilter parameter? This way, I can learn more details.

Questions on the threshold determination for region mask

Hi,

Thank you for sharing this useful toolbox :)
In the "Mask builder" function, when pressing "self" button to generate a region mask, how is the threshold automatically determined? Since the "intensity threshold" can only be ajusted by a scroll bar, I cannot set exactly the same threshold value for videos recorded from different exprimental days. It's also impossible to use only one region mask for all the videos as their FOVs could be slightly different (very similar though). But if I do not use any region mask, the extraction time would be too long. So I just want to make sure if using the automatically determined threshold is appropriate for unified analysis on data captured from long-term imaging. Thanks!

Index error occurring with big file sizes (>4GB)

Hi,

thanks a lot for providing this tools. It has been fantastic to work with so far, but I am running into problems when trying to process bigger file sizes. The file I am working with is ca. 7GB big and includes 2500 frames at 1200x12000 pixels. Seconds to minutes into the "reading" step of the 'aqua_cmd.m', I am getting the following errors:

Index exceeds the number of array elements (2).

Error in ui.over.getOv (line 18)
T = sz(3);

Error in fea.gatherRes (line 30)
ov0 = ui.over.getOv([],evt,size(dRecon),dRecon);

Error in aqua_cmd (line 201)
res = fea.gatherRes(datOrg,opts,evtLstE,ftsLstE,dffMatE,dMatE,riseLstE,datRE);

Initially, I thought it the crash occurred due to a high number of frames but playing around with cropping & fewer frames, points towards an upper file size limit which is somewhere between 4 and 4.2GB. For example, 1500 frames at 1200x1200 (4.22GB) crashes, while 1500 frames at 1176x1180 (4.07GB) works. So does 1300 frames at 1200x1200 (3.66GB).

The issue is not related to insufficient RAM, since the code seems to crash before the file is actually being loaded. Just out of curiosity, I also tried to process the files with the GUI, in which case the GUI seems to load the file but can only access the very first frame.

I am not very familiar with Matlab, so I apologize in advance if this is an obvious mistake on my part. Hope there is an easy fix for this, since I would love to use the tool and am bit hesitant to split my files into smaller stacks that can be processed separately.

Thanks again!

batch is not working as parameters_for_batch set

I want to use aqua_cmd_batch.m to analyze multi files, so I test it by one tif file. I set the parameter in parameter_for_batch.csv, and all my settings for 'skip steps 2 and 3' are 1, which should mean the analyze will skip detecting super volxis, but I saw my Matlab is still running these steps. I also try to change the name from File1 to my filename, but it doesn't make any changes. I have attached my parameters_for_batch.csv
parameters_for_batch.csv

parallel computing question

I noticed that one of your recommended matlab toolboxes is the parallel computing toolbox. I have the toolbox but it doesn't seem like the program is utilizing said toolbox. Does something have to be done beforehand to utilize the parallel computing toolbox?

Is it one-photon imaging friendly?

Hi, I just tried 1p imaging analysis, but found that signal detecting was not so correct no matter what parameter that I tried. So I wanna know that did you tried an 1p imaging data analysis?

Export/Save in Fiji returns SER files instead of a MATLAB file

Hi,

I have installed AQuA as a Fiji plugins on windows 10 and tried to run it on example data following the user guides in the Getting started section of the front page. I'm confused about a few things:

  1. The 'save' and 'load' buttons don't appear next to 'cell boundaries' and 'landmarks':
    screenshot_1

  2. The 'Pan' and 'Zoom' buttons are merged into one 'PanAndZoom' button and left/right click on the movie doesn't do anything to zoom in or out.

  3. When I select 'RisingMap' in the dropdown menu in the 'SidebySide' mode, the movie looks just like what I get by selecting 'Raw':
    screenshot_3

  4. When I click 'Export/Save' I get a bunch of SER files that I can't figure how to read (I'd like to work on it in Python) instead of a MATLAB file as described in the pdf about details on output files, etc.
    screenshot_2

Is all this expected on Fiji ? Do you know how I can get around it ?
Thanks in advance for helping.

Merging events: min correlation between 0 and 1 not accepted

First of all, thank you for this fantastic tool. I am using the FIJI release, and it works very well with calcium imaging data in retinal glia. However, when I try to change the minimum correlation under the "Merge" tab to something that is not 0 or 1 (eg. 0.7), I get the following Java exception and the merge step does not run. When I either ignore merging or input a value of 0 or 1 into the min correlation box, the Merge step runs fine.
Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: ".5" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:569) at java.lang.Integer.parseInt(Integer.java:615) at va.vt.cbil.LeftGroupPanel$15.actionPerformed(LeftGroupPanel.java:1212) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6535) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6300) at java.awt.Container.processEvent(Container.java:2236) at java.awt.Component.dispatchEventImpl(Component.java:4891) at java.awt.Container.dispatchEventImpl(Container.java:2294) at java.awt.Component.dispatchEvent(Component.java:4713) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466) at java.awt.Container.dispatchEventImpl(Container.java:2280) at java.awt.Window.dispatchEventImpl(Window.java:2750) at java.awt.Component.dispatchEvent(Component.java:4713) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Frame rate and spatial resolution of the processed image are getting overwritten by loading of existing settings

When loading Opts file of the previous analysis, the specific parameters to image are getting overwritten. So, for example, if you used different zoom or acquisition frequency for obtaining an image, you can no longer use the Opts file from previous experiment because it will overwrite spatialRes and frameRate parameters without you knowing that. The problem is that you don't see that these parameters change, because you type them in the "Load data" window and then you open the main window, and you think that Opts you load will be related only to the event detection parameters. This issue can lead to the incorrect analysis of propagation in case of even slight change of experimental design. I think it should be either fixed or explicitly explained in the manual that you can't import the opts if you used a different frame rate or spatial resolution. Here is the possible fix #18

The naming of some parameters is prone to misunderstanding

Spatial density is defined as the number of events that occur simultaneously with the current event (a subset in terms of time), with code in line 81~87 of the function “getEvtNetworkFeatures”
% occur at same time tLen0 = tLen(t0:t1); tIdx0 = tIdx(t0:t1); [x,ix] = max(tLen0); tIdx0 = tIdx0{ix}; nOccurSameTime(ii) = x; occurSameTimeList{ii} = tIdx0;
This seems to be more appropriately defined as "Temporal density." Alternatively, defining it as (the number of events in the same time period / (t1-t0)) seems feasible, but the "/ (t1-t0)" part is missing.
The parameters "Temporal density" and "Temporal density with similar size only" also appear to have the same issue in my view.

In addition, "Propagation onset one direction Antrior/Posterior/Left/Right" is defined as the maximum increment in all adjacent frames, with code in line 148~155 of the function "getPropagationCentroidQuad"
`
prop = nan(size(sigDist));
prop(2:end,:,:) = sigDist(2:end,:,:) - sigDist(1:end-1,:,:);

propGrowMultiThr = prop;
propGrowMultiThr(propGrowMultiThr<0) = nan;
propGrow = nanmax(propGrowMultiThr,[],3);
propGrow(isnan(propGrow)) = 0;
propGrowOverall = nansum(propGrow,1);
`

that is, the maximum speed at which the center of mass of the calcium event moves in a certain direction, rather than distance.
The name of this parameter can be easily misunderstood as the distance of movement.

In the third step, the event is extracted. The program cannot continue to run, but no error will be reported

Hello developers of AQUA, thank you very much for developing such a convenient calcium event analysis tool. I am a PhD in biomedical engineering, focusing on the specific analysis of calcium events in astrocytes.

I have recently been using AQUA to analyze calcium events, but I have encountered some problems. First of all, let me talk about my environment. For stability, I am using matlab2018a version (versions above 2020 will have problems when drawing ROI), window10 system (matlab on Linux system cannot run AQUA), memory 128Gb. Before analyzing the astrocyte tif file, I will use Deepcad tool to complete the image denoising, and then use NoRMCorre to complete the motion correction.

According to my experience, Aqua can complete a full task in about 4 hours of normal operation on my computer. However, many times the AQUA run stops at step 3, where the event is extracted. Neither an error is reported nor continues to run. At the same time, the data in the memory is not released

When the prompt "The maximum variable value allowed by the program was exceeded." appeared, I modified the code in "spgtw.m" and inserted the following command on line 40 to ensure the normal operation of the program. Because thrMax occasionally returns inf, which causes the command "thrVec = 0:thrMax;" to run incorrectly.

if isinf(thrMax)
dFip = fillmissing(dFip,'nearest');
s00 = s00 + 1;
thrMax = ceil(quantile(dFip(:),0.999)/s00);
fprintf('thrMax = %d\n',thrMax)
end

But when I don't modify s00 (that is, snrThr is inf), the program has the same problem as I mentioned, and AQUA neither continues to run nor reports an error.

I can't locate what is wrong now, please help!

image

About 3D AQuA

Detecting events in 3D data using AQuA is mentioned in the Discussion section of the paper and in Supplementary Figure 12, and performs well. How can I repeat this process using aqua code, processing 3D data?
image

About 'res.dF' and 'res.dffMatFav'

dear Dr.Yu , Dr.Wang
I am Yue Chen from Miao Jing Lab, Chinese institute for Brain Research, Beijing. Thank you very much for sharing the AQuA program which is very important for our experiment data analyzing. But we have some questions when we are using, We appreciate that if you could answer these questions ASAP.

  1. Is res.dF A three-dimensional matrix of ΔF/F0 for the entire image sequence.
  2. We found it have similar waveform but showed different ΔF/F0 curve in res.dffMatFav(:,:,1) (curve is higher) and averaged res.dF in res.ftsFav.loc.x2D (curve is lower) formed 3D cylinder formed. So, how to derive from res.dF to res.dffMatFav(:,:,1)?

Looking forward your apply!
Thanks a lot
Yue 20210929

Dr. Yu ,Dr. Wang 您好,
我是北京脑科学与类脑研究中心井淼实验室的陈阅,非常感谢您分享的AQuA程序,对我们的实验起到了非常重要的帮助。在使用过程中出现了一些问题希望得您到回复!
1.res.dF是否是对于整个图片序列的ΔF/F0的三维矩阵。
2.我们使用res.dFres.ftsFav.loc.x2D 时间轴上扩展形成的三维柱体内的平均值作为ΔF/F0的值和res.dffMatFav(:,:,1)在波形上相似但是ΔF/F0数值上却有较大偏差,请问res.dffMatFav(:,:,1)是res.dF通过什么方式计算得出的呢?

期待您的回复
非常感谢
陈阅 20210929

% calculation method
image
res.dF to ΔF/F0 matrix in ROIs

for i=1:length(res.ftsFav.loc.x2D)
ROI2D=zeros(502,502); %data size 502,502,2000
ROI2D(res.ftsFav.loc.x2D{1,i})=1;
ROI3D=double(res.dF).*ROI2D;
Mat(i,:)=sum(sum(ROI3D))./length(res.ftsFav.loc.x2D{1,i});
end

aqua_gui calls startup which (dangerously) adds all folders in the parent directory to the path

This is what my path looks like after starting aqua_gui:

/Users/srinivas/GoogleDrive/code/AQuA
	/Users/srinivas/GoogleDrive/code/AQuA/.git
	/Users/srinivas/GoogleDrive/code/AQuA/.git/hooks
	/Users/srinivas/GoogleDrive/code/AQuA/.git/info
	/Users/srinivas/GoogleDrive/code/AQuA/.git/logs
	/Users/srinivas/GoogleDrive/code/AQuA/.git/logs/refs
	/Users/srinivas/GoogleDrive/code/AQuA/.git/logs/refs/heads
	/Users/srinivas/GoogleDrive/code/AQuA/.git/logs/refs/remotes
	/Users/srinivas/GoogleDrive/code/AQuA/.git/logs/refs/remotes/origin
	/Users/srinivas/GoogleDrive/code/AQuA/.git/objects
	/Users/srinivas/GoogleDrive/code/AQuA/.git/objects/info
	/Users/srinivas/GoogleDrive/code/AQuA/.git/objects/pack
	/Users/srinivas/GoogleDrive/code/AQuA/.git/refs
	/Users/srinivas/GoogleDrive/code/AQuA/.git/refs/heads
	/Users/srinivas/GoogleDrive/code/AQuA/.git/refs/remotes
	/Users/srinivas/GoogleDrive/code/AQuA/.git/refs/remotes/origin
	/Users/srinivas/GoogleDrive/code/AQuA/.git/refs/tags

All the .git folders in the path are dangerous because the function that will be called is indeterminate (based on whatever matlab finds first).

Solution: only add what you need (/src) etc

export color overlay only

Hi, is there a way to export the movie of events only, without the underlying raw movie? i.e. export the color-coded events on a black background.

Why grow_seed(dF, dF, ...) instead of grow_seed(dat, dF...)?

Hi! I refer to this line:

[resCell,lblMap] = burst.growSeed(dF,dF,resCell,lblMap,lmLoc,lmAll,opts1,pp);

The function grow_seed is always called by passing two times dF, while from the naming of the arguments it seems like the first one should be dat (the non-shifted data). Is this a typo, or is there a reason for that?

Thank you for your amazing work!

Bests,
Lorenzo

Problem with nanmax() function in Matlab

First, thanks a lot for this interesting and well-documented toolbox!

I was just trying out the Matlab version and noticed a minor problem: When hitting the "Extract" button, an error occurs in the function getPropagationCentroidQuad(). The culprit was the nanmax() function.

By replacing e.g.

[~,id] = nanmax(pixNumChangeRateMultiThrAbs,[],2);

simply with

[~,id] = nanmax(pixNumChangeRateMultiThrAbs,2);,

(and similar replacements of other occurrences of the nanmax function) the problem could be solved. This was the case for the MATLAB R2020b version, and it might be a bug of this Matlab version, because the original code is fine according to the official Matlab documentation. I just wanted to mention this issue here so that others who run in this very same problem will know what to do.

Best,
Peter

iglusnfr imaging data analysis: sigma issue

Thank you so much for creating such a wonderful analysis toolbox. I am working on iglusnfr imaging, and when creating a project, I use the preset GluSnFR_astrocytic_neuronal. However, I encounter the following error during the initial detection process:


An error occurred during use: imgaussfilt
Sigma must be positive.

Error occurred in: imgaussfilt>validateSigma (line 453)
validateattributes(sigma, {'numeric'}, {'real','nonsparse','positive','finite','nonempty'}, mfilename, 'Sigma');

Error occurred in: imgaussfilt>parseInputs (line 417)
options.Sigma = validateSigma(varargin{2});

Error occurred in: imgaussfilt (line 121)
[A, options] = parseInputs(args{:});

Error occurred in: burst.getARSim (line 17)
dSim = imgaussfilt(dSim,[smo0 smo0]);

Error occurred in: burst.actTop (line 71)
[arLst,dActVox] = burst.getARSim(datOrg,opts,evtSpatialMask,opts.smoXY,opts.thrARScl,opts.minSize);

Error occurred in: ui.detect.actRun (line 42)
[dat,dF,arLst,lmLoc,opts] = burst.actTop(datOrg,opts,evtSpatialMask,ff);

Error occurred in: ui.detect.flow (line 52)
ui.detect.actRun([],[],f);

An error occurred while executing UIControl Callback.

Could you possibly ponder why this is happening? My guess is that the part where a smoothing value is input during the detection stage is something I can adjust, but I can't figure out the reason at all. I would love to be able to cite your paper in my research. Once again, I express my admiration for your fantastic development. Thank you.

The naming of some parameters in table is prone to misunderstanding

Spatial density is defined as the number of events that occur simultaneously with the current event (a subset in terms of time), with code in line 81~87 of the function “getEvtNetworkFeatures”
% occur at same time tLen0 = tLen(t0:t1); tIdx0 = tIdx(t0:t1); [x,ix] = max(tLen0); tIdx0 = tIdx0{ix}; nOccurSameTime(ii) = x; occurSameTimeList{ii} = tIdx0;
This seems to be more appropriately defined as "Temporal density." Alternatively, defining it as (the number of events in the same time period / (t1-t0)) seems feasible, but the "/ (t1-t0)" part is missing.
The parameters "Temporal density" and "Temporal density with similar size only" also appear to have the same issue in my view.

In addition, "Propagation onset one direction Antrior/Posterior/Left/Right" is defined as the maximum increment in all adjacent frames, with code in line 148~155 of the function "getPropagationCentroidQuad"
`
prop = nan(size(sigDist));
prop(2:end,:,:) = sigDist(2:end,:,:) - sigDist(1:end-1,:,:);

propGrowMultiThr = prop;
propGrowMultiThr(propGrowMultiThr<0) = nan;
propGrow = nanmax(propGrowMultiThr,[],3);
propGrow(isnan(propGrow)) = 0;
propGrowOverall = nansum(propGrow,1);
`

that is, the maximum speed at which the center of mass of the calcium event moves in a certain direction, rather than distance.
The name of this parameter can be easily misunderstood as the distance of movement.

custom LUT scale in Feature Overlay

When visualizing feature overlay (I am actually interested in Spatial and Temporal Density), the choice of feature value range is limited to min and max of the current movie. What if I want to obtain an image to be compared with another movie, in which min and max are different? Is there any way to impose a custom minimum and maximum (just for visualization purposes) independently from the "auto" range?
Thank you in advance
Micaela

Super events and events all

Thanks for your contribution to the code!
Can you explain the difference between events all and super events generated in step3? Which parameters are considered while a super event or an event is defined?

Data for step 4(clean events)

I have a question that what kind of data is used for step 4. For example, when I just finish all the 7 steps and return to step 4, it cleans events based on the events it detects now or events from step3

Could you further explain how do you calculate propagation distance (growing & shrinking)?

Thanks for the useful tool! Regarding single event propagation, I have the following question:

  1. How is distance calculated?
    Initially, from 1.3.3 example in your documentation, I thought it is the difference between centroids in frame i and frame i-1, in each direction. But that cannot capture the change when the centroid is the same but the event grows. Then I saw in the result that all 4 directions could have a positive value, and realized my previous understanding might be wrong. So how is the distance calculated?

  2. What is your growing & shrinking distance?
    I understand your definition of growing and shrinking. But how come propagation.propGrow and propagation.propShrink seems different for the same event, same frame, same direction? Are they the change of centroid of growing and shrinking pixels respectively?

Get different result in MATLAB AQuA and FIJI AQuA

Thank you for this great work!
I find out I will get different results in MATLAB and FIJI, the dF/F detected in MATLAB is unusually small.

Both AQuA is the newest version in MATLAB R2021b and FIJI, I chose the first option and set 0.33 sec per frame, 5 intensity threshold scaling factor. All the other parameters are default. I ran all the steps but ignore delay Tau. In MATLAB it detects 970 ROA, the dF/F range from 2.7519e-0.5 to 0.0045, while in FIJI it detects 463 ROA, dF/F range from 0.057 to 0.639. I find out MATLAB will show an error when I run AQuA GUI, but everything still works fine.

MATLAB result
FIJI result
Error in MATLAB

I attach my test file here:
https://drive.google.com/file/d/1Gy_g7mBvYVIX6ftrL8TSXgV3Sa4ANVa9/view?usp=sharing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.