Donna, I've uploaded both deformed*.metric files, so you can have a look. Thanks so much for your help.
Julia > Julia, > > Please upload deformed_RH_02Visac_beta.metric here: > > http://pulvinar.wustl.edu/cgi-bin/upload.cgi > > Also, where your script reads like so: > > OUTFILE=RH_$CONDITION.metric > CONDITION=`basename $CONDITION` > > ... change it to read: > > CONDITION=`basename $CONDITION` > OUTFILE=RH_"$CONDITION".metric > > I didn't realize the basename step should have preceded the OUTFILE > definition until I had already hit send. > > The quotes around $CONDITION are needed due to the RH_ preceding the > variable name. > > But that error suggests your actual column names do not match the volume > names exactly. For example, might they be preceded by "AFM " or "MFM " or > something like that? Looking at your actual metric file will help me > pinpoint the problem. > > Donna > > > On 04/01/2010 06:20 AM, Julia Bender wrote: >> Hi Donna, >> >> yes, you're right, that's exactly what I want. Unfortunately the script >> you've sent me doesnt' go through and I don't know why. I did: >> >> for CONDITION in `ls /mrt/Visac/*Visac/stats/*Visac_fullGLM/c*.nii` >> do >> OUTFILE=RH_$CONDITION.metric >> CONDITION=`basename $CONDITION` >> ENTRIES="" >> for METRIC in `ls >> /mrt/Visac/group_metrics/Visac_fullGLM/deformed_RH_*Visac_beta.metric` >> do >> ENTRIES="$METRIC $CONDITION" >> done >> >> caret_command -metric-composite-identified-columns $OUTFILE $ENTRIES >> done >> >> I get: >> >> METRIC COMPOSITE IDENTIFIED COLUMNS ERROR: ERROR column name/number >> cCue_EndoLeft.nii not found in file deformed_RH_02Visac_beta.metric >> >> >> METRIC COMPOSITE IDENTIFIED COLUMNS ERROR: ERROR column name/number >> cCue_EndoRight.nii not found in file deformed_RH_02Visac_beta.metric >> >> >> METRIC COMPOSITE IDENTIFIED COLUMNS ERROR: ERROR column name/number >> cCue_ExoLeft.nii not found in file deformed_RH_02Visac_beta.metric >> >> >> METRIC COMPOSITE IDENTIFIED COLUMNS ERROR: ERROR column name/number >> cCue_ExoRight.nii not found in file deformed_RH_02Visac_beta.metric >> >> >> METRIC COMPOSITE IDENTIFIED COLUMNS ERROR: ERROR column name/number >> cCue_EndoLeft.nii not found in file deformed_RH_02Visac_beta.metric >> >> >> METRIC COMPOSITE IDENTIFIED COLUMNS ERROR: ERROR column name/number >> cCue_EndoRight.nii not found in file deformed_RH_02Visac_beta.metric >> >> >> METRIC COMPOSITE IDENTIFIED COLUMNS ERROR: ERROR column name/number >> cCue_ExoLeft.nii not found in file deformed_RH_02Visac_beta.metric >> >> >> METRIC COMPOSITE IDENTIFIED COLUMNS ERROR: ERROR column name/number >> cCue_ExoRight.nii not found in file deformed_RH_02Visac_beta.metric >> >> >> This is weird because both deformed_RH_01Visac* and deformed_RH_02Visac* >> are in the same folder, have the same permissions and the header info is >> the same (despite the sub# of course): >> : >> BeginHeader >> Caret-Version 5.613 >> Date 2010-03-30T14:22:43 >> comment Deformed from: RH_02Visac_beta.metric Deformed with: >> deformed_Human.02Visac.R.73730.deform_map >> encoding BINARY >> EndHeader >> tag-version 2 >> tag-number-of-nodes 73730 >> tag-number-of-columns 4 >> tag-title >> tag-column-name 0 cCue_EndoLeft.nii[1] >> tag-column-name 1 cCue_EndoRight.nii[1] >> tag-column-name 2 cCue_ExoLeft.nii[1] >> tag-column-name 3 cCue_ExoRight.nii[1] >> tag-column-comment 0 CARET v5.613 Mapped to surface: >> Human.02Visac.R.Fiducial.65561.coord Mapped from volume: >> cCue_EndoLeft.nii Subvolume: 0 Algorithm: Metric Enclosing Voxel >> intent: >> None intent_code: 0 intent_p1: 0.000 intent_p2: 0.000 >> intent_p3: >> 0.000 Date Mapped: 30.03.10 14:22 Deformed with: >> deformed_Human.02Visac.R.73730.deform_map >> tag-column-comment 1 CARET v5.613 Mapped to surface: >> Human.02Visac.R.Fiducial.65561.coord Mapped from volume: >> cCue_EndoRight.nii Subvolume: 0 Algorithm: Metric Enclosing >> Voxel intent: >> None intent_code: 0 intent_p1: 0.000 intent_p2: 0.000 >> intent_p3: >> 0.000 Date Mapped: 30.03.10 14:22 Deformed with: >> deformed_Human.02Visac.R.73730.deform_map >> tag-column-comment 2 CARET v5.613 Mapped to surface: >> Human.02Visac.R.Fiducial.65561.coord Mapped from volume: >> cCue_ExoLeft.nii Subvolume: 0 Algorithm: Metric Enclosing Voxel >> intent: >> None intent_code: 0 intent_p1: 0.000 intent_p2: 0.000 >> intent_p3: >> 0.000 Date Mapped: 30.03.10 14:22 Deformed with: >> deformed_Human.02Visac.R.73730.deform_map >> tag-column-comment 3 CARET v5.613 Mapped to surface: >> Human.02Visac.R.Fiducial.65561.coord Mapped from volume: >> cCue_ExoRight.nii Subvolume: 0 Algorithm: Metric Enclosing Voxel >> intent: >> None intent_code: 0 intent_p1: 0.000 intent_p2: 0.000 >> intent_p3: >> 0.000 Date Mapped: 30.03.10 14:22 Deformed with: >> deformed_Human.02Visac.R.73730.deform_map >> tag-column-study-meta-data 0 >> tag-column-study-meta-data 1 >> tag-column-study-meta-data 2 >> tag-column-study-meta-data 3 >> tag-column-color-mapping 0 -1.000000 1.000000 >> tag-column-color-mapping 1 -1.000000 1.000000 >> tag-column-color-mapping 2 -1.000000 1.000000 >> tag-column-color-mapping 3 -1.000000 1.000000 >> tag-column-threshold 0 0.000000 0.000000 >> tag-column-threshold 1 0.000000 0.000000 >> tag-column-threshold 2 0.000000 0.000000 >> tag-column-threshold 3 0.000000 0.000000 >> tag-column-average-threshold 0 0.000000 0.000000 >> tag-column-average-threshold 1 0.000000 0.000000 >> tag-column-average-threshold 2 0.000000 0.000000 >> tag-column-average-threshold 3 0.000000 0.000000 >> tag-BEGIN-DATA >> >> also I don't understand why I get the error message twice for every >> condition. I'm sorry this is so persistent... >> >> Thanks a lot, >> >> Julia >> >>> Julia, >>> >>> Okay, if I understand you correctly, deformed_RH_*.metric does NOT >>> >> contain a single column, but rather multiple columns for different >> conditions for the same subject. Thus, you can't use this: >> >>> COL_ENTRIES="$COL_ENTRIES `basename $EACHCOL` 1" >>> >>> ... because the " 1" means grab the first column. I suggested this, >>> >> thinking you had only a single column in your metric file, which appears >> to be not the case. >> >>> So, you need to get the column name exactly right, and evidently you >>> >> haven't. >> >>> Maybe instead you need: >>> >>> for CONDITION in `ls /mrt/Visac/*Visac/stats/*Visac_fullGLM/c*.nii` do >>> OUTFILE=my.$CONDITION.metric >>> CONDITION=`basename $CONDITION` >>> ENTRIES="" >>> for METRIC in `ls >>> /mrt/Visac/group_metrics/Visac_fullGLM/deformed_RH_*Visac_beta.metric` >>> do >>> ENTRIES="$METRIC $CONDITION" >>> done >>> caret_command -metric-composite-identified-columns $OUTFILE $ENTRIES >>> done >>> >>> Donna >>> >>> On 03/31/2010 09:57 AM, Julia Bender wrote: >>> >>>> Hi Donna, >>>> thanks for your help. `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 >>>>>> [email protected] >>>>>> http://brainvis.wustl.edu/mailman/listinfo/caret-users >>>>>> >>>>> _______________________________________________ >>>>> caret-users mailing list >>>>> [email protected] >>>>> 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 >>>> _______________________________________________ >>>> caret-users mailing list >>>> [email protected] >>>> http://brainvis.wustl.edu/mailman/listinfo/caret-users >>>> >>> _______________________________________________ >>> caret-users mailing list >>> [email protected] >>> 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 >> >> >> >> >> _______________________________________________ >> caret-users mailing list >> [email protected] >> http://brainvis.wustl.edu/mailman/listinfo/caret-users >> > > _______________________________________________ > caret-users mailing list > [email protected] > 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 _______________________________________________ caret-users mailing list [email protected] http://brainvis.wustl.edu/mailman/listinfo/caret-users
