help > dNBS error when replicating an NBS analysis
Showing 1-6 of 6 posts
Jun 4, 2021 05:06 PM | Kim Ray - UC Davis
dNBS error when replicating an NBS analysis
Dear NBS and dNBS developers,
I am excited about the new features in the dNBS toolbox. I really like the new results outputs in the dNBS, and am trying to replicate some analyses I ran using the NBS, but I keep running into the same error when using the dNBS:
Undefined function or variable 'C'.
Error in NBSdirected (line 129)
DIMS.nodes=size(C,2);
Error in dNBSrun (line 322)
catch; [nbs.NBS.n,nbs.NBS.con_mat,nbs.NBS.pval]=NBSdirected(nbs.STATS,-1,nbs.GLM,nbs.NBS); end
Error in dNBS>get_ui (line 178)
dNBSrun(UI,S);
Error while evaluating UIControl Callback
Can you help diagnose where my error is coming from?
The example dataset in the dNBS runs without error. Ive looked at the dNBS example and compared it to mine, the few differences I've noticed between the dNBS example and my data is that I organized my functional connectivity matrices into a single .mat file (node x node x subject), and my node coordinates are not integers (e.g. -38.1, 48.8, 10.5). All other files I call are .mat as well (design matrix, connectivity matrices, node coordinates, node labels). Im also using ABCD data preprocessed by the Dcanlab, so the diagonal in my connectivity mats are all 7.2543 instead of the traditional 1.
My data has run successfully using the NBS1.2 across multiple t-thresholds - just isn't running in the dNBS.
Im using Matlab version R2016b.
Thanks!
Kim
I am excited about the new features in the dNBS toolbox. I really like the new results outputs in the dNBS, and am trying to replicate some analyses I ran using the NBS, but I keep running into the same error when using the dNBS:
Undefined function or variable 'C'.
Error in NBSdirected (line 129)
DIMS.nodes=size(C,2);
Error in dNBSrun (line 322)
catch; [nbs.NBS.n,nbs.NBS.con_mat,nbs.NBS.pval]=NBSdirected(nbs.STATS,-1,nbs.GLM,nbs.NBS); end
Error in dNBS>get_ui (line 178)
dNBSrun(UI,S);
Error while evaluating UIControl Callback
Can you help diagnose where my error is coming from?
The example dataset in the dNBS runs without error. Ive looked at the dNBS example and compared it to mine, the few differences I've noticed between the dNBS example and my data is that I organized my functional connectivity matrices into a single .mat file (node x node x subject), and my node coordinates are not integers (e.g. -38.1, 48.8, 10.5). All other files I call are .mat as well (design matrix, connectivity matrices, node coordinates, node labels). Im also using ABCD data preprocessed by the Dcanlab, so the diagonal in my connectivity mats are all 7.2543 instead of the traditional 1.
My data has run successfully using the NBS1.2 across multiple t-thresholds - just isn't running in the dNBS.
Im using Matlab version R2016b.
Thanks!
Kim
Jun 4, 2021 11:06 PM | Andrew Zalesky
RE: dNBS error when replicating an NBS analysis
Hi Kim,
I forwarded your query to Max, the developer of dNBS. Hopefully Max can provide some insight.
My suggestion it to reformat your data so that it exactly matches the format of the example data in dNBS. For example, it may be that not having a one on the diagonal causes issues.
The error seems to be related to the dimensions of your matrix. You may want to check that the node coordinates file is of dimensions that match the connectivity matrix. A blank line in a text file can sometimes be interpreted as an extra row (i.e. extra node).
Non-integer coordinates should not be an issue.
Best wishes,
Andrew
Originally posted by Kim Ray:
I forwarded your query to Max, the developer of dNBS. Hopefully Max can provide some insight.
My suggestion it to reformat your data so that it exactly matches the format of the example data in dNBS. For example, it may be that not having a one on the diagonal causes issues.
The error seems to be related to the dimensions of your matrix. You may want to check that the node coordinates file is of dimensions that match the connectivity matrix. A blank line in a text file can sometimes be interpreted as an extra row (i.e. extra node).
Non-integer coordinates should not be an issue.
Best wishes,
Andrew
Originally posted by Kim Ray:
Dear NBS and dNBS developers,
I am excited about the new features in the dNBS toolbox. I really like the new results outputs in the dNBS, and am trying to replicate some analyses I ran using the NBS, but I keep running into the same error when using the dNBS:
Undefined function or variable 'C'.
Error in NBSdirected (line 129)
DIMS.nodes=size(C,2);
Error in dNBSrun (line 322)
catch; [nbs.NBS.n,nbs.NBS.con_mat,nbs.NBS.pval]=NBSdirected(nbs.STATS,-1,nbs.GLM,nbs.NBS); end
Error in dNBS>get_ui (line 178)
dNBSrun(UI,S);
Error while evaluating UIControl Callback
Can you help diagnose where my error is coming from?
The example dataset in the dNBS runs without error. Ive looked at the dNBS example and compared it to mine, the few differences I've noticed between the dNBS example and my data is that I organized my functional connectivity matrices into a single .mat file (node x node x subject), and my node coordinates are not integers (e.g. -38.1, 48.8, 10.5). All other files I call are .mat as well (design matrix, connectivity matrices, node coordinates, node labels). Im also using ABCD data preprocessed by the Dcanlab, so the diagonal in my connectivity mats are all 7.2543 instead of the traditional 1.
My data has run successfully using the NBS1.2 across multiple t-thresholds - just isn't running in the dNBS.
Im using Matlab version R2016b.
Thanks!
Kim
I am excited about the new features in the dNBS toolbox. I really like the new results outputs in the dNBS, and am trying to replicate some analyses I ran using the NBS, but I keep running into the same error when using the dNBS:
Undefined function or variable 'C'.
Error in NBSdirected (line 129)
DIMS.nodes=size(C,2);
Error in dNBSrun (line 322)
catch; [nbs.NBS.n,nbs.NBS.con_mat,nbs.NBS.pval]=NBSdirected(nbs.STATS,-1,nbs.GLM,nbs.NBS); end
Error in dNBS>get_ui (line 178)
dNBSrun(UI,S);
Error while evaluating UIControl Callback
Can you help diagnose where my error is coming from?
The example dataset in the dNBS runs without error. Ive looked at the dNBS example and compared it to mine, the few differences I've noticed between the dNBS example and my data is that I organized my functional connectivity matrices into a single .mat file (node x node x subject), and my node coordinates are not integers (e.g. -38.1, 48.8, 10.5). All other files I call are .mat as well (design matrix, connectivity matrices, node coordinates, node labels). Im also using ABCD data preprocessed by the Dcanlab, so the diagonal in my connectivity mats are all 7.2543 instead of the traditional 1.
My data has run successfully using the NBS1.2 across multiple t-thresholds - just isn't running in the dNBS.
Im using Matlab version R2016b.
Thanks!
Kim
Jun 5, 2021 02:06 PM | Max von Gellhorn
RE: dNBS error when replicating an NBS analysis
Hello Kim
Thank you for the detailed explanation of the error that occurred.
I was able to reproduce the error with a *.mat file.
Since the import of ASCI(txt) files is not affected, I can offer you a workaround until I fix the bug in the dNBS version.
Attached is a Matlab script which creates for each subject a text files from a mat file (node x node x subject) .
You only have to change the path in the first line of the file "Extract_ASCI_from_3D_Array.m".
After that it will export all connectivity matrixes.
I will fix and test the bug in the next days and will upload a new version then.
Best wishes,
Max
Thank you for the detailed explanation of the error that occurred.
I was able to reproduce the error with a *.mat file.
Since the import of ASCI(txt) files is not affected, I can offer you a workaround until I fix the bug in the dNBS version.
Attached is a Matlab script which creates for each subject a text files from a mat file (node x node x subject) .
You only have to change the path in the first line of the file "Extract_ASCI_from_3D_Array.m".
After that it will export all connectivity matrixes.
I will fix and test the bug in the next days and will upload a new version then.
Best wishes,
Max
Jun 5, 2021 09:06 PM | Kim Ray - UC Davis
RE: dNBS error when replicating an NBS analysis
Thank you both for the quick reply. Ill use the code you
shared to rewrite my connectivity matrices as individual text files
and try it out again.
If not, Ill also see if my diagonal values are also an issue. The feedback is much appreciated!
Best - Kim
If not, Ill also see if my diagonal values are also an issue. The feedback is much appreciated!
Best - Kim
Jun 6, 2021 12:06 AM | Andrew Zalesky
RE: dNBS error when replicating an NBS analysis
Thank you Max!!
Originally posted by Kim Ray:
Originally posted by Kim Ray:
Thank you both for the quick reply. Ill
use the code you shared to rewrite my connectivity matrices as
individual text files and try it out again.
If not, Ill also see if my diagonal values are also an issue. The feedback is much appreciated!
Best - Kim
If not, Ill also see if my diagonal values are also an issue. The feedback is much appreciated!
Best - Kim
Jun 16, 2021 09:06 AM | Max von Gellhorn
RE: dNBS error when replicating an NBS analysis
Hi Kim
I have uploaded the new version. Let me know if everything is working properly now.
Greetings
Max
I have uploaded the new version. Let me know if everything is working properly now.
Greetings
Max