|Deletions are marked like this.||Additions are marked like this.|
|Line 30:||Line 30:|
|/space/tensor/17/users/jpacheco/QAtools/data_checker/recon_checker -nocheckasegoutliers -s bert -o QAsnap.html||[wiki:Self:ReconChecker /space/tensor/17/users/jpacheco/QAtools/data_checker/recon_checker} -nocheckasegoutliers -s bert -o QAsnap.html|
|Line 33:||Line 33:|
|Line 39:||Line 40:|
|*outputs two different log files and an html file with the snapshots|
|Line 41:||Line 43:|
|Line 46:||Line 48:|
|== To check the output ofa group analysis ==||== To check the output of a group analysis ==|
|Line 51:||Line 53:|
|#The program is located in the folder ~dkoh, and is named QAnotepad. The source files are located in ~dkoh/QAstream. [[BR]]|
scripts are all here: /autofs/space/tensor_017/users/jpacheco/QAtools * they should all be working now. To-Do: * 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 * add greconversion and greconversions to ALWAYS run first when the recon-checker is run - DONE by jp on 09/29/06 * i think i can fix the snapshot script to make it run faster. 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.
FreeSurfer QA Tools
QA mini-intro coming soon...
To check the output of one reconned subject
With your SUBJECTS_DIR set, run the following command from your SUBJECTS_DIR:
[wiki:Self:ReconChecker /space/tensor/17/users/jpacheco/QAtools/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
What it does: BR
checks the version of FreeSurfer used to process this subject
checks the recon-all-status.log file to be sure each step was run
- checks the order of the output files to be sure that they were created in the correct order
- takes snapshots of the talairach, skullstrip, surfaces, curvature, and parcellations
- outputs two different log files and an html file 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.
To check the output of a group of reconned subjects
To check the output of a group analysis
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 QA Notepad outputs text files with the extension .qa (unless you use the --noappend option).
QA Notepad options
-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.
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. BR attachment:QAnotepad_example.jpg BR
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
This will output a simple text file, that is tab delimited and contains all the information that you entered for each subject.
Subject User Reoriented Realigned Manual_Edits Automatic_Segmentation bert jpacheco Yes Yes A_Few Good_For_Vol your own text here!! subject2 jpacheco No Yes None Good_For_Vol Hippocampus
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.
The recon checker will run for one subject, or a group of subjects, and performs a relatively thorough QA check on the outputs of a FreeSurfer cortical reconstruction. It will verify the FreeSurfer version used on each subject and check for the existance and order of all the files that should have been created in the recon process. It will identify any outliers from subcortical segmentation volumes. It will then take snapshots of your recon and store them in a specified output file, allowing you to see an html report of all the subjects you have run.
Recon Checker Options
-sf <subject file>: specify a file with a list of subjects. May be used instead of -s or -subjid to specify subjects. -outputfileorderfile <file order file>: specify a file which lists the proper order of the output files. -ignore <process1 to ignore> <process2 to ignore> ...: specify processes to ignore -detailed: take a more detailed set of snapshots -overwrite: take all snapshots, even if there are previously taken ones. -genoutputorderfile: generate the file order from the first subject. -checkstatuslog -nocheckstatuslog -checkoutputfiles -nocheckoutputfiles -takesnapshots -notakesnapshots -snapshotsonly: control program execution
Check FreeSurfer Versions
Check Status Log
This will go through your subjects scripts/recon-all-status.log and verify that you've run the steps in the correct order. If you have it will display a message like this:
In recon_all_status_log_checker subject1 COMPLETE
If there is a problem with the order of steps in the recon-all-status.log it will display a message like this:
In recon_all_status_log_checker subject2 STEPS_MISSING
It will also output where the mishap is and perhaps offer some further information about what was run:
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.
This is a quick way to check whether everything was run in an appropriate order or not.
Check Output Files
fails because no aseg look up option
Identify Aseg Outliers
where is the aseg mean look up table. can we add a flag for these options.