No BOLD components detected! Please check data and results!

Dear experts,
@e.urunuela @dowdlelt

I am seeking assistance with a persistent error occurring in a subset of subjects during our task-based fMRI preprocessing pipeline using AFNI’s afni_proc.py and multi-echo TE-dependence analysis (tedana).

The Problem

For a number of subjects, the tedana component returns the critical warning/error: “No BOLD components detected!”

  • Other subjects run successfully without this issue.
  • I have verified that the subjects with the error do not exhibit unusually high motion compared to the successful subjects.

Acquisition Details

  • Field Strength: 7 Tesla
  • Voxel Size: 1.5 mm isotropic
  • Analysis: Task-based fMRI

Processing Details

I am calling tedana via afni_proc.py using the following option:
-combine_method m_tedana

The resulting generated tedana command, which is failing for these subjects, is:
tedana -d ${d1} ${d2} ${d3} -e 14.0 37.87 61.74 --mask ${mask_epi_anat} --maxit 5000 --tedpca kundu-stabilize --fittype curvefit --tree meica --n-threads 30 --ica_method robustica --n_robust_runs 30 --maxrestart 500 --lowmem --gscontrol mir gsr --out-dir tedana_r01 --convention orig

Troubleshooting Attempted

I have tried the following variations, but the error persists for the specific subset of subjects:

  • Changing --tedpca options to “AIC” and “KIC”.
  • Changing --tree to “tedana_orig”.

Example Data

I uploaded an example run (and BIDS .json for the echo1 dataset)that exhibits this error here: https://www.dropbox.com/scl/fo/439bttcbln35ywk9xlnqo/AMIVcj6P4OIFi_uRhfndCEM?rlkey=m0ti3pqf7t1ws0nssq9kw83fr&st=vvsj7q69&dl=0

Here is the afni_proc.py command:

afni_proc.py -subj_id 816 -scr_overwrite 
-dsets_me_run ${run1echo1} ${run1echo2} ${run1echo3}                                                                 
-dsets_me_run ${run2echo1} ${run2echo2} ${run2echo3}                                                                                                                
-dsets_me_run ${run3echo1} ${run3echo2} ${run3echo3}                                                                                                             -dsets_me_run ${run4echo1} ${run4echo2} ${run4echo3}
 -echo_times 14.0 37.87 61.74 -out_dir   ${outdir}                                                                                        
-blocks despike tshift align tlrc volreg mask combine blur scale                                                                
regress -blip_forward_dset ${AP} 
-blip_reverse_dset ${PA}                                                                                                                                                    -blur_size 3 
-blur_in_mask yes 
-copy_anat  T1_bc_SS.nii.gz  -anat_has_skull no                                                                                                                                           -mask_opts_automask -clfrac 0.3 -dilate 1 
-mask_epi_anat yes
-tshift_opts_ts -tpattern @SliceTiming.1D                                                                                   -align_unifize_epi local 
-align_opts_aea -cost lpc+ZZ -giant_move -check_flip 
-epi_strip 3dAutomask 
-tlrc_base MNI152_2009_template_SSW.nii.gz \
-tlrc_NL_warp \
-tlrc_NL_warped_dsets anatQQ.816.nii \                                                                                                                                           anatQQ.816.aff12.1D \
anatQQ.816_WARP.nii \
-volreg_align_to MIN_OUTLIER -volreg_align_e2a -volreg_tlrc_warp \                                                         -regress_apply_mot_types demean deriv -regress_motion_per_run \                                                               -regress_censor_motion 0.3 -regress_censor_outliers 0.15 \ 
-regress_stim_times
{regress options}                                                               
-combine_method m_tedana  
-combine_tedana_path /hpc/users/chowda26/.local/bin/tedana 
-combine_opts_tedwrap -tedana_is_exec 
-combine_opts_tedana '--maxit  5000 --tedpca kundu-stabilize 
--fittype curvefit --tree meica --n-threads 30 
--ica_method robustica --n_robust_runs 30 
--maxrestart 500 --lowmem  --gscontrol {mir,gsr}' 

Any insight into why tedana might be failing to detect BOLD components only in this subset of 7T data would be greatly appreciated.

Thank you,
Avi

Hi, Avi-

I will defer to the tedana experts you referenced here for your main question of interest. I do have a couple quick comments about your afni_proc.py (AP) command, please see below.

Also, I put copies of your posted AP and tedana commands with some vertical alignment formatting for options, just to make it easier to read for myself and potentially others.

As a general question here, did this complete processing enough to create the APQC HTML report? I’m guessing perhaps not, if tedana failed during the combine block of processing. It might be worth running this participant’s data with just optimal combination (-combine_method OC) to get through processing and see if anything else is going awry in processing—too much motion, poor signal, artifact, alignment failing, or some other woe. (Note, several pieces to check are already in the results directory, but many haven’t been put together before regress, such as a total censor file. But you could go through those, too.)

