brainlife / app-life

LiFE (Linear Fasicle Evaluation) predicts the measured diffusion signal using the orientation of the fascicles present in a connectome. LiFE uses the difference between the measured and predicted diffusion signals to measure prediction error. The connectome model prediction error is used to compute two metrics to evaluate the evidence supporting properties of the connectome.
1 stars 5 forks source link

Index exceeds matrix dimensions. #9

Open soichih opened 4 years ago

soichih commented 4 years ago

I am running into the following error message.

+ singularity exec docker://brainlife/mcr:neurodebian1604-r2017a ./compiled/main
time="2020-02-18T13:01:44-05:00" level=warning msg="\"/run/user/740536\" directory set by $XDG_RUNTIME_DIR does not exist. Either create the directory or unset $XDG_RUNTIME_DIR.: stat /run/user/740536: no such file or directory: Trying to pull image in the event that it is a public image."
Index exceeds matrix dimensions.

Error in feConnectomeEncoding>compute_Phi_batch (line 160)

Error in feConnectomeEncoding (line 66)

Error in feConnectomeInit (line 93)

Error in life (line 10)

Error in main (line 32)

MATLAB:badsubscript

If anyone knows what it means, please let me know!

francopestilli commented 4 years ago

@soichih this has always bee an issue related to coordinate spaces. Is this new data? Is it AC-PC oriented? RAS or LAS?

soichih commented 4 years ago

The input t1 was acpc_aligned, and I've used the latest version of mrtrix3 preprocessing App, then fed it to mrtrix3 ACT app for tractography. The input tck looks good, I think.

Screenshot from 2020-02-19 20-20-08

The dwi's affine is in radiological (LAS).

bacaron commented 4 years ago

I can confirm this error with HCP data on only 400 streamlines....

francopestilli commented 4 years ago

is this the first time we encounter this? or the first time LiFE is used with MRTRIX-3 processed tracking?

bacaron commented 4 years ago

I was using mrtrix 0.2.12

francopestilli commented 4 years ago

Can you share the data set (download from brainlife) with me? We might want to take a look at this tomorrow?

soichih commented 4 years ago

@francopestilli I've recompiled app-life with the latest version of encode and vistasoft, and also on Matlab 2019a. I've tested the master branch and this time I am seeing a different error message.

https://brainlife.io/project/5d64733db29ac960ca2e797f/process/5e5bcaaf87cac7086eab0cb8#5e5bcab087cac7fa6aab0cbb

https://brainlife.io/project/5d64733db29ac960ca2e797f/process/5e5bca2987cac76252ab0cb2#5e5bca2a87cac7fa9aab0cb5

+ export MAXMEM=19000000
+ MAXMEM=19000000
+ singularity exec -e docker://brainlife/mcr:r2019a ./compiled/main
time="2020-03-01T09:21:34-05:00" level=warning msg="\"/run/user/740536\" directory set by $XDG_RUNTIME_DIR does not exist. Either create the directory or unset $XDG_RUNTIME_DIR.: stat /run/user/740536: no such file or directory: Trying to pull image in the event that it is a public image."
Error using reshape
To RESHAPE the number of elements must not change.

Error in feGet (line 915)

Error in life (line 19)

Error in main (line 32)

MATLAB:getReshapeDims:notSameNumel

(stdout)


config = 

  struct with fields:

    life_discretization: 360
         num_iterations: 100
                  track: '../5e5bc48687cac70530ab0caa/5dd9990b936ca34021c57df6/track.tck'
                    dwi: '../5e5bc48687cac70530ab0caa/5dd97cd6936ca38846c57c8c/dwi.nii.gz'
                  bvecs: '../5e5bc48687cac70530ab0caa/5dd97cd6936ca38846c57c8c/dwi.bvecs'
                  bvals: '../5e5bc48687cac70530ab0caa/5dd97cd6936ca38846c57c8c/dwi.bvals'
           x0x5F_inputs: {[1x1 struct]  [1x1 struct]}
              x0x5F_app: '5baa44b1d0be8b002776b8f7'
          x0x5F_outputs: {[1x1 struct]}
              x0x5F_tid: 2

using dwi

dwi =

    '../5e5bc48687cac70530ab0caa/5dd97cd6936ca38846c57c8c/dwi.nii.gz'

running feConnectomeInit

[feConnectomeInit]
 loading fiber from file: ../5e5bc48687cac70530ab0caa/5dd9990b936ca34021c57df6/track.tck
Reading Fiber Data for 525000 fibers...
loaded 525000 fibers...

Files loaded: 
  dwi   = ../5e5bc48687cac70530ab0caa/5dd97cd6936ca38846c57c8c/dwi.nii.gz 
  bvecs = ../5e5bc48687cac70530ab0caa/5dd97cd6936ca38846c57c8c/dwi.bvecs 
  bvals = ../5e5bc48687cac70530ab0caa/5dd97cd6936ca38846c57c8c/dwi.bvals

[feBuildDictionaries] Computing demeaned and non-demeaned difussivities dictionaries in a (360x360)-grid ...took: 0.014s.

[feConnectomeEncoding] Encoding connectome (building Phi, sparse tensor) ... MAXMEM not set, need to calculate (UNIX or MacOS)
nNodesMax =57343513, Total number of nodes = 106829121,  number of batch computation = 2

Encoding batch  1
Encoding batch  2
took: 204.258s.

[feConnectomeInit] fe-structure Memory Storage:4.30 Gb

fe = 

  struct with fields:

    name: 'temp'
    type: 'faseval'
    life: [1x1 struct]
      fg: [1x1 struct]
     roi: [1x1 struct]
    path: [1x1 struct]
     rep: []

running feFitModel - iterations:100