Fixelfilter error

Hi everyone, I’m encountering the following error when trying to run fixelfilter from the single-tissue pipeline:

fixelfilter: [ERROR] integer sequence specifier is empty
fixelfilter: [ERROR] error opening image "matrix/fixels.mif"
fixelfilter: [ERROR] Unable to load path "matrix/" as fixel-fixel connectivity data

When I run with the -debug tag, it lists out each of my subjects, then shows this (where I suspect the answer lies…):

fixelfilter: [INFO] image "matrix/index.mif" opened with dimensions 1739596x1x1x2, voxel spacing 1x1x1xnan, datatype UInt64LE
fixelfilter: [DEBUG] memory-mapping file "matrix/index.mif"...
fixelfilter: [DEBUG] file "matrix/index.mif" mapped at 0x103408000, size 27833536 (read-only)
fixelfilter: [DEBUG] image "matrix/index.mif" loaded
fixelfilter: [DEBUG] image "matrix/index.mif" initialised with strides = [ 2 3479192 3479192 1 ], start = 0, using direct IO
fixelfilter: [INFO] opening image "matrix/fixels.mif"...
fixelfilter: [DEBUG] reading key/value file "matrix/fixels.mif"...
fixelfilter: [DEBUG] unmapping file "matrix/index.mif"
fixelfilter: [DEBUG] image "matrix/index.mif" unloaded
fixelfilter: [ERROR] integer sequence specifier is empty
fixelfilter: [ERROR] error opening image "matrix/fixels.mif"
fixelfilter: [ERROR] Unable to load path "matrix/" as fixel-fixel connectivity data

Any help would be greatly appreciated! Thanks

Welcome Benjamin!

There seems to be a glitch in your matrix/fixels.mif file. What does the following command report?

mrinfo matrix/fixels.mif

If it reports the same thing, can you post the output of this command?

head -n 20 matrix/fixels.mif

Thanks,
Donald.

Thanks for your reply @jdtournier! Yes it gives the same error message. The output of the second command you suggested yields this, I hope it means more to you than it does to me…

mrtrix image
dim:                        
vox: 1,1,1
layout: +0,+1,+2
datatype: UInt32LE
transform: 1, 0, 0, 0
transform: 0, 1, 0, 0
transform: 0, 0, 1, 0
scaling: 0,1
nfixels: 1739596
command_history: fixelconnectivity fixel_mask/ tracks_2_million_sift.tck matrix/ -force  (version=3.0.2)
file: . 316
END
YZcegh???"&?k?FI??iW??m?6 = B ? $}$?$?$]%`%c%?%?'?'?+?+?+?+?+I/K/M/N/O/?/?/?/[2^2a2c2g2?5?6?6?:?:'=)=?=?=?>?>??????[@?@?@OAQAYA?A9B:B<B>BBB?B4J?J@JAJ?J?J?J?J?J-K0K1K2K?K?K?K?L?L?M?Q?T?T?T(W?Y?Y?Y?Z?Z?Z?[?[?\?\?]!^$^?^?_?_?`;b<b=b?b?b?b?bgfhfqfrfsftf?f?f?f?f?h?h?hjp?r?r?r?s?s?s?t?t^v_wmwowfxoxqxsx?x?x?x?y?y?y?y?z?z?zw{}|?|?|???
????????????#?$?&?(?????????z?~?_?????E?p?t?x?|?ʏΏя????????????_?a?c?H?O?Q?S?V?Y?4?8?=???A?????????????͛ԛ???????>?c?d?e?f?g?????????????Z???????????ɢ̢Ϣ??n?r?L?+?"???????Ҫ????]?`?c?f??*?,?2?:???????????????????ıDZʱ??????????"?$?%?&?'?/?0?????????????????????´ŴǴ̴δдմ??????????}????????;?
                                              ????????????????A?B?C?D?E?~????????e?g?i????????i???????:???/?{?~??$?'?s?u?v????f?j?l?v?x?????F?J?Q?l????0?4?B?D?l?q?????????K?????????????[?g?j?k?n??#?)?=???????????????????????????g?h?j?l???*?????????Z?[?\?]?$?&?'?x??????????????????%?&?'?(?)?*?r?s?t?u???????
                                                                        ???????G?L?Q?)?+?-?/?1?
                                                                                               ??????????????????????K?N???????????	?
                                                                                                                                         ???????)?T?Y?]???>?????K?N?Q?i?k?o?t?????[?j?'?l?o??????????????????????????????????????????????z?{?????????d?j?l?n?p?q???????????S?T?U?V????????????Y?
OS(5-3`#$&???????????????????&!?


??????!#????????* + - ? ? ? ? ? ? ? ?!?!?!?!?!H"?"?#	#
G7G8G9GHH       H                                        #$	$?$?$?$?$?$?$?$N%	&6?6@9C9~>?>?????@?@?A?A?A?B?B?B?B?B?C?C?C3E5EFF
H
QQQQQ?Q?Q?QR(S*S?c?c?eyh{hh?k?k?l?l?l?lCnFnlo?p?p?pqqqq!qrrr?r?r{s?s?s?s?t?t?tv?w?w?wfxgxix`ybycyey2z3z5z6z7z8z9zs{t{v{W|Z|[|\|]|_|`|a|4}6}8}9};}<}=}>}?}?}?}?}?}I~K~\~]~e~f~h~i~k~!????A?C?T?U?V?W?X?׀??7?????????????????şv?x?{?????????֥ڥޥ??????ϧ?????!?#?%?*???????????׭٭=???A?B?	?
                                                 ??????????????K?M?N?O?P?Q?R?S????? ?!?"?ݲ?????????????6?>?@?A?K?M?N?P?Ӵմ??????????????V??????????????????w???????????D?H?I?K?q?????????7?8?&?(?????????????????????????????????v?x?y?z?{?}??F?I?T?U?W?X???????r?s????????????? ?????????????????4?9?H?I?b?c?d?e?f???????2?sx{????q??????????????????-/023
                                                                                                                   ? ? ? ? ? ? ?!?!?!?!?!n"r"?"?"?"?"?"?"w#x#z#{#6$?$?$?$?$?$E%?%?%?%?%?%?%&$&W&Y&?&?&'''''a'?'?'?'8(@)
                                                                                                                                                                                                                       OO=P?Q?Q?Q?Q?Q?Q?Q?Q?R?R?R?RSSSSSTT
               TTTTTTTaVeVgViVkVlVnVTWjWlWmWoWqWsWSXUXYX\XcXfXhXjXlXmXnXqX?Y?Y?Y?Y?Y?Y?Y?Z?Z?Z?Z?Z?[?[?[?[?[?[?[
                                                                                                                \\\(\)\9\:\<\?\?\]]?]?]?]?^?^?^?_	_
                                                                                                                                                         _?_?_?`?`?`?`?`?`aa&a(a?a?a?a?aVb.cVcicjckclc?c???(?-?0?K?O?^?_?d?i?m?t?????ÐŐǐʐ̐ϐАҐԐ????????????????????????‘đƑȑ}?????????????????????????????[?^?y???????????????n?o?p?t?y?}?????l?o?q?t?v?y?|?}?~?????ڕܕ???????????????4?V?X?ØĘŘ3?4?6?7???	?
?? ?!???????????I?L?}?????????ϛn?r?5?v??????ȟ?f?g?i?k?n?p?q?s?v?x?8?????(?*?-?:?>?A?C?E?G?I???? ?"????????????
???????4?6?8???????????????????P?R?]?^?c?d?K?Z?\?_?????????????????????????????????????????v?x???????b??????  ?
?
?

OK, I thought that might have been the case: the dim header entry is completely empty. That shouldn’t happen… I note your command history states that this file was generated using the command:

fixelconnectivity fixel_mask/ tracks_2_million_sift.tck matrix/

using MRtrix version 3.0.2 – can you confirm that nothing else has happened to that file since it was produced? It hasn’t been loaded in MatLab or something?

Assuming this is indeed a straight output of that command, can I ask you to try again with our latest release (3.0.3), just in case there was a bug in 3.0.2 that we might have fixed since? If that still happens with the most up to date code, we’ll need to investigate and figure out why this might be occurring…

Hi @jdtournier, I’ve uninstalled and then reinstalled MRTRIX, and get the same error…I’m wondering if I need to start from the beginning of the pipeline after the reinstallation though? I went back one step ( fixelconnectivity fixel_mask/ tracks_2_million_sift.tck matrix/ )
And got the same error.
Also, how do I confirm the version number of my newly installed mrtrix?

Thanks again

Ok, that’s not good. We’ll need to investigate to figure out what the problem is. Any chance you could share the input data you’re providing to the command so we can replicate on our side?

No, that shouldn’t be necessary. Micro version updates (e.g. 3.0.2 to 3.0.3) should only consist of bug fixes. New features or anything that changes behaviour should only be introduced in minor releases (i.e. the next one will be 3.1.0).

Any MRtrix command with the -version option, e.g. fixelconnectivity -version.

Yes happy to share the input data. There’s quite a lot but does it work to just share some of the downstream data, like the ‘template’ folder? Let me know how to send your way.
And yes, using -version I can confirm I’m still getting the error with version 3.0.3

Thanks, that’s great. We only need the input data to that one command, so that would be the fixel_mask/ folder & tracks_2_million_sift.tck file. Hopefully that’ll be a manageable amount of data…?

Perfect, how can I share it with you?

Feel free to use any file sharing service you feel is appropriate. You can send it to my Gmail account: jdtournier@gmail.com

Thanks! Sent!

OK, I’ve had a look at the data you sent, and I can’t reproduce the issue. When I ran the command, this was the output:

$ fixelconnectivity fixel_mask/ tracks_2_million_sift.tck matrix/
fixelconnectivity: [100%] preloading data for "fixel_mask/directions.mif"
fixelconnectivity: [100%] computing fixel-fixel connectivity matrix
fixelconnectivity: [100%] Normalising and writing fixel-fixel connectivity matrix to directory "matrix/"

(using MRtrix 3.0.3 compiled with Eigen 3.3.9).
The output fixel data files were as expected:

$ mrinfo matrix/fixels.mif 
************************************************
Image name:          "matrix/fixels.mif"
************************************************
  Dimensions:        1940251728 x 1 x 1
  Voxel size:        1 x 1 x 1
  Data strides:      [ 1 2 3 ]
  Format:            MRtrix
  Data type:         unsigned 32 bit integer (little endian)
  Intensity scaling: offset = 0, multiplier = 1
  Transform:                    1           0           0           0
                                0           1           0           0
                                0           0           1           0
  command_history:   /home/donald/exp/mrtrix3/bin/fixelconnectivity fixel_mask/ tracks_2_million_sift.tck matrix/  (version=3.0.3)
  nfixels:           1739596

However, looking at the code, I think the issue might be that the command may have crashed before completing. When the output images are first created, the dim: entry is indeed left blank, and overwritten with the correct value at the end of processing, once the final number of fixel-fixel connections stored in the output is actually known. If for any reason the command doesn’t make it to the end of that function, the output file will be left in an unusable state, just as you’re seeing.

My best guess for why the command might fail on your system is an out of memory error. This command takes up all of the 32GB of RAM on my system to complete. I wouldn’t be surprised if it failed if your system has anything less than that…

Oh hmmm…my comp (I’m using a mac) has 64 GH of RAM so I don’t know why I’m having that issue

OK, I guess the first thing to verify is whether the command did indeed crash. Could you try running it again with the -debug option and record exactly what is shown in the terminal?

Another option would be to check the size of the output file. On my system, this is what I get:

$ ls -l matrix/
total 15185424
-rw-r--r-- 1 donald donald 7761007248 Jan 10 13:08 fixels.mif
-rw-r--r-- 1 donald donald   27833880 Jan 10 13:08 index.mif
-rw-r--r-- 1 donald donald 7761007252 Jan 10 13:08 values.mif

Another possibility for the crash is running out of storage space on the destination device – it does require ~15GB after all . A quick way to double-check this is to run this command within the folder destined to contain your outputs:

df -h .

Make sure the value in the Avail column is sufficient to store all of this.

Aha!
Thank you for all of the suggestions! I was running the entire analysis on an external drive with 2TB storage, which I believe is more than all my files for the analysis combined, but it was still the problem! When I moved everything over to my desktop and ran the analysis, it worked! Thanks a lot!

1 Like

If you are using a FAT32 filesystem on your external HDD (df -hT, see Type column), the fixel file with 7761007248 bytes (7.76GB) exceeds the maximum file size limit of FAT32 (4GB).

1 Like