And certainly, the others you pinged might be able to troubleshoot this tedana output more directly. Anyways, further notes and formatted commands below.

–pt


AP command, reformatted with vertical alignment:

afni_proc.py                                                                 \
    -subj_id                  816                                            \
    -scr_overwrite                                                           \
    -out_dir                  ${outdir}                                      \
    -dsets_me_run             ${run1echo1} ${run1echo2} ${run1echo3}         \
    -dsets_me_run             ${run2echo1} ${run2echo2} ${run2echo3}         \
    -dsets_me_run             ${run3echo1} ${run3echo2} ${run3echo3}         \
    -dsets_me_run             ${run4echo1} ${run4echo2} ${run4echo3}         \
    -echo_times               14.0 37.87 61.74                               \
    -copy_anat                T1_bc_SS.nii.gz                                \
    -anat_has_skull           no                                             \
    -blocks                   despike tshift align tlrc volreg mask combine  \
                              blur scale regress                             \
    -tshift_opts_ts           -tpattern @SliceTiming.1D                      \
    -blip_forward_dset        ${AP}                                          \
    -blip_reverse_dset        ${PA}                                          \
    -align_unifize_epi        local                                          \
    -align_opts_aea           -cost lpc+ZZ                                   \
                              -giant_move                                    \
                              -check_flip                                    \
                              -epi_strip 3dAutomask                          \
    -tlrc_base                MNI152_2009_template_SSW.nii.gz                \
    -tlrc_NL_warp                                                            \
    -tlrc_NL_warped_dsets     anatQQ.816.nii anatQQ.816.aff12.1D             \
                              anatQQ.816_WARP.nii                            \
    -volreg_align_to          MIN_OUTLIER                                    \
    -volreg_align_e2a                                                        \
    -volreg_tlrc_warp                                                        \
    -mask_opts_automask       -clfrac 0.3                                    \
                              -dilate 1                                      \
    -mask_epi_anat            yes                                            \
    -blur_size                3                                              \
    -blur_in_mask             yes                                            \
    -regress_apply_mot_types  demean deriv                                   \
    -regress_motion_per_run                                                  \
    -regress_censor_motion    0.3                                            \
    -regress_censor_outliers  0.15                                           \
    -regress_stim_times       {regress options}                              \
    -combine_method           m_tedana                                       \
    -combine_tedana_path      /hpc/users/chowda26/.local/bin/tedana          \
    -combine_opts_tedwrap     -tedana_is_exec                                \
    -combine_opts_tedana      '--maxit 5000 --tedpca kundu-stabilize --fittype curvefit --tree meica --n-threads 30 --ica_method robustica --n_robust_runs 30 --maxrestart 500 --lowmem --gscontrol {mir,gsr}'

One thing I noticed here after reformatting was that the {regress_options} argument appeared to be a shell variable that is missing a $ to the left of the first curly bracket. I am not sure if that is exactly what your code has, or whether that was something introduced when posting here, but that would be a problem with running the AP command.

Another thing I might note is that I’m not sure despiking would be recommended for task-based analysis, esp. with event related tasks (if that is what you have). A strong, short response could look like a spike, and then be inappropriately reduced prior to regression modeling.

Similarly, I’m not sure that for task analysis I would generally include this:

-regress_apply_mot_types  demean deriv

… because usally the deriv is added primarily for resting state analyses, as trying to remove a bit extra motion effect, if possible. For task-based, I don’t think that would be necessary, and it would reduce degrees of freedom unnecessarily. Esp. as you have ME-FMRI data to combine here, too.

For QC purposes, you might consider adding these options, to have additional useful outputs added to the APQC HTML (see here and here for more discussion/description of these):

-radial_correlate_blocks  tcat volreg regress
-volreg_compute_tsnr      yes
-regress_make_ideal_sum   sum_ideal.1D

Here is the tedana command reformatted a bit, as well.

tedana                                                                       \
    -d  ${d1} ${d2} ${d3}                                                    \
    -e  14.0 37.87 61.74                                                     \
    --mask     ${mask_epi_anat}                                              \
    --maxit    5000                                                          \
    --tedpca   kundu-stabilize                                               \
    --fittype  curvefit                                                      \
    --tree     meica                                                         \
    --n-threads   30                                                         \
    --ica_method  robustica                                                  \
    --n_robust_runs 30                                                       \
    --maxrestart  500                                                        \
    --lowmem                                                                 \
    --gscontrol   mir gsr                                                    \
    --out-dir     tedana_r01                                                 \
    --convention  orig                          

Thank you so much @ptaylor for your input and for reformatting the command.

To clarify: I didn’t want to copy-paste all the timing files here, so I just wrote {regress_options} as a placeholder—it is not an error in my actual script.

Regarding the “No bold components” warning: All of the subject runs where this warning appeared still fully completed processing. Even though no components were explicitly identified as BOLD, tedana proceeded by accepting components that were not categorized as BOLD but were also not rejected (i.e., the “accept” list).

I will try again with your recommended settings: -regress_apply_mot_types demean only and removing despiking from the block. However, I wanted to note that the regress option is usually applied after tedana, so I am unsure if that change will influence the tedana preprocessing steps.

Thank you, Avi

Hi, Avi-

OK, sounds good about the {regress_options} syntax there.

So, if that processing ran to completion, you should have the afni_proc.py QC HTML output, which even includes a button to jump to the tedana QC HTML pages from there. How do the various processing outputs look? Can you verify that alignment was all good, that there aren’t obvious issues apparent with the data, that motion is reasonable, etc.? Also, for the benefit of troubleshooting the tedana command, it might be worthwhile posting a screenshot of the tedana HTML page here, perhaps.

–pt

Yes, I do have the QC HTML output. Alignment to MNI looks OK to me, and motion is not particularly high compared to other subjects where BOLD components were detected. Signal dropout in ventral regions is also not notably different for these subjects.

Looking at the tedana QC HTML, it is unclear to me why specific components that have high kappa but low rho were still not accepted as BOLD. The kappa threshold seems to be high for these subjects.

Here is a snapshot of an example component:

For what it’s worth, I don’t think any of the current tedana developers (myself included) regularly use, or have a ton of confidence in, the gscontrol methods. The “gsr” option will affect the data that’s being run through ICA.

1 Like

@ptaylor just an update that removing despike and the derivative from motion regression did not help with the “No BOLD components” warning.

@tsalo I also tried removing all the -gscontrol options, but that didn’t help either.

Tagging @handwerkerd @e.urunuela @dowdlelt to see if they have any ideas.

Best,
Avi

Sorry I’ve only just seen this. It looks like you only have 19 components for the subject that failed. I would say this is too low and the maPCA method is failing for this particular subject. My recommendation is that you manually set the number of components with the --tedpca option. Your time series are about 158 volumes from what I see, so you probably want to have at least 40 components. If you can share the data you input to tedana we may be able to have a closer look at why maPCA is only choosing 19 components.

Thank you, @e.urunuela for the input. I will try running with a specified 50 PCA components and report the results.

For the raw data, since this is running through AFNI, would you want to see the raw input to AFNI, or the data just before it is input to tedana (volreg file from AFNI)?

Best,
Avi

I think I misunderstood what you were doing before. If you are running a regression step before tedana, I would change that. Passing denoised and/or censored data to tedana tends to cause problems.

Thanks. I am not running regression before tedana. The order of my blocks is
-blocks tshift align tlrc volreg mask combine blur scale regress

volreg is the block that normalizes the data to MNI template.

Okay that’s a relief. Does it mean you’re running tedana on echo-wise files that have been warped to MNI space though? We recommend against that in tedana.

Yes, the files are nonlinearly transformed into MNI space before being passed to tedana.

@tsalo Are you specifically concerned about the non-linear registration step? I was initially unsure about that, too. However, I was told by AFNI experts that since the registration is applied identically across all echoes, it should not be an issue:
Multi-echo preprocessing in AFNI - volreg step - AFNI Message Board - AFNI Discuss Message Board

1 Like

Update:
@e.urunuela @handwerkerd

Here is the link to the input to the tedana command (volreg output from AFNI): tedana_fail

I reran tedana with -tedpca 50 and didn’t receive the “No BOLD components!” error. The kappa elbow is much lower:

Any ideas what might be going wrong with the -tedpca kundu/kundu-stabilize/AIC/KIC options? Would want to avoid setting the -tedpca to a fixed, arbitrary value of possible.

Hi, another update: I reran all of my data, which had “No BOLD components” found error by specifying the number of components to be selected as 1/3 of the number of volumes, and all of them completed tedana without the error (i.e., BOLD components were accepted).

I was wondering if any of you had a chance to look at the data @e.urunuela for the example subject that had the error? Microsoft OneDrive

Hi there. I haven’t had a chance to look into this. That said, @handwerkerd is looking into why we see the estimation of the number of components fail in some cases.

For now, my recommendation would be to have a fixed value of components. After a certain number of components, they should all be noise. So as long as you keep enough of them, it shouldn’t be a problem on your downstream analysis. Of course, this is all assuming your preprocessing prior to using tedana was correct.

Thank you for the update @e.urunuela . In choosing the number of fixed components, would 1/3 the number of timepoints be enough?

It probably would be. In your case, I would go with 60 just to be safe.

Thank you @e.urunuela. @handwerkerd let me know if you need more information on the shared data for my example subject that returned “No BOLD components” error - keen to find a resolution to this since this seems to be specifically for high tesla (mine is 7T) data with higher thermal noise. Our lab mostly uses 7T, and we have a significant number of subjects/runs with this error.

Also, @e.urunuela, I spoke too soon - in another dataset with the same acquisition and task, I specified -tedpca 60 and still got the same “No BOLD components” error :frowning: This happened for several subjects.