3dISC Error in `[.data.frame`(lop$dataStr, , jj) : undefined columns selected

Hello,

I am trying to run my 3dISC script that includes my covariates and group factor levels. It keeps returning the following error:


updating R_LD_LIBRARY_PATH ...
Read 19956 items
Error in `[.data.frame`(lop$dataStr, , jj) : undefined columns selected
Calls: process.ISC.opts -> [ -> [.data.frame
In addition: Warning messages:
1: In process.ISC.opts(lop, verb = lop$verb) : NAs introduced by coercion
2: In FUN(X[[i]], ...) : NAs introduced by coercion
Execution halted

I have been doing some research on this and so far the only thing I have come across is this older topic: https://afni.nimh.nih.gov/afni/community/board/read.php?1,137476,137483 where the problem was fixed by changing the , in the qVars specification to a +. I have tried this but to no avail – it still returns the same error. I have also tried to run the file_tool to see if there are any bugs in my code, and there doesn’t seem to be, as I get this output:


file_tool -test -infile ./ISC_C_run.sh
file './ISC_C_run.sh': missing final newline
./ISC_C_run.sh has 0 bad characters

./ISC_C_run.sh file type: UNIX

I am not sure what the first line of the file_tool output means, so maybe it has to do with the “missing final newline”? In any case, I am have looked around again and I am not sure how to fix that, either.

This is my code from my script:


#!/bin/bash

3dISC -prefix ISC_C_nov24 -jobs 12         \
-r2z                                                                 \
-model  '0+grp+Age+Sex+(1|Subj1)+(1|Subj2)'                          \
-qVars  'Age,Sex'                                                    \
-gltCode ave         '1/6 1/6 1/6 1/6 1/6 1/6'                       \
-gltCode G11         '1 0 0 0 0 0'                                   \
-gltCode G12         '0 1 0 0 0 0'                                   \
-gltCode G13         '0 0 1 0 0 0'                                   \
-gltCode G22         '0 0 0 1 0 0'                                   \
-gltCode G23         '0 0 0 0 1 0'                                   \
-gltCode G33         '0 0 0 0 0 1'                                   \
-gltCode G11vG22     '1 0 0 -1 0 0'                                  \
-gltCode G11vG33     '1 0 0 0 0 -1'                                  \
-gltCode G22vG33     '0 0 0 1 0 -1'                                  \
-gltCode G11vG12+G13 '1 -0.5 -0.5 0 0 0'                             \
-gltCode G22vG12+G23 '0 -0.5 0 1 -0.5 0'                             \
-gltCode G33vG13+G23 '0 0 -0.5 0 -0.5 1'                             \
-dataTable @ISC_C_table.txt

and this is the header + first/last few lines from my dataTable (there is a total of 2850 pairs, for 76 subjects):


Subj1 Subj2 InputFile Age Sex grp                            \
1089001  1089002  TCorr1089001_1089002+orig  2.06    1  G12  \
1089001  1089004  TCorr1089001_1089004+orig  0.31    1  G12  \
1089001  1089005  TCorr1089001_1089005+orig  0.06    1  G22  \
... 
1089682  1089685  TCorr1089682_1089685+orig  1.36   -1  G23  \
1089684  1089685  TCorr1089684_1089685+orig  2.04   -1  G33

Thanks!

Ryann

As a follow-up with some more information:

I tried to run the code again after removing the Age + Sex variables from the model and removing the -qVars ‘Age,Sex’ argument. It started to run the program and gave me “summary information of the data structure”, except that instead of just having Set 1 be Subj1 and Set 2 be Subj2, set 1 was specified as Subj1 + my Age column and set 2 was specified as Subj2 + my Sex column:


++++++++++++++++++++++++++++++++++++++++++++++++++++
***** Summary information of data structure *****
407 subjects in set1 : 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.20 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.30 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.40 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.50 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.60 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.70 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.80 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.90 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25 1.26 1.27 1.28 1.29 1.30 1.31 1.32 1.33 1.34 1.35 1.36 1.37 1.38 1.39 1.40 1.41 1.42 1.43 1.44 1.45 1.46 1.47 1.48 1.49 1.50 1.51 1.52 1.53 1.54 1.55 1.56 1.57 1.58 1.59 1.60 1.61 1.62 1.63 1.64 1.65 1.66 1.67 1.68 1.69 1.70 1.71 1.72 1.73 1.74 1.75 1.76 1.77 1.78 1.79 1.80 1.81 1.82 1.83 1.84 1.85 1.86 1.87 1.88 1.89 1.90 1.91 1.92 1.93 1.94 1.95 1.96 1.97 1.98 1.99 1089001 1089002 1089004 1089005 1089006 1089009 1089010 1089014 1089016 1089017 1089018 1089019 1089021 1089025 1089026 1089028 1089030 1089036 1089037 1089039 1089040 1089043 1089044 1089047 1089050 1089051 1089052 1089055 1089056 1089060 1089061 1089062 1089066 1089072 1089074 1089076 1089082 1089083 1089084 1089085 1089087 1089090 1089091 1089093 1089096 1089097 1089098 1089601 1089602 1089603 1089604 1089606 1089609 1089612 1089614 1089618 1089630 1089632 1089633 1089634 1089643 1089645 1089647 1089648 1089649 1089650 1089654 1089655 1089660 1089667 1089669 1089671 1089680 1089682 1089684 2.00 2.01 2.02 2.03 2.04 2.05 2.06 2.07 2.08 2.09 2.10 2.11 2.12 2.13 2.14 2.15 2.16 2.18 2.19 2.20 2.21 2.22 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.33 2.34 2.35 2.36 2.37 2.38 2.39 2.40 2.41 2.42 2.43 2.44 2.45 2.46 2.48 2.49 2.50 2.51 2.53 2.54 2.55 2.56 2.57 2.58 2.59 2.60 2.62 2.64 2.65 2.66 2.67 2.68 2.69 2.72 2.73 2.74 2.76 2.77 2.78 2.79 2.81 2.82 2.83 2.84 2.85 2.86 2.87 2.90 2.91 2.92 2.93 2.94 2.95 2.97 2.98 2.99 3.00 3.02 3.03 3.04 3.05 3.06 3.07 3.08 3.09 3.10 3.11 3.12 3.13 3.14 3.16 3.17 3.19 3.20 3.21 3.22 3.23 3.25 3.26 3.28 3.29 3.30 3.31 3.33 3.34 3.35 3.37 3.38 3.39 3.40 3.42 3.43 3.45 3.47 3.49 3.51 3.61 3.63 3.75 Age 
79 subjects in set2 : -1 0 1 1089002 1089004 1089005 1089006 1089009 1089010 1089014 1089016 1089017 1089018 1089019 1089021 1089025 1089026 1089028 1089030 1089036 1089037 1089039 1089040 1089043 1089044 1089047 1089050 1089051 1089052 1089055 1089056 1089060 1089061 1089062 1089066 1089072 1089074 1089076 1089082 1089083 1089084 1089085 1089087 1089090 1089091 1089093 1089096 1089097 1089098 1089601 1089602 1089603 1089604 1089606 1089609 1089612 1089614 1089618 1089630 1089632 1089633 1089634 1089643 1089645 1089647 1089648 1089649 1089650 1089654 1089655 1089660 1089667 1089669 1089671 1089680 1089682 1089684 1089685 Sex 
412 subjects in total: 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.20 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.30 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.40 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.50 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.60 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.70 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.80 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.90 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25 1.26 1.27 1.28 1.29 1.30 1.31 1.32 1.33 1.34 1.35 1.36 1.37 1.38 1.39 1.40 1.41 1.42 1.43 1.44 1.45 1.46 1.47 1.48 1.49 1.50 1.51 1.52 1.53 1.54 1.55 1.56 1.57 1.58 1.59 1.60 1.61 1.62 1.63 1.64 1.65 1.66 1.67 1.68 1.69 1.70 1.71 1.72 1.73 1.74 1.75 1.76 1.77 1.78 1.79 1.80 1.81 1.82 1.83 1.84 1.85 1.86 1.87 1.88 1.89 1.90 1.91 1.92 1.93 1.94 1.95 1.96 1.97 1.98 1.99 1089001 1089002 1089004 1089005 1089006 1089009 1089010 1089014 1089016 1089017 1089018 1089019 1089021 1089025 1089026 1089028 1089030 1089036 1089037 1089039 1089040 1089043 1089044 1089047 1089050 1089051 1089052 1089055 1089056 1089060 1089061 1089062 1089066 1089072 1089074 1089076 1089082 1089083 1089084 1089085 1089087 1089090 1089091 1089093 1089096 1089097 1089098 1089601 1089602 1089603 1089604 1089606 1089609 1089612 1089614 1089618 1089630 1089632 1089633 1089634 1089643 1089645 1089647 1089648 1089649 1089650 1089654 1089655 1089660 1089667 1089669 1089671 1089680 1089682 1089684 2.00 2.01 2.02 2.03 2.04 2.05 2.06 2.07 2.08 2.09 2.10 2.11 2.12 2.13 2.14 2.15 2.16 2.18 2.19 2.20 2.21 2.22 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.33 2.34 2.35 2.36 2.37 2.38 2.39 2.40 2.41 2.42 2.43 2.44 2.45 2.46 2.48 2.49 2.50 2.51 2.53 2.54 2.55 2.56 2.57 2.58 2.59 2.60 2.62 2.64 2.65 2.66 2.67 2.68 2.69 2.72 2.73 2.74 2.76 2.77 2.78 2.79 2.81 2.82 2.83 2.84 2.85 2.86 2.87 2.90 2.91 2.92 2.93 2.94 2.95 2.97 2.98 2.99 3.00 3.02 3.03 3.04 3.05 3.06 3.07 3.08 3.09 3.10 3.11 3.12 3.13 3.14 3.16 3.17 3.19 3.20 3.21 3.22 3.23 3.25 3.26 3.28 3.29 3.30 3.31 3.33 3.34 3.35 3.37 3.38 3.39 3.40 3.42 3.43 3.45 3.47 3.49 3.51 3.61 3.63 3.75 Age -1 0 1 1089685 Sex 
5701 response values

** Error: 
   Error: the number of rows/files, 5701, is not equal to 84666 - the
 possible subject pairs!

I am assuming that the problem is coming from reading my table or its header. I am not sure how else to change it though to fit… I tried to change the spacing on the header so that it is equal to the spacing between the columns, but that did not change anything and I have also run a simplified version of 3dISC with only a Subj1, Subj2, and InputFile column in the dataTable before with similar spacing that worked. For any readers’ sake who have not yet viewed my first post, this is what my dataTable looks like:


Subj1 Subj2 InputFile Age Sex grp                                    \
1089001  1089002  TCorr1089001_1089002+orig  2.06    1  G12          \
1089001  1089004  TCorr1089001_1089004+orig  0.31    1  G12          \
1089001  1089005  TCorr1089001_1089005+orig  0.06    1  G22          \
1089001  1089006  TCorr1089001_1089006+orig  2.68    1  G22          \
1089001  1089009  TCorr1089001_1089009+orig  0.70    1  G12          \
1089001  1089010  TCorr1089001_1089010+orig  2.36    1  G22          \
...
1089680  1089682  TCorr1089680_1089682+orig  0.67   -1  G23          \
1089680  1089684  TCorr1089680_1089684+orig  1.35   -1  G33          \
1089680  1089685  TCorr1089680_1089685+orig  0.69   -1  G33          \
1089682  1089684  TCorr1089682_1089684+orig  0.68   -1  G23          \
1089682  1089685  TCorr1089682_1089685+orig  1.36   -1  G23          \
1089684  1089685  TCorr1089684_1089685+orig  2.04   -1  G33

Ryann,

The “InputFile” has to be the last column in the data table. Also, the model specification

-model ‘0+grp+Age+Sex+(1|Subj1)+(1|Subj2)’ \

is a little problematic: you do need to have an intercept due to the presence of multiple explanatory variables. So, you may have to change your dummy coding strategy and the coding for those comparisons.

Hi Gang,

Thank you so much for your suggestions/solutions! My code is working now, and I have been playing around with my model and I think I am close to figuring out what I need to do.

I really appreciate all the effort you and the rest of the AFNI team put into directly interacting with us, the users, when we run into problems!

  • Ryann