History of AFNI updates  

|
March 18, 2021 09:19PM
Hi, Mrinmayi-

Just to check-- are you running a current apqc_make_tcsh.py on old afni_proc.py results (or, at least, afni_proc.py results from a version of AFNI from 2 years ago)? I don't know that everything will mix there, unfortunately. In general, I think you that there might have been some changes in the intervening years that make that difficult. The typical assumption is that the apqc_make_tcsh.py and afni_proc.py version come from the same (or similar) AFNI versions.

Once you have a computer set up for running AFNI, I think the only "extra" dependency that the Pythonic APQC HTML has is python's matplotlib (which, in python 2.7 might also require the "pillow" package to be able to make JPGs, oddly enough; in Python 3.*, this extra dependency doesn't seem to occur). And anymore, I would just consider matplotlib part of the AFNI install. Does that not exist on the server that you are using?

And one potential solution might be trying to first re-run the gen_ss_review_scripts.py that creates a dictionary of information about files in the results directory (output in a JSON file), which apqc_make_tcsh.py uses. This is done just before apqc_make_tcsh.py is called in the proc.* script output.

Can you try copying your full results folder for your present subject to a new dir called, like "test.results" or something (just so we don't mess up any files in your current output), and then put the following "redo_gen_and_apqc.tcsh" script into that same directory:
#!/bin/tcsh

# these 3 variables need to be filled in with subject-specific
# information
set subj      = sub-001 
set mot_limit = 0.3
set out_limit = 0.05

# -----------------------------------------------------------------------
# regenerate out*.json dictionary of values for APQC

gen_ss_review_scripts.py                                        \
    -mot_limit ${mot_limit} -out_limit ${out_limit}             \
    -exit0                                                      \
    -ss_review_dset out.ss_review.$subj.txt                     \
    -write_uvars_json out.ss_review_uvars.json

# not in AP proc script; this was added here to copy any existing QC
# directory to a backup "old" one
set pre_qc = `find . -maxdepth 1 -type d -name "QC*"`
if ( "${pre_qc}" != "" ) then
    set pre_qc_name = `echo ${pre_qc} | cut -b3-`
    set thedate = `date +%Y_%m_%d_%H_%M_%s`
    \mv ${pre_qc} old_${pre_qc_name}_${thedate}
endif

./@ss_review_basic |& tee out.ss_review.$subj.txt

# generate html ss review pages
# (akin to static images from running @ss_review_driver)
apqc_make_tcsh.py -review_style basic -subj_dir . \
    -uvar_json out.ss_review_uvars.json
tcsh @ss_review_html |& tee out.review_html
apqc_make_html.py -qc_dir QC_$subj
I think I have put the correct information for your subject here, based on your afni_proc.py command, but you would have to include the correct info for any subject in the future. Running this basically does the final steps of what afni_proc.py's proc.* script would do, with the addition of moving/backing-up any existing QC directory. The idea is to have a JSON file of infomation that should match the expectations of version of AFNI you are using the other programs being run here. If this script is put into the "test.results" directory, you can type "tcsh redo_gen_and_apqc.tcsh" and see if that generates all the APQC.

Please let me know how that goes.

--pt
Subject Author Posted

Error with generating HTML QC reports

mrinmayik March 18, 2021 07:31PM

Re: Error with generating HTML QC reports

ptaylor March 18, 2021 09:19PM

Re: Error with generating HTML QC reports

mrinmayik March 18, 2021 10:05PM

Re: Error with generating HTML QC reports

ptaylor March 18, 2021 10:26PM

Re: Error with generating HTML QC reports

rick reynolds March 18, 2021 11:28PM

Re: Error with generating HTML QC reports

mrinmayik March 19, 2021 12:13AM

Re: Error with generating HTML QC reports

ptaylor March 19, 2021 12:57PM

Re: Error with generating HTML QC reports

mrinmayik March 19, 2021 02:14PM