Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CIFTI files (.dscalar.nii) vs design matrix [Error using palm_takeargs (line 2062)] #51

Open
JacMatu opened this issue Mar 12, 2024 · 2 comments

Comments

@JacMatu
Copy link

JacMatu commented Mar 12, 2024

Hello,

I'm trying to set up my first PALM using CIFTI outputs from hcppipelines - I know that CIFTI support is limited here, but PALM was recommended to me by Mathew Glasser so I believe it's doable.

I'm trying a toy example of setting up a 2-sample T-Test with just 2 subjects per group (final will be 20/20).

  1. I concatenated CIFTI files using wb_shortcuts -cifti-concatenate into one 4D input image using
output='<path/to/output.dscalar.nii>'

input1='<path/to/input1.dscalar.nii>'
input2='<path/to/input2.dscalar.nii>'
input3='<path/to/input3.dscalar.nii>'
input4='<path/to/input4dscalar.nii>'

wb_shortcuts -cifti-concatenate \
    $output \
    $input1 \
    $input2 \
    $input3 \
    $input4 
  1. I created a design.mat and some basic contrasts to go with it and converted them with Text2Vest
    (design matrix preview)
    1 0
    1 0
    0 1
    0 1

Next, I wanted to run a basic palm but it seems that the data read from the 4D file is not read properly, as I get an error:

Running PALM (github using MATLAB 9.7.0.1190202 (R2019b) with the following options:
-i toyCIFTI4D.dscalar.nii
-d design.mat
-t [conBlind.con conSig.con]
-n 5000
-corrcon
-o opt.dir.stats
Reading input 1/1: toyCIFTI4D.dscalar.nii
Reading design matrix and contrasts.
Error using palm_takeargs (line 2062)
The number of rows in the design matrix does
not match the number of observations in the data.
- Rows in the matrix: 4
- Observations in the data: 298261
In file design.mat


Error in palm_core (line 33)
[opts,plm] = palm_takeargs(varargin{:});

Error in palm (line 81)
palm_core(varargin{:});

Is there any additional step that has to be taken to ensure proper inputs from CIFTI files? I assumed that for simple non-spatial stats analyses this should be ok, but I'm completely new to this environment and I'm not sure why palm / wb_command read 298261 observations from concatenating just 4 files

@andersonwinkler
Copy link
Owner

Hi Jacek,

I was working on it just yesterday. Could you try pulling from the repo again and let me know if the problem persists?

Thanks!

Anderson

@JacMatu
Copy link
Author

JacMatu commented Mar 12, 2024

Hi Anderson,

Yes, it worked! Thank you, I didn't notice recent commits!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants