yeatmanlab / AFQ-Browser

Browser-based visualization tools for AFQ results
BSD 3-Clause "New" or "Revised" License
33 stars 15 forks source link

ValueError: not enough values to unpack (expected 2, got 1) #270

Closed soichih closed 6 years ago

soichih commented 6 years ago

I am seeing following error message when I try to run afqbrowser-assemble.

Traceback (most recent call last):
  File "/usr/local/bin/afqbrowser-assemble", line 49, in <module>
    link=args.page_title_link, sublink=args.page_subtitle_link)
  File "/usr/local/lib/python3.6/site-packages/afqbrowser/browser.py", line 485, in assemble
    out_path=out_path)
  File "/usr/local/lib/python3.6/site-packages/afqbrowser/browser.py", line 258, in afq_mat2tables
    n_subjects, nodes_per_tract = vals[stats[0]].item()[0].shape
ValueError: not enough values to unpack (expected 2, got 1)

Here is the AFQ .mat file I am using

https://www.dropbox.com/s/1n0sgvvx2eklrs2/output.mat

I've created this output with following code

config.dtiinit  = '/mnt/scratch/testdata/dtiinit2';
sub_dirs = { [config.dtiinit '/dti'] };
sub_group = [1]; %0 = control 1 = patient
afq = AFQ_Create('run_mode', 'test', 'sub_dirs', sub_dirs, 'sub_group', sub_group, 'showfigs', 0);
[afq patient_data control_data norms abn abnTracts] = AFQ_run(sub_dirs, sub_group, afq);
save('output.mat', 'afq');

Maybe I should set sub_gruop to 0?

arokem commented 6 years ago

Do I understand correctly: you have only one subject in that matfile? I think we don't currently cover that use-case, but maybe we should.

On Wed, Apr 11, 2018 at 2:59 AM, Soichi Hayashi notifications@github.com wrote:

I am seeing following error message when I try to run afqbrowser-assemble.

Traceback (most recent call last): File "/usr/local/bin/afqbrowser-assemble", line 49, in link=args.page_title_link, sublink=args.page_subtitle_link) File "/usr/local/lib/python3.6/site-packages/afqbrowser/browser.py", line 485, in assemble out_path=out_path) File "/usr/local/lib/python3.6/site-packages/afqbrowser/browser.py", line 258, in afq_mat2tables n_subjects, nodes_per_tract = vals[stats[0]].item()[0].shape ValueError: not enough values to unpack (expected 2, got 1)

Here is the AFQ .mat file I am using

https://www.dropbox.com/s/1n0sgvvx2eklrs2/output.mat

I've created this output with following code

config.dtiinit = '/mnt/scratch/testdata/dtiinit2'; sub_dirs = { [config.dtiinit '/dti'] }; sub_group = [1]; %0 = control 1 = patient afq = AFQ_Create('run_mode', 'test', 'sub_dirs', sub_dirs, 'sub_group', sub_group, 'showfigs', 0); [afq patient_data control_data norms abn abnTracts] = AFQ_run(sub_dirs, sub_group, afq); save('output.mat', 'afq');

Maybe I should set sub_gruop to 0?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/yeatmanlab/AFQ-Browser/issues/270, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHPNnaTVVDkhr7hxz-Sq04fFpUyvtnyks5tnXGegaJpZM4TPTBU .

soichih commented 6 years ago

Yes, I am only passing 1 subject right now. I am trying to use AFQbrowser to visualize a single subject's tract profiles. If that's not what AFQ browser is supposed to do, then I can probably pass some static data from another subject as a control, and use it to visualize the input subject (as a patient?) against? Would you recommend that route?

arokem commented 6 years ago

Turns out it wasn't too hard to make it work for a single subject. See #271 and screenshot below:

screen shot 2018-04-12 at 12 16 07 pm
soichih commented 6 years ago

nice!

arokem commented 6 years ago

Closed through #271