Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugs in exp.separate #146

Open
Hanbing1999 opened this issue Jul 13, 2020 · 3 comments
Open

Bugs in exp.separate #146

Hanbing1999 opened this issue Jul 13, 2020 · 3 comments

Comments

@Hanbing1999
Copy link

Hanbing1999 commented Jul 13, 2020

Hi everyone! I'm using using FISSA with CNMF from MATLAB. At first, I tested the example data (within fissa_master), and all steps are correct. But when I using my own data, exp.seprate(redo_prep = True) reports ValueError: A LinearRing must have at least 3 coordinate tuples. And details are provided in the following figures. Since I'm totally new to Python, I'm not sure how to deal with it.

image
image
image

Thanks for your time!

@swkeemink
Copy link
Member

It appears that there is something about the cNMF detected ROIs that is no compatible with FISSA. Can you give some details about how you run cNMF, what data you extract, and how you plug them into FISSA?

@Hanbing1999
Copy link
Author

It appears that there is something about the cNMF detected ROIs that is no compatible with FISSA. Can you give some details about how you run cNMF, what data you extract, and how you plug them into FISSA?

Hi, I use run_pipeline.m to analyze a series of motion-corrected tif files and save the results as a struct.

dat.Coor = Coor;
dat.A = A_keep;
F_df = num2cell(F_dff,2);% 2 cut through lines ; while 1 represents cut through rows 
dat.F_df = F_df;
save('D:\project\data\SM75-D1-Cre_test2\20190506\CNMF\sequence\cNMFdata.mat','dat')

image
Then I load FISSA and holoviews, and load the data:

cNMFdata = loadmat('D://project//data//SM75-D1-Cre_test2//20190506//CNMF//sequence//cNMFdata.mat')['dat']
F_df = cNMFdata['F_df'][0, 0]
Coor = cNMFdata['Coor'][0, 0]

And actually, I can plot the lines surrounding each of the ROIs.
image

@swkeemink
Copy link
Member

From the plotting of the regions of interest it looks like the algorithm found a lot of extremely small ROIs, which might only consist of two coordinates. cNMF might have some setting to get rid of some of these, or you can try to do that by hand.

You could also check that by seeing the length of each Coor[i, 0].

Which version of cNMF are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants