you have to at least remove the commas


On 10/4/17 1:09 PM, Dowling, Kevin Francis wrote:
Dear Freesurfer experts,

I'm trying to run a between groups analysis for two groups with a matrix set up for DOSS regressing out 5 covariates (contrast is 1 -1 0 0 0 0 0). I am trying to run this with DOSS as one of the covariates is an interaction term that would lead to colinearity issues in DODS. However, I am having some difficulty reading in my matrix. When I send in a standard matlab matrix (attached as a .mat) I get the following, "MatrixReadTXT: could not scan value [1][1] \ ERROR:in uncompressing," which I assume means that my matrix isn't being read properly (full output below under Output 1). I noticed a similar issue was discussed on the forum previously (https://mail.nmr.mgh.harvard.edu/pipermail//freesurfer/2013-November/034582.html) and using an ASCII file seemed to resolve the issue. When I convert my matlab file into an ASCII text file (using dlmwrite in matlab, also attached as a .txt file) I get the following error (full output below under Output 2), "MatrixReadTxt: could not scan value [2][1] \ Invalid argument \ WARNING:matlab elment type is 758132281, which is not a matrix."

I'm running Freesurfer version 5.3 on a CentOs 7 system.

I suspect this is probably a simple mistake on my part, but I would greatly appreciate any guidance or further troubleshooting suggestions you might have!

~~~

Output 1:

[dauntless:RPDR_Manual_Edits] (nmr-stable53-env) mri_glmfit --y /cluster/roffman2/users/RPDR_Manual_Edits/Analyses_Thickness/199_PrePostFort/RH/rh_thickness_map_usingfsgd.mgh --X /cluster/roffman/users/fsgd/matrix/RPDR/99PostFortification_Minus_100PreFortification_DOSS_Nuisance_ZAgeGST_ZAgeXGrp_Matrix.mat --C /cluster/roffman/users/fsgd/RPDR_083115/Test_TwoGroups_RegressOutFiveCovariates_OddSyntax.mtx --glmdir /cluster/roffman2/users/RPDR_Manual_Edits/Analyses_Thickness/199_PrePostFort/RH/rh_thickness_fwhm22/FS53Test_TopMinusBottomRegressoutZAgeGST_ZAgeXGrp_DOSS --surf fsaverage rh --fwhm 22 --no-prune
Reading source surface /cluster/roffman2/users/RPDR_Manual_Edits//fsaverage/surf/rh.white
FWHM = 22.000000
Number of vertices 163842
Number of faces    327680
Total area         65020.765625
AvgVtxArea       0.396850
AvgVtxDist       0.717994
StdVtxDist       0.193566
Surface smoothing by fwhm=22.000000, niters=356.000000

$Id: mri_glmfit.c,v 1.196.2.8 2012/11/01 18:51:41 greve Exp $
cwd /autofs/cluster/roffman2/users/RPDR_Manual_Edits
cmdline mri_glmfit --y /cluster/roffman2/users/RPDR_Manual_Edits/Analyses_Thickness/199_PrePostFort/RH/rh_thickness_map_usingfsgd.mgh --X /cluster/roffman/users/fsgd/matrix/RPDR/99PostFortification_Minus_100PreFortification_DOSS_Nuisance_ZAgeGST_ZAgeXGrp_Matrix.mat --C /cluster/roffman/users/fsgd/RPDR_083115/Test_TwoGroups_RegressOutFiveCovariates_OddSyntax.mtx --glmdir /cluster/roffman2/users/RPDR_Manual_Edits/Analyses_Thickness/199_PrePostFort/RH/rh_thickness_fwhm22/FS53Test_TopMinusBottomRegressoutZAgeGST_ZAgeXGrp_DOSS --surf fsaverage rh --fwhm 22 --no-prune
sysname  Linux
hostname dauntless.nmr.mgh.harvard.edu
machine  x86_64
user     kfd11
FixVertexAreaFlag = 1
UseMaskWithSmoothing     1
fwhm     22.000000
niters    356.000000
OneSampleGroupMean 0
y    /autofs/cluster/roffman2/users/RPDR_Manual_Edits/Analyses_Thickness/199_PrePostFort/RH/rh_thickness_map_usingfsgd.mgh
logyflag 0
X    /cluster/roffman/users/fsgd/matrix/RPDR/99PostFortification_Minus_100PreFortification_DOSS_Nuisance_ZAgeGST_ZAgeXGrp_Matrix.mat
usedti  0
labelmask  /cluster/roffman2/users/RPDR_Manual_Edits//fsaverage/label/rh.cortex.label
maskinv 0
glmdir /cluster/roffman2/users/RPDR_Manual_Edits/Analyses_Thickness/199_PrePostFort/RH/rh_thickness_fwhm22/FS53Test_TopMinusBottomRegressoutZAgeGST_ZAgeXGrp_DOSS
IllCondOK 0
ReScaleX 1
DoFFx 0
Creating output directory /cluster/roffman2/users/RPDR_Manual_Edits/Analyses_Thickness/199_PrePostFort/RH/rh_thickness_fwhm22/FS53Test_TopMinusBottomRegressoutZAgeGST_ZAgeXGrp_DOSS
Loading y from /autofs/cluster/roffman2/users/RPDR_Manual_Edits/Analyses_Thickness/199_PrePostFort/RH/rh_thickness_map_usingfsgd.mgh
MatrixReadTxT: could not scan value [1][1]

Invalid argument
ERROR: in uncompressing
    not enough memory in buffer

Cannot allocate memory
Segmentation fault (core dumped)

~~~

Output 2:

[dauntless:RPDR_Manual_Edits] (nmr-stable53-env) mri_glmfit --y /cluster/roffman2/users/RPDR_Manual_Edits/Analyses_Thickness/199_PrePostFort/RH/rh_thickness_map_usingfsgd.mgh --X /cluster/roffman/users/fsgd/matrix/RPDR/99PostFortification_Minus_100PreFortification_DOSS_Nuisance_ZAgeGST_ZAgeXGrp_Matrix_ASCII.txt --C /cluster/roffman/users/fsgd/RPDR_083115/Test_TwoGroups_RegressOutFiveCovariates_OddSyntax.mtx --glmdir /cluster/roffman2/users/RPDR_Manual_Edits/Analyses_Thickness/199_PrePostFort/RH/rh_thickness_fwhm22/FS53Test_TopMinusBottomRegressoutZAgeGST_ZAgeXGrp_DOSS --surf fsaverage rh --fwhm 22 --no-prune
Reading source surface /cluster/roffman2/users/RPDR_Manual_Edits//fsaverage/surf/rh.white
FWHM = 22.000000
Number of vertices 163842
Number of faces    327680
Total area         65020.765625
AvgVtxArea       0.396850
AvgVtxDist       0.717994
StdVtxDist       0.193566
Surface smoothing by fwhm=22.000000, niters=356.000000

$Id: mri_glmfit.c,v 1.196.2.8 2012/11/01 18:51:41 greve Exp $
cwd /autofs/cluster/roffman2/users/RPDR_Manual_Edits
cmdline mri_glmfit --y /cluster/roffman2/users/RPDR_Manual_Edits/Analyses_Thickness/199_PrePostFort/RH/rh_thickness_map_usingfsgd.mgh --X /cluster/roffman/users/fsgd/matrix/RPDR/99PostFortification_Minus_100PreFortification_DOSS_Nuisance_ZAgeGST_ZAgeXGrp_Matrix_ASCII.txt --C /cluster/roffman/users/fsgd/RPDR_083115/Test_TwoGroups_RegressOutFiveCovariates_OddSyntax --glmdir /cluster/roffman2/users/RPDR_Manual_Edits/Analyses_Thickness/199_PrePostFort/RH/rh_thickness_fwhm22/FS53Test_TopMinusBottomRegressoutZAgeGST_ZAgeXGrp_DOSS --surf fsaverage rh --fwhm 22 --no-prune
sysname  Linux
hostname dauntless.nmr.mgh.harvard.edu
machine  x86_64
user     kfd11
FixVertexAreaFlag = 1
UseMaskWithSmoothing     1
fwhm     22.000000
niters    356.000000
OneSampleGroupMean 0
y    /autofs/cluster/roffman2/users/RPDR_Manual_Edits/Analyses_Thickness/199_PrePostFort/RH/rh_thickness_map_usingfsgd.mgh
logyflag 0
X    /cluster/roffman/users/fsgd/matrix/RPDR/99PostFortification_Minus_100PreFortification_DOSS_Nuisance_ZAgeGST_ZAgeXGrp_Matrix_ASCII.txt
usedti  0
labelmask  /cluster/roffman2/users/RPDR_Manual_Edits//fsaverage/label/rh.cortex.label
maskinv 0
glmdir /cluster/roffman2/users/RPDR_Manual_Edits/Analyses_Thickness/199_PrePostFort/RH/rh_thickness_fwhm22/FS53Test_TopMinusBottomRegressoutZAgeGST_ZAgeXGrp_DOSS
IllCondOK 0
ReScaleX 1
DoFFx 0
Creating output directory /cluster/roffman2/users/RPDR_Manual_Edits/Analyses_Thickness/199_PrePostFort/RH/rh_thickness_fwhm22/FS53Test_TopMinusBottomRegressoutZAgeGST_ZAgeXGrp_DOSS
Loading y from /autofs/cluster/roffman2/users/RPDR_Manual_Edits/Analyses_Thickness/199_PrePostFort/RH/rh_thickness_map_usingfsgd.mgh
MatrixReadTxT: could not scan value [2][1]

Invalid argument
WARNING: matlab elment type is 758132281, which is not a matrix.

Kind regards,
Kevin

Kevin F. Dowling
Clinical Research Coordinator
Brain Genomics Laboratory
Division of Psychiatric Neuroimaging
Martinos Center for Biomedical Imaging
Massachusetts General Hospital
149 13th Street
Charlestown, MA, 02129
(p) 617.643.2479


_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer