AFNI Message Board

History of AFNI updates  

|
April 22, 2021 08:39AM
Hi, Pawel-

The template is the trickiest part of the HTML generation, in the sense of moving your analysis around to different computers in stages (which I think is what has caused your issue here). Every other piece of information needed to make the HTML is in the *.results directory together---so as long as you move your full *.results directory, you could re-generate the QC on any machine, *except* for the template, which will often have a different path.

The way the QC scripting tries to get around this badness is as well as it can---if you look near the top of the @ss_review_html script, which creates the QC images, you will see the "Top level: find main dset" section. This first tries to see if the template dset exists at the place specified by the full path of whatever is in the template variable; if that fails (e.g., if you have moved systems), it will try to use "@FindAfniDsetPath" on just the template name to find it on whatever this new system is (which includes the current directory, your AFNI_SUPP_ATLAS_DIR, AFNI_GLOBAL_SESSION, AFNI_ATLAS_PATH and AFNI_PLUGINPATH); if *that* fails to find the dset in any of those locations, then it has no idea where to look and rightfully gives up. (Or at least that is the way it is supposed to work---if your template of interest happens to be in one of those secondarily-checked locations on your system, and yet this is failing, please let me know!)

So, to be able to move around on different systems, if you have your template of choice in one of those special locations (AFNI_GLOBAL_SESSION is where I have mine, typically), then you should be OK.

If you were wondering how the APQC got the name+location of your template anyways, indeed it is not quite a straightforward process. If you look toward the end of your afni_proc.py-generated proc* script, you will typically see these two sections:
auto block: generate review scripts
auto block: finalize
The first runs gen_ss_review_scripts.py to go through and "figure out" (and yes, some of the internal logics are nearly consciousness-worthy) various pieces of information, which get stored in the out.ss_review_uvars.json: a dictionary of possible known items, which is used to generate the QC. The second section is what then *generates* the QC script and puts everything together into the HTML.

And to answer your specific question of, "where does the template name come from?" the declassified answer from government sources is that gen_ss_review_scripts.py looks in the history output of one of your "-tlrc_NL_warped_dsets ..." from the initial AP command, and figures out the information from there. Magic!

If you want to re-run the APQC HTML generation (getting a new @ss_review_html and QC_*/ directory, with the old QC_*/ directory moved aside to old_QC_*_TIMESTAMP/, for recordkeeping), you can download this script that I made/use:
wget https://raw.githubusercontent.com/afni/afni/master/src/ptaylor/supplement/redo_apqc.tcsh

You can run it in a current *.results directory with no arguments, and it will regenerate the QC directory there. Or, you can run it with any number of *.results directories listed as arguments, and it will go to each and regenerate QC, such as:
tcsh redo_apqc.tcsh  RESULTS_DIR0  RESULTS_DIR1 RESULTS_DIR2 ...
This might be useful if you plop your template on your local machine into a special directory where @FindAfniDsetPath can find it.

I am not sure what this means, from your last post:
"But some other things were messed up from trying small bits at a time and this must have been a side effect."
... but hopefully the above sorts out the issue.

--pt



Edited 3 time(s). Last edit at 04/22/2021 08:45AM by ptaylor.
Subject Author Posted

QC not produced by afni_proc

Pawel April 21, 2021 05:38PM

Re: QC not produced by afni_proc

ptaylor April 21, 2021 07:51PM

Re: QC not produced by afni_proc

Pawel April 21, 2021 11:33PM

Re: QC not produced by afni_proc

ptaylor April 22, 2021 08:39AM

Re: QC not produced by afni_proc

Pawel April 22, 2021 10:08AM

Re: QC not produced by afni_proc

ptaylor April 22, 2021 11:06AM

Re: QC not produced by afni_proc

Pawel April 22, 2021 11:29AM

Re: QC not produced by afni_proc

ptaylor April 22, 2021 11:44AM

Re: QC not produced by afni_proc

Pawel April 22, 2021 12:13PM

Re: QC not produced by afni_proc

ptaylor April 22, 2021 12:26PM

Re: QC not produced by afni_proc

Pawel April 22, 2021 12:32PM

Re: QC not produced by afni_proc

ptaylor April 22, 2021 12:42PM



Sorry, only registered users may post in this forum.

Click here to login