|
Size: 4185
Comment:
|
Size: 10173
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 1: | Line 1: |
| #acl JenniPacheco:read,write,delete,revert | #acl JenniPacheco:read,write,delete,revert BradDickerson:read,write,delete,revert DavidSalat:read,write,delete,revert VasanthPappu:read,write,delete,revert StephanieLee:read,write,delete,revert AkramBakkour:read,write,delete,revert == STATUS == {{{ scripts are all here: /autofs/space/tensor_017/users/jpacheco/QAtools * they should all be working now. To-Do: * figure out how to make an aseg look up table. * check group stats scripts. Things I've done: * I've created the pages ReconChecker and QAnotepad which will be the only place that full usage options for these scripts will be, eventually. * VP added 3 scripts to the data_checker directory: gnicv, gparcvalnorm, gparcmeannorm. Now the recon_all_aseg_outlier_checker now compares and looks for outliers after the segmentation volumes have been corrected for ICV, per David's suggestion * add a flag for -noasegoutlier - DONE by vp on 9/28/06 * make version checker scripts output to the same log file as recon_checker - DONE by jp on 9/29/06 * figure out a better way to define RECON_CHECKER_SCRIPTS and scriptDirs....INSTEAD, set QA_SCRIPTS to be the QAtools directory, and then within the scripts set RECON_CHECKER_SCRIPTS to be $QA_SCRIPTS/data_checker/ - DONE by jp 10/12/06 * add greconversion and greconversions to ALWAYS run first when the recon-checker is run - DONE by jp on 09/29/06 * -outputfileorder appears to not work. - DONE by vp 10/10/06 * i think i can fix the snapshot script to make it run faster. - DONE by jp 10/12/06 }}} |
| Line 4: | Line 30: |
*QANotepad *Recon Checker == QA Notepad == The QA Notepad program allows researchers to quickly take concise notes on subject or data derived from subjects in an organized, consistent manner. It is fully customizable and will work on an individual subject as well as a group of subjects.[[BR]] #The program is located in the folder ~dkoh, and is named QAnotepad. The source files are located in ~dkoh/QAstream. [[BR]] QA Notepad outputs text files with the extension .qa (unless you use the --noappend option). ==== The options for QA Notepad are: ==== {{{ -h, --help: displays a help message -f, --file <filename>: name of output file (default: QAnotes) -s, --subj <subject1> <subject2> ... : enters a list of subjects to choose from when recording data. --subjfile <subject file>: specifies a file with a list of subjects. -u, --user <username>: name of user. -c, --config <config file>: input config file to customize interface It is required to enter a custom output filename if you use this option. --noappend: ".qa" will not be appended to the filename. --dbupdate: if this flag is set, QAnotepad will automatically update the memage database via ~dkoh/scripts/perl/load_QA.pl. }}} If you already have a list of the subjects you'll be editing, you can enter that list into QA Notepad through the '''-s''' or '''--subj''' option. Alternatively, you can create a file with a list of subjects, and pass the filename in through the option '''--subjfile'''. ==== Using Config Files ==== You can customize the options in QA Notepad by using config files. The config file should be formatted with the option header in the first column, followed by the desired options. The option header will not appear unless it has at least one option. Here's an example config file. To pass in the config file, use the '''-c''' or '''--config''' option. If you use a config file, you must also specify an output file name with the '''-f''' or '''--file''' option. example.cfg: {{{ Reoriented Yes No Realigned Yes No Manual_Edits None A_Few Lots Automatic_Segmentation Good Bad Corrected Good_For_Vol }}} This would create a panel with four buttons: Reoriented, Realigned, Manual_Edits, and Automatic_Segmentation. If you clicked on Automatic_Segmentation, you would get a new window with the options: Good, Bad, Corrected, Good_For_Vol. The underscores in place of spaces are mandatory, as the program separates options with spaces and won't be able to tell the difference. If you want to have a free text field as an option for what to save, enter "$freetext" as an option after one of the option headers, like so: {{{ Region_Edited Hippocampus Amygdala $freetext }}} If you want to have a custom title for your window, just put the following text on it's own line: "$title My Title Here". ==== Automatic Database Updates ==== If you use the flag '''--dbupdate''' with the standard configuration of QA Notepad, it will automatically update the memage database to match your file. It will only update the subjects in your file that already exist in the database. It does so via the perl script ''load_QA.pl'', located at ''~dkoh/scripts/perl/load_QA.pl''. Updating Custom Configurations If you want to have your custom configuration updated in the database, first, create a procedure with User Defined Select data that matches your custom configuration. Then, determine your procedure's id number. You can do this from one of two places. From the page where you edit the steps of your procedure, if you look at the url, there should be a part after the ? which says pprocedure=NUMBER. That number is your procedure's id. You can also find this from the page on which you edit the subject. Once you have your procedure id, put this on its own line in your config file: $procedure_id ID Where ID is the procedure id that you found earlier. If you don't do this step, you will get an error message. |
[[TableOfContents]] QA mini-intro coming soon... == To check the output of one reconned subject == First you'll need to properly set your SUBJECTS_DIR. Also you'll need to set your QA_SCRIPTS directory. This should be the directory that you downloaded the QAtools directory. For our example here QAtools is in /space/tensor/17/users/jpacheco/QAtools. {{{ setenv QA_SCRIPTS /space/tensor/17/users/jpacheco/QAtools }}} Now, from your SUBJECTS_DIR you are ready to run: {{{ $QA_SCRIPTS/data_checker/recon_checker -nocheckasegoutliers -s bert -o QAsnap.html }}} where {{{bert}}} is your subject ID and {{{QAsnap.html}}} is the name of the output html file that you want to create.[[BR]] For complete usage instructions please see the ReconChecker page. [[BR]] ----- '''What it does: '''[[BR]] *checks the version of FreeSurfer used to process this subject *checks the order of the output files to be sure that they were created in the correct order *checks the {{{recon-all-status.log}}} file to be sure each step was run *takes snapshots of the talairach, skullstrip, surfaces, curvature, and parcellations *outputs two different log files and an html file (called QAsnap.html in this example) with the snapshots ''**NOTE: while it takes the snapshots tkmedit and tksurfer will flash up on the screen. You do not need to do anything, the snap shots are taken automatically. To ensure good quality snapshots make sure there are no other windows over the tkmedit/tksurfer windows.'' ----- === Outputs === There will be two log files output into your subjects scripts directory: {{{ ls bert/scripts recon_checker.bert.details.log recon_checker.bert.summary.log }}} The {{{recon_checker.bert.summary.log}}} contains a summary of the status of that subject: {{{ ------------------------------------------------------------- Running recon_checker on: Thu Oct 12 14:51:24 EDT 2006 Checking Last Version Used: /usr/local/freesurfer/dev/bin/recon-all In output_file_checker checking if output file order file is set... output_file_order_file not specified, using default order check to see if all files exist... bert outputfiles_OK In recon_all_status_log_checker bert COMPLETE }}} This subject was run most recently using the dev version of !FreeSurfer, all of the output files have been created in the correct order, and all the steps have been run. Another example of this log file is: {{{ ------------------------------------------------------------- Running recon_checker on: Thu Oct 12 14:54:24 EDT 2006 Checking Last Version Used: /space/dijon/28/users/jpacheco/freesurfer_stable3_centos64//bin/recon-all In output_file_checker checking if output file order file is set... output_file_order_file not specified, using default order check to see if all files exist... bert outputfiles_NOTOK In recon_all_status_log_checker bert STEPS_MISSING }}} This subject was run most recently using a version of !FreeSurfer located /space/dijon/28/users/jpacheco/freesurfer_stable3_centos64, the output files are not in the ok order, and there are steps missing from the processing stream. The {{{recon_checker.bert.details.log}}} will give more details as to what might be wrong if there are problems. For the second subject above, with steps missing, the {{{recon_checker.bert.details.log}}} looks like: {{{ ------------------------------------------------------------- Running recon_checker on: Thu Oct 12 14:54:24 EDT 2006 Checking Last Version Used: /space/dijon/28/users/jpacheco/freesurfer_stable3_centos64//bin/recon-all Checking ALL Versions Used: /usr/local/freesurfer/dev/bin/recon-all, /space/dijon/28/users/jpacheco/freesurfer_stable3_centos64//bin/recon-all, In output_file_checker SUBJECTS_DIR is /autofs/space/tensor_014/users/jenni checking if output file order file is set... output_file_order_file not specified, using default order realOrder_plus1 is 72 /autofs/space/tensor_014/users/bert/mri/orig/001.mgz last modified 2005-11-02 12:53:09.000000000 -0500 /autofs/space/tensor_014/users/bert/mri/orig/002.mgz last modified 2005-11-02 12:53:56.000000000 -0500 ERROR: order is not commmon order: stopped at mri/transforms/talairach.xfm, should be mri/rawavg.mgz ... real order: common order: .......... ......... .......... ......... .......... ......... /autofs/space/tensor_014/users/bert/mri/orig/001.mgz /autofs/space/tensor_014/users/bert/mri/orig/001.mgz /autofs/space/tensor_014/users/bert/mri/orig/002.mgz /autofs/space/tensor_014/users/bert/mri/orig/002.mgz mri/transforms/talairach.xfm mri/rawavg.mgz mri/rawavg.mgz mri/orig.mgz mri/orig.mgz mri/nu.mgz mri/nu.mgz mri/transforms/talairach.auto.xfm mri/transforms/talairach.auto.xfm mri/transforms/talairach.xfm .......... ......... .......... ......... .......... ......... bert outputfiles_NOTOK In recon_all_status_log_checker bert STEPS_MISSING Expected to see the following steps before #@# Tessellate rh Wed Jun 7 14:43:02 EDT 2006 in the recon-all-status.log file (line # 98): --> Tessellate lh --> Smooth1 lh --> Inflation1 lh --> QSphere lh --> Fix Topology lh --> Make Final Surf lh --> Smooth2 lh --> Inflation2 lh --> Cortical ribbon mask lh --> Sphere lh --> Surf Reg lh --> Contra Surf Reg lh --> AvgCurv lh --> Cortical Parc lh --> Parcellation Stats lh --> Cortical Parc 2 lh --> Parcellation Stats 2 lh However, these LH processes were executed previously. Perhaps the RH output was modified and re-run without re-running the LH processes. }}} ''**NOTE: a portion of this log file was excluded for simplification of display purposes. Those lines included a list of the full paths to the 71 files being checked.''[[BR]] This log shows that the dev version of !FreeSurfer was used for a previous set of processing, but most recently the private version was used. The output from the file order checking shows that the rawavg.mgz file was created after the transforms/talairach.xfm file but it was supposed to be created first. The file order checking was stopped there. The recon-all-status.log checker shows that all the LH processes are out of order. It offers a hint of explanation, saying that the RH may have been re-run without the LH since the LH processes were completed earlier. For this subject that was the case. Lastly, an html file was created, QAsnap.html, and can be viewed in any standard browser. You can open it from the command line {{{ mozilla $SUBJECTS_DIR/QAsnap.html }}} or put the path to your file directly in the browser. This will show you a web report of all the subjects you just ran. In our case we've only run one subject so we've only got one subject in our list[[BR]] attachment:browser5.jpg When you click on ''bert snapshots'' it will take you to a page with all the snapshots from that subject.[[BR]] attachment:browser4.jpg [[BR]] ''**NOTE: this shows just a portion of the snapshot output page, there are more snapshots if you scroll right and down.'' === Usage Recommendations === When you go through and check your outputs you can open the [wiki:Self:QAnotepad QAnotepad] to keep track of your observations. A simple comand line to open the QAnotepad is: {{{ $QA_SCRIPTS/QAnotepad -s <subject1> <subject2> ... }}} or, if you'd like to pass it your own config file then you can use: {{{ $QA_SCRIPTS/QAnotepad -s <subject1> <subject2> ... -c <config file> -f <output file name> }}} The [wiki:Self:QAnotepad QAnotepad] is a customizable tool that handles notes (both radio-button selections and free text) on various aspects of the !FreeSurfer output, for further usage options and explanations, including how to design your own config file, see the [wiki:Self:QAnotepad QAnotepad] wiki page. == To check the output of a group of reconned subjects == First you'll need to properly set your SUBJECTS_DIR. Also you'll need to set your QA_SCRIPTS directory. This should be the directory that you downloaded the QAtools directory. For our example here QAtools is in /space/tensor/17/users/jpacheco/QAtools. {{{ setenv QA_SCRIPTS /space/tensor/17/users/jpacheco/QAtools }}} The first step is to make a aseg outliers look up table. You can run this command to do that: {{{ }}} Once you have your look-up table you can run the command: {{{ }}} == To check the output of a group analysis == |
STATUS
scripts are all here: /autofs/space/tensor_017/users/jpacheco/QAtools * they should all be working now. To-Do: * figure out how to make an aseg look up table. * check group stats scripts. Things I've done: * I've created the pages ReconChecker and QAnotepad which will be the only place that full usage options for these scripts will be, eventually. * VP added 3 scripts to the data_checker directory: gnicv, gparcvalnorm, gparcmeannorm. Now the recon_all_aseg_outlier_checker now compares and looks for outliers after the segmentation volumes have been corrected for ICV, per David's suggestion * add a flag for -noasegoutlier - DONE by vp on 9/28/06 * make version checker scripts output to the same log file as recon_checker - DONE by jp on 9/29/06 * figure out a better way to define RECON_CHECKER_SCRIPTS and scriptDirs....INSTEAD, set QA_SCRIPTS to be the QAtools directory, and then within the scripts set RECON_CHECKER_SCRIPTS to be $QA_SCRIPTS/data_checker/ - DONE by jp 10/12/06 * add greconversion and greconversions to ALWAYS run first when the recon-checker is run - DONE by jp on 09/29/06 * -outputfileorder appears to not work. - DONE by vp 10/10/06 * i think i can fix the snapshot script to make it run faster. - DONE by jp 10/12/06
FreeSurfer QA Tools
QA mini-intro coming soon...
To check the output of one reconned subject
First you'll need to properly set your SUBJECTS_DIR. Also you'll need to set your QA_SCRIPTS directory. This should be the directory that you downloaded the QAtools directory. For our example here QAtools is in /space/tensor/17/users/jpacheco/QAtools.
setenv QA_SCRIPTS /space/tensor/17/users/jpacheco/QAtools
Now, from your SUBJECTS_DIR you are ready to run:
$QA_SCRIPTS/data_checker/recon_checker -nocheckasegoutliers -s bert -o QAsnap.html
where bert is your subject ID and QAsnap.html is the name of the output html file that you want to create.BR For complete usage instructions please see the ReconChecker page. BR
What it does: BR
checks the version of FreeSurfer used to process this subject
- checks the order of the output files to be sure that they were created in the correct order
checks the recon-all-status.log file to be sure each step was run
- takes snapshots of the talairach, skullstrip, surfaces, curvature, and parcellations
- outputs two different log files and an html file (called QAsnap.html in this example) with the snapshots
**NOTE: while it takes the snapshots tkmedit and tksurfer will flash up on the screen. You do not need to do anything, the snap shots are taken automatically. To ensure good quality snapshots make sure there are no other windows over the tkmedit/tksurfer windows.
Outputs
There will be two log files output into your subjects scripts directory:
ls bert/scripts recon_checker.bert.details.log recon_checker.bert.summary.log
The recon_checker.bert.summary.log contains a summary of the status of that subject:
------------------------------------------------------------- Running recon_checker on: Thu Oct 12 14:51:24 EDT 2006 Checking Last Version Used: /usr/local/freesurfer/dev/bin/recon-all In output_file_checker checking if output file order file is set... output_file_order_file not specified, using default order check to see if all files exist... bert outputfiles_OK In recon_all_status_log_checker bert COMPLETE
This subject was run most recently using the dev version of FreeSurfer, all of the output files have been created in the correct order, and all the steps have been run. Another example of this log file is:
------------------------------------------------------------- Running recon_checker on: Thu Oct 12 14:54:24 EDT 2006 Checking Last Version Used: /space/dijon/28/users/jpacheco/freesurfer_stable3_centos64//bin/recon-all In output_file_checker checking if output file order file is set... output_file_order_file not specified, using default order check to see if all files exist... bert outputfiles_NOTOK In recon_all_status_log_checker bert STEPS_MISSING
This subject was run most recently using a version of FreeSurfer located /space/dijon/28/users/jpacheco/freesurfer_stable3_centos64, the output files are not in the ok order, and there are steps missing from the processing stream.
The recon_checker.bert.details.log will give more details as to what might be wrong if there are problems. For the second subject above, with steps missing, the recon_checker.bert.details.log looks like:
------------------------------------------------------------- Running recon_checker on: Thu Oct 12 14:54:24 EDT 2006 Checking Last Version Used: /space/dijon/28/users/jpacheco/freesurfer_stable3_centos64//bin/recon-all Checking ALL Versions Used: /usr/local/freesurfer/dev/bin/recon-all, /space/dijon/28/users/jpacheco/freesurfer_stable3_centos64//bin/recon-all, In output_file_checker SUBJECTS_DIR is /autofs/space/tensor_014/users/jenni checking if output file order file is set... output_file_order_file not specified, using default order realOrder_plus1 is 72 /autofs/space/tensor_014/users/bert/mri/orig/001.mgz last modified 2005-11-02 12:53:09.000000000 -0500 /autofs/space/tensor_014/users/bert/mri/orig/002.mgz last modified 2005-11-02 12:53:56.000000000 -0500 ERROR: order is not commmon order: stopped at mri/transforms/talairach.xfm, should be mri/rawavg.mgz ... real order: common order: .......... ......... .......... ......... .......... ......... /autofs/space/tensor_014/users/bert/mri/orig/001.mgz /autofs/space/tensor_014/users/bert/mri/orig/001.mgz /autofs/space/tensor_014/users/bert/mri/orig/002.mgz /autofs/space/tensor_014/users/bert/mri/orig/002.mgz mri/transforms/talairach.xfm mri/rawavg.mgz mri/rawavg.mgz mri/orig.mgz mri/orig.mgz mri/nu.mgz mri/nu.mgz mri/transforms/talairach.auto.xfm mri/transforms/talairach.auto.xfm mri/transforms/talairach.xfm .......... ......... .......... ......... .......... ......... bert outputfiles_NOTOK In recon_all_status_log_checker bert STEPS_MISSING Expected to see the following steps before #@# Tessellate rh Wed Jun 7 14:43:02 EDT 2006 in the recon-all-status.log file (line # 98): --> Tessellate lh --> Smooth1 lh --> Inflation1 lh --> QSphere lh --> Fix Topology lh --> Make Final Surf lh --> Smooth2 lh --> Inflation2 lh --> Cortical ribbon mask lh --> Sphere lh --> Surf Reg lh --> Contra Surf Reg lh --> AvgCurv lh --> Cortical Parc lh --> Parcellation Stats lh --> Cortical Parc 2 lh --> Parcellation Stats 2 lh However, these LH processes were executed previously. Perhaps the RH output was modified and re-run without re-running the LH processes.
**NOTE: a portion of this log file was excluded for simplification of display purposes. Those lines included a list of the full paths to the 71 files being checked.BR
This log shows that the dev version of FreeSurfer was used for a previous set of processing, but most recently the private version was used. The output from the file order checking shows that the rawavg.mgz file was created after the transforms/talairach.xfm file but it was supposed to be created first. The file order checking was stopped there. The recon-all-status.log checker shows that all the LH processes are out of order. It offers a hint of explanation, saying that the RH may have been re-run without the LH since the LH processes were completed earlier. For this subject that was the case.
Lastly, an html file was created, QAsnap.html, and can be viewed in any standard browser. You can open it from the command line
mozilla $SUBJECTS_DIR/QAsnap.html
or put the path to your file directly in the browser. This will show you a web report of all the subjects you just ran. In our case we've only run one subject so we've only got one subject in our listBR attachment:browser5.jpg
When you click on bert snapshots it will take you to a page with all the snapshots from that subject.BR attachment:browser4.jpg BR **NOTE: this shows just a portion of the snapshot output page, there are more snapshots if you scroll right and down.
Usage Recommendations
When you go through and check your outputs you can open the [wiki:QAnotepad QAnotepad] to keep track of your observations. A simple comand line to open the QAnotepad is:
$QA_SCRIPTS/QAnotepad -s <subject1> <subject2> ...
or, if you'd like to pass it your own config file then you can use:
$QA_SCRIPTS/QAnotepad -s <subject1> <subject2> ... -c <config file> -f <output file name>
The [wiki:QAnotepad QAnotepad] is a customizable tool that handles notes (both radio-button selections and free text) on various aspects of the FreeSurfer output, for further usage options and explanations, including how to design your own config file, see the [wiki:QAnotepad QAnotepad] wiki page.
To check the output of a group of reconned subjects
First you'll need to properly set your SUBJECTS_DIR. Also you'll need to set your QA_SCRIPTS directory. This should be the directory that you downloaded the QAtools directory. For our example here QAtools is in /space/tensor/17/users/jpacheco/QAtools.
setenv QA_SCRIPTS /space/tensor/17/users/jpacheco/QAtools
The first step is to make a aseg outliers look up table. You can run this command to do that:
Once you have your look-up table you can run the command:
