[caret-users] -metric-composite-identified-columns

Julia Bender julia.bender.1 at cms.hu-berlin.de
Wed Mar 31 09:56:30 CDT 2010


Hi Donna,

thanks for your help. The thing is that `ls
/mrt/Visac/*Visac/stats/*Visac_fullGLM/c*.nii` only specifies the conds
=column names. The stat-values are stored in $CURRDIR/deformed_RH_*.metric
files, one for each subject. So my code needs to take the names of the
.nii files, find each of the so specified columns in each of the two
deformed.metrics files, and combine them into one metric file. So I think
what I need is 2 loops. I tried this:

OUTFILE=my_composite.metric
rm -rf $OUTFILE
COL_ENTRIES=""
MET_ENTRIES=""

for EACHCOL in `ls /mrt/Visac/*Visac/stats/*Visac_fullGLM/c*.nii`
do
    COL_ENTRIES="$COL_ENTRIES `basename $EACHCOL` 1"
done

for EACHMETRIC in `ls
/mrt/Visac/group_metrics/Visac_fullGLM/deformed_RH_*Visac_beta.metric`
do
    MET_ENTRIES="$MET_ENTRIES $EACHMETRIC 1"
done

caret_command -metric-composite-identified-columns $OUTFILE $EACHMETRIC
$COL_ENTRIES

I get: METRIC COMPOSITE IDENTIFIED COLUMNS ERROR: ERROR column name/number
cCue_EndoLeft.nii not found in file deformed_RH_02Visac_beta.metric

deformed_RH_02Visac_beta.metric looks the same as the file for subj 01 and
is in the same folder. Any ideas what could be wrong?

Also, what is the "1" at the end of the line for?

Thanks a lot!!

Julia


> Julia,
>
> Here is the usage for this command:
>
>       caret_command -metric-composite-identified-columns
>          <output-metric-file-name>
>          [input-metric-file-1  file-1-column]
>          ...
>          [input-metric-file-N  file-2-column]
>
>          Composite the selected columns from the input metric
>          files and place them into the output metric file.
>
>          "column" is either the number of the column, which
>          starts at one, or the name of the column.  If a
>          a name contains spaces, it must be enclosed in double
>          quotes.  Name has priority over number.
>
> I'm not 100% certain, but I think file-1-column refers to what the
> column is named in the input file, rather than what you want it to be
> named in the output file.  So if there is just a single column in
> $EACHCOL, the simplest thing is to just specify 1 there, to indicate the
> first (and only) column.
>
> I think I would do this, instead of what you have:
>
> OUTFILE=my_composite.metric
> rm -rf $OUTFILE
> COL_ENTRIES=""
> for EACHCOL in `ls /mrt/Visac/*Visac/stats/*Visac_fullGLM/c*.nii`
> do
>   COL_ENTRIES="$COL_ENTRIES $EACHCOL 1"
> done
>
> caret_command -metric-composite-identified-columns $OUTFILE $COL_ENTRIES
>
> Note that there should be only one caret_command, but it should specify
> all four cols.  All you need the loop for is to generate this part of
> the command:
>
>          [input-metric-file-1  file-1-column]
>          ...
>          [input-metric-file-N  file-2-column]
>
> Donna
>
> On 03/30/2010 10:19 AM, Julia Bender wrote:
>> Hi,
>>
>> thanks for your help. I'm trying to composite four conds columns from
>> two
>> subjects' deformed-metric-files into one combined metric file:
>>
>> for EACHCOL in `ls /mrt/Visac/*Visac/stats/*Visac_fullGLM/c*.nii` (= my
>> four conds files)
>> do
>> caret_command -metric-composite-identified-columns $CURRDIR/RH_`basename
>> $EACHCOL .nii`.metric $CURRDIR/deformed_RH_*.metric `basename $EACHCOL
>> .nii`
>> done
>>
>> I get: "METRIC COMPOSITE IDENTIFIED COLUMNS ERROR: ERROR column
>> name/number cCue_EndoLeft (=my first conds column) not found in file
>> deformed_RH_01Visac_beta.metric"
>>
>> CURRDIR is the directory were the deformed-metric-files are. I have full
>> permission on all files. In the deformed-metric-files the columns are
>> named like this: tag-column-name 0 cCue_EndoLeft.nii[1]
>>
>> I understand that I need to specify either column name or number so that
>> columns are combined correctly. I tried to do that with `basename
>> $EACHCOL
>> .nii` , which obviously doesn't work. Do you know how I can assign
>> name/number in the loop?
>>
>> Thanks a lot!
>>
>> Julia
>>
>> Dipl. Psych. Julia Bender
>> Humboldt Universität zu Berlin
>> Mathematisch - Naturwissenschaftliche Fakultät II
>> Institut für Psychologie, Abt. Klinische Psychologie
>> Unter den Linden 6
>> D-10099 Berlin
>>
>> _______________________________________________
>> caret-users mailing list
>> caret-users at brainvis.wustl.edu
>> http://brainvis.wustl.edu/mailman/listinfo/caret-users
>>
>
> _______________________________________________
> caret-users mailing list
> caret-users at brainvis.wustl.edu
> http://brainvis.wustl.edu/mailman/listinfo/caret-users
>


Dipl. Psych. Julia Bender
Humboldt Universität zu Berlin
Mathematisch - Naturwissenschaftliche Fakultät II
Institut für Psychologie, Abt. Klinische Psychologie
Unter den Linden 6
D-10099 Berlin




More information about the caret-users mailing list