11.4.1. Overview for APQC¶
afni_proc.py allows researchers to specify their desired steps and
options for FMRI processing. The program is designed to be flexible,
relatively compact, and to help researchers organize their
processing. It is easy to share with others and to modify as
processing needs demand it. It builds a processing script based on
the user’s options, which is commented and can be
checked/read/studied/etc. Several convenience features are taken care
of automatically, such as concatenating transforms (e.g., within EPI
for motion correction, EPI-> anat, anat -> standard space).
afni_proc.py tries to help researchers check their
processed data. For example, many intermediate data sets are kept,
and several helper scripts are made to show users their data:
show basic QC measures (e.g., max motion, number of censored time points, TSNR), in text
a script that includes: * “driving” the AFNI GUI to show users their data interactively; * opening up 1dplots to look at motion, censoring, etc.; * showing warning message from processing in the terminal. ... and all of that is commented (!).
- @ss_review_html (new!)
a command that is automatically run at the end of
afni_proc.pyprocessing to make an HTML document full of images+quantities showing information from the processing (combining data from
@ss_review_driverwith other stuff, too).
Here, describe the usage of the third QC output: the HTML form of APQC.
The modern AFNI’s
afni_proc.py includes the following option:
-html_review_style STYLE : specify generation method for HTML review e.g. -html_review_style pythonic default: -html_review_style basic
where STYLE can be one of the following values:
none : no HTML review pages basic : static - time graph images generated by 1dplot pythonic : static - time graph images generated in python
afni_proc.py will implement the
basic form of the
review style. Therefore, with no intervention by the user, an HTML
doc of QC information will be generated whenever processing your FMRI
A related, but slightly prettier, form of QC review is generated with
pythonic option. The only cost is that the user must have
Python (version 2.7 or higher) and the matplotlib module. Because
pythonic form of QC review is also slightly more informative,
we will just focus on this form here.
With the HTML review style flagged,
afni_proc.py will include
something like the following few commands after it has finished
processing data sets:
# generate html ss review pages # (akin to static images from running @ss_review_driver) apqc_make_tcsh.py -review_style pythonic -subj_dir . \ -uvar_json out.ss_review_uvars.json tcsh @ss_review_html apqc_make_html.py -qc_dir QC_$subj
$subj holds the name of your subject in the processing
script. Again, you, Dear Reader,
don’t have to do anything with these commands– they will be
executed on your behalf automatically. But if you ever want to rerun
them, here they be.
After those commands are executed, you will be prompted to finally
take action, as
afni_proc.py shows you something like the
following to open up the freshly created HTML QC doc:
afni_open -b $subj.results/QC_$subj/index.html
$subj.results is your directory containing all
QC_$subj contains all the APQC results;
and “index.html” is the focal document that will be opened. The
$subjss will be replaced with your subject name (such as
“sub-001” or “sub-753”). The
afni_open command will select a
browser on your system (e.g., firefox) for opening up the file
The contents and functionality of this APQC document are explored on the subsequent pages here.
As described in the subsequent pages, both ratings and comments of QC steps (generally referred to throughout as “QC blocks”), as well as a final summary evaluation can be stored in the HTML documentation. This can be useful for recording, for instance, why you thought a data set was bad, or a question to ask your boss, or a recipe idea for quiche.
The one downside with having an HTML documentation is that saving changes goes through the browser, and browsers in general are hyper-worried about security and hacks. Because of this, it can’t know convenient features about your computer system like file structure, even when running locally and looking at local files. Therefore, you will have to walk through your file system to the location of your file. If you are editing several QC files in a row and saving ratings/comments, then hopefully at least the files are near each other in the file system, and your browser will open up in the previous directory location, hence shortening the path for your next file save.
Additionally, you will likely want to turn off the feature of your browser to automatically download files to a single place, such as “Downloads” or “Telechargements”.
Those are just some practical considerations and constraints at present, until browsers change.
Finally, we note that the APQC HTML page navigation has been tested most strongly during development with the firefox browser. It should play nicely with any modern, mainstream browser (e.g., Chrome, Explorer, Safari, etc.), but quirks may occur. If you come across any difficulties, please let us know via the Message Board so we can try to address them (however, please note that some issues may not be resolvable except by using a different browser).