brain-life / encode Goto Github PK
View Code? Open in Web Editor NEWMethod for encoding brain connectomes in multidimensional arrays (tensors).
Home Page: https://github.com/brain-life/encode
Method for encoding brain connectomes in multidimensional arrays (tensors).
Home Page: https://github.com/brain-life/encode
Hi Franco and all,
When I run LiFE using encode for specific dataset, I found a case in which small number of streamlines got "NaN" weights after fitting.
For example, I got something like
fe.life.fit.weights(1:10)
ans =
0
0.0102
0
0
0
NaN
0.0086
In this case, streamlines #6 got "NaN" weight.
It is a first time for me to see this phenomenon. Are there anybody who see similar sort of phenomenon?
[feConnectomeInit] fe-structure Memory Storage:1.05 Gb
The size of the sparse tensor Phi is (Na,Nv,Nf) = (129241,190589,500000)
The size of the dictionary D is (Ntheta,Na) = (96,129241)
Index exceeds matrix dimensions.Error in demo_connectome_encoding (line 163)
fascicles_indices = unique(inds(:,3));
Got error while running the demo_connectome_encoding.m
++ WARNING: nifti_read_buffer(/home/karan/life/Demo_Data_for_Multidimensional_Encoding_of_Brain_Connectomes/STN/sub-FP/dwi/run01_fliprot_aligned_trilin.nii.gz):
data bytes needed = 323042844
data bytes input = 0
number missing = 323042844 (set to 0)
++ WARNING: nifti_read_buffer(/home/karan/life/Demo_Data_for_Multidimensional_Encoding_of_Brain_Connectomes/STN/sub-FP/dwi/run01_fliprot_aligned_trilin.nii.gz):
data bytes needed = 323042844
data bytes input = 0
number missing = 323042844 (set to 0)
++ WARNING: nifti_read_buffer(/home/karan/life/Demo_Data_for_Multidimensional_Encoding_of_Brain_Connectomes/STN/sub-FP/dwi/run01_fliprot_aligned_trilin.nii.gz):
data bytes needed = 323042844
data bytes input = 0
number missing = 323042844 (set to 0)
++ WARNING: nifti_read_buffer(/home/karan/life/Demo_Data_for_Multidimensional_Encoding_of_Brain_Connectomes/STN/sub-FP/dwi/run01_fliprot_aligned_trilin.nii.gz):
data bytes needed = 323042844
data bytes input = 0
number missing = 323042844 (set to 0)
++ WARNING: nifti_read_buffer(/home/karan/life/Demo_Data_for_Multidimensional_Encoding_of_Brain_Connectomes/STN/sub-FP/dwi/run01_fliprot_aligned_trilin.nii.gz):
data bytes needed = 323042844
data bytes input = 0
number missing = 323042844 (set to 0)
++ WARNING: nifti_read_buffer(/home/karan/life/Demo_Data_for_Multidimensional_Encoding_of_Brain_Connectomes/STN/sub-FP/dwi/run01_fliprot_aligned_trilin.nii.gz):
data bytes needed = 323042844
data bytes input = 0
number missing = 323042844 (set to 0)
And warning in the command prompt.
Update all demo_scripts with the doi address of demo_datasets
Hi!
I downloaded the recommended dataset and ran demo_LiFE.m without making any change to the code or dataset. But I have received the following error
Error using histc
Edge vector must be monotonically non-decreasing.
Error in hist (line 126)
nn = histc(y,edgesc,1);
Error in feComputeEvidence (line 25)
[se.lesion.hist, se.lesion.xhist] = hist(se.lesion.rmse.all, se.bins);
Error in demo_LiFE (line 252)
se = feComputeEvidence(prob.rmse,det.rmse);
When I checked the values of "y" and "edgesc", both contained NaNs. Can you please guide what am I doing wrong? I am using MATLAB 2018a on Windows OS. "rmse", "rmsexv", "rrmse" and "w" all are also NaNs.
I am trying to run app-life on output track.tck generated by brain-life/app-dipy-tracking (multishell tractograph with CSA) app.
When I run LiFE, I get following error message.
{�Error using dtiImportFibersMrtrix (line 76)
Unable to parse header for file ../59a09712682fb20024ca9af8/track.tck
Error in fgRead (line 39)
fg = dtiImportFibersMrtrix(fgFile);
Error in feConnectomeInit (line 49)
fg = fgRead(fgFileName);
Error in life (line 10)
fe = feConnectomeInit(config.dwi, ...
Here is the header contained inside the output track.tck.
$ head ../59a09712682fb20024ca9af8/track.tck
mrtrix tracks
count: 0000272259
datatype: Float32LE
file: . 67
It's short, but the structure looks OK? It could be missing some parameters that LiFE needs?
The brain-life/app-dipy-tracking creates track.tck by doing following.
https://github.com/brain-life/app-dipy-tracking/blob/master/main.py#L108
tractogram = Tractogram(streamlines, affine_to_rasmm=affine)
save(tractogram, 'track.tck')
It am not sure if this issue needs to be fixed by the tractography app, or the .tck file header parser used by LiFE.
We've been seeing a lot of out-of-memory issue with encode lately.
Out of memory. Type HELP MEMORY for your options.
Error in unique
Error in unique
Error in fefgGet (line 224)
Error in feSet (line 75)
Error in feConnectomeInit (line 52)
This might be happening because we started feeding track.tck output from mrtrix3 act app, which output somewhat more fibers and track.tck file size is slightly larger (1.69GB)
tckinfo.txt
***********************************
Tracks file: "track.tck"
act: 5tt.mif
backtrack: variable
count: 675000
crop_at_gmwmi: 1
downsample_factor: 3
fod_power: 0.25
init_threshold: variable
lmax: variable
max_angle: variable
max_num_seeds: 15000000
max_num_tracks: 15000
max_seed_attempts: 1000
max_trials: 1000
method: variable
mrtrix_version: 3.0_RC3
output_step_size: 0.625
rk4: 0
samples_per_step: 4
sh_precomputed: 1
source: variable
step_size: variable
stop_on_all_include: 0
threshold: variable
timestamp: 1550301026.1405482292
total_count: 675000
unidirectional: 0
I will benchmark / profile the memory usage, but if @ccaiafa @francopestilli have any hunch as to what might be causing this issue, please let me know!
The life demo script shows how to output various plots from probabilistic / deterministic / combined steps. However, the fh indices for probabilistic and deterministic steps uses the same indices so the deterministic steps are overriding the graphs for probabilistic steps.
fh(1) fh(2) fh(3) fh(1) > should be fh(4) fh(2) > should be fh(5) fh(3) > should be fh(6)..and..
fh(4) > should be fh(7) fh(5) > should be fh(8) fh(6) > should be fh(9)Create a release version with the code of the first submission to NM and delete previously created released
feOpenLocalCluster still appears in fefgGet(line 209 and 800) and could cause fefgGet crash.
The indices of the fascicles in Virtual lesion demo are not pased properly.
End of day today. We shoudl fix soon.
When running feConnectomeEncoding.m in Matlab2014b, the set(s.matlab.desktop.workspace, 'ArraySizeLimitEnabled',false);
line (26) throws an error: "Settings group 'workspace' does not contain setting 'ArraySizeLimitEnabled'." The command works fine with 2015a-2016b, and then it's obviously not run for later versions.
If there's no such setting in 2014b and/or you don't care to support this version, a note in the README or an error message indicating an unsupported version would be great! Thanks!
Hi,
I am starting to take a look at this new version.
As I see it, the output variable [removedFibers] are no longer retained in the new code. Perhaps, we could just remove it from output variable.
Finding common brain coordinates between P and D connectomes...
Warning: The colorbar TickLength is a scalar quantity. Only the first value will be used.
> In demo_LiFE>scatterPlotRMSE (line 341)
In demo_LiFE (line 244)
[feComputeEvidence] Computing the Earth Mover's distance...
[feComputeEvidence] Computing the Strength of Evidence... .Error using histc
Edge vector must be monotonically non-decreasing.
Error in hist (line 126)
nn = histc(y,edgesc,1);
Error in feComputeEvidence (line 84)
[y(:,inm),xhis] = hist(nullDistributionW(:,inm),linspace(min_x,max_x,se.s.nbins));
Error in demo_LiFE (line 249)
se = feComputeEvidence(prob.rmse,det.rmse);
demo_LiFE is executing fine, but towards the end, while creating plots I get this error. I am not sure why this occurs.
feConnectomeInit help text orders the arguments incorrectly. The function appears to work fine otherwise; the arguments are the same, the example in the help has them in the wrong order.
I am trying to troubleshoot an issue that cropped up recently with brain-life/app-life when feConnectomeInit tries to load the dwi data.
Error using sub2ind (line 73)
Out of range subscript.
Error in dwiGet (line 172)
Error in feConnectomeSetDwi (line 47)
Error in feConnectomeInit (line 56)
Error in life (line 10)
I am feeding dtiInit output (dwi_aligned_trilin.nii.gz) with the following dimension.
hayashis@haswell:~/test/encode 1 mrinfo dwi_aligned_trilin.nii.gz
************************************************
Image: "dwi_aligned_trilin.nii.gz"
************************************************
Format: NIfTI-1.1
Dimensions: 129 x 169 x 121 x 108
Voxel size: 1.25 x 1.25 x 1.25 x 1
Dimension labels: 0. left->right (mm)
1. posterior->anterior (mm)
2. inferior->superior (mm)
3. undefined (?)
Data type: signed 16 bit integer (little endian)
Data layout: [ +0 +1 +2 +3 ]
Data scaling: offset = 0, multiplier = 1
Comments: Raw Eddy Corrected
Transform: 1 0 0 -80
0 1 0 -120
0 0 1 -60
0 0 0 1
Which matches the dwi.nifit.dim that's loaded
K>> dwi.nifti.dim
ans =
129 169 121 108
The error occurs on https://github.com/vistalab/vistasoft/blob/master/mrDiffusion/dwi/dwiGet.m#L172 where sub2ind is passed roi with overflowing index.
K>> max(feGet(fe,'roi coords'))
ans =
117 140 122
notice 122 > 121.
I'd like to know why 'fe.roi.coords' could contain index that's greater than the z-size of the image (121)?
K>> find(fe.roi.coords(:,3)==122)
ans =
201303
201372
201443
206945
207006
207066
212671
212734
212796
218457
218521
224269
224333
224397
224461
224523
230151
230217
230282
230802
236628
236694
236761
242665
Please help me troubleshoot this.
When we run LiFE, sometimes it fails with the following error message.
checking output
output weights and fibers does not match.. terminating
fe.life.fit.weights839710 1
fe.fg.fibers839711
When this problem happens, it's usually just 1 fiber that goes missing, but I've seen up to a dozen fibers missing in one occasion.
We don't know why this happens, and often the issue goes away if we rerun the App.. I am trying to investigate the problem but I can't even recreate it when I run it on my laptop. Can you think of any area of the code that might be causing this issue?
Hi,
I tried to download the demo data but I got an error (see attachment). I registered in the https://scholarworks.iu.edu/ platform with the diego.lozano-soldevilla at neuroelectrics dot com address. Could you please provide an alternative address please?
Best
I just realized that we haven't finished merging Batch_Karst branch (that has a MEX files) to master. I am using Batch_Karst branch code for app-life and ideally, I'd like to switch using the master branch instead.
Can we simply do
git checkout master
git merge Batch_Karst
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.