wb_command tutorial?

744 views
Skip to first unread message

Dianne Patterson

unread,
Jun 13, 2022, 8:13:03 PM6/13/22
to HCP-Users
Dear All, 

I'm sure I'm missing something.  I have dtseries and GIFTI from the T1w images generated by fmriprep and I'm trying to understand what I can / should do with them.
 
I have looked at the wb_view tutorial:

This is interesting but does not really deal with wb_command.
------
and successfully ran some commands to get information, extract data as text, create a parcellated output, and get correlation matrices.

But this is a hard slog with few examples and no general guidance.

The general guidance I'm missing is an overview of what I should do. I would hope that I could make correct choices regarding smoothing, doing time series analysis of some sort, correlation of time series at different vertices or parcellations, etc.

ciftiTools in R is helpful...but I'm hoping for something more basic.
This Google Forum is helpful, but there is a lot to sift through.

Can anyone direct me to an appropriate tutorial(s)?

Thanks,

Dianne Patterson, Ph.D.
Neuroimaging Staff Scientist
University of Arizona

 




Glasser, Matt

unread,
Jun 13, 2022, 8:14:28 PM6/13/22
to hcp-...@humanconnectome.org

What is it that you want to with this data?

Matt.

--
You received this message because you are subscribed to the Google Groups "HCP-Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hcp-users+...@humanconnectome.org.
To view this discussion on the web visit https://groups.google.com/a/humanconnectome.org/d/msgid/hcp-users/2763fd44-4db5-4cff-84a5-4812478818fen%40humanconnectome.org.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Dianne Patterson

unread,
Jun 13, 2022, 8:25:13 PM6/13/22
to HCP-Users, glas...@wustl.edu
Hi Matt,

Thank you for your quick reply.  I am trying to understand best practices.

At a high level, I want to do something like I would do for volumetric analyses....at least, naively, that is what I *think* I want:

1) dtseries: Provide a design matrix and extract z-stats or t-stats for activations so I can determine which areas of the brain are active during each condition.
2) ptseries: Look at correlations between mean time series in each region.  I'm unsure whether I should be doing any additional cleanup steps, like high-pass filtering?
3) gifti surface: extract curvature and thickness information per region or vertex?

But please tell me if I'm missing valuable information that CIFTI and GIFTI files can provide...or I'm bringing too much baggage from doing classic volumetric analyses of fMRI.

- Dianne

Glasser, Matt

unread,
Jun 13, 2022, 8:45:06 PM6/13/22
to Dianne Patterson, HCP-Users
  1. It sounds like you want to do a task analysis.  If you have processed your data with the HCP Pipelines, everything would be set up for you to use the HCP’s TaskAnalysis Pipeline (you would still make your designs and such in FEAT).  We also recommend using MR+FIX (and temporal ICA, though this is still beta functionality) for denoising before task analysis as it improves stats and removes biases.  I wouldn’t remove motion regressors and for MR+FIX a linear detrend is fine.  For TaskAnalysis, folks typically do some highpass filtering, which provides minor benefits due to suppressing long wavelength spontaneous fluctuations.  For greatest statistical sensitivity and power, use a parcellated analysis (if you really are interested in within-area differential effects, you’d want minimum smoothing anyway) without spatial or temporal smoothing.
  2. This sounds like a resting state functional connectivity analysis.  Again, MR+FIX (and temporal ICA, though this is still beta functionality) are good for denoising.  wb_command -cifti-parcellate to make the ptseries and wb_command -cifti-correlation to make the full correlation connectome.  For more advanced stuff you might want to check out FSLNets. 
  3. This sounds like a structural parcellated analysis.  wb_command -cifti-parcellate for regional info (use -spatial-weights from the midthickness for most accurate averaging within the parcels.

 

Keep in mind that even if you don’t have a T2w scan, you can run the HCP Pipelines in legacy mode (and the Qu|Nex container can accept BIDS formatted data).  We do strongly recommend field maps so that all of your data are in the same physical space.  If you have the data for it, cross-subject analyses really benefit from the MSMAll Pipeline for cross-subject alignment (needs T1w, T2w, and fMRI).  Feel free to keep asking questions as you go…

Patterson, Dianne K - (dkp)

unread,
Jun 13, 2022, 9:09:13 PM6/13/22
to Dianne Patterson, HCP-Users
Thank you for pointing me in the right direction, and for being willing to help.
I do have Siemens magnitude and phasediff field maps which fMRIprep uses for distortion correction.

Is MR+FIX part of the HCP package? Part of FSL?  
Qunex is on my list of things to try out.  I'm hoping I can pass the output of fmriprep to Qunex somehow

Thanks,


-Dianne

Dianne Patterson, Ph.D
RII Neuroimaging Staff Scientist
Speech, Language and Hearing Sciences, Room 314

From: Glasser, Matt <glas...@wustl.edu>
Sent: Monday, June 13, 2022 5:44 PM
To: Dianne Patterson <dian...@gmail.com>; HCP-Users <hcp-...@humanconnectome.org>
Subject: [EXT]Re: [hcp-users] wb_command tutorial?
 

External Email

Glasser, Matt

unread,
Jun 13, 2022, 9:59:11 PM6/13/22
to hcp-...@humanconnectome.org, Dianne Patterson

MR+FIX is an HCP Pipeline that relies on FSL’s FIX, but allows you to combine across multiple fMRI runs to improve denoising (makes the biggest difference when you have very short runs). 

 

It would probably be more challenging to retrofit fMRIprep outputs to use the advanced HCP Pipelines (MR+FIX, MSMAll, TaskAnalysis; and in the future tICA and areal classifier), than to just rerun your data with the HCP minimal preprocessing Pipelines.  Is there a reason you picked fMRIPrep originally?

Matt.

Coalson, Timothy Scott (S&T-Student)

unread,
Jun 13, 2022, 10:09:50 PM6/13/22
to Dianne Patterson, HCP-Users
MR+FIX is hcp_fix_multi_run, in the HCP pipelines.  The script you should look at is this one, as it will help you launch it:


However, it may expect some files and naming specific to the HCP preprocessing pipelines.  fmriprep was developed by someone else, and I don't know whether they intended to make it compatible with feeding into the middle of the HCP preprocessing pipelines (leaving aside any differences in things like surface placement or nuisance regressors...).  If you want to try what we consider best practices, the simple thing to do may be to start over using our pipelines from your raw data.  QuNex could be helpful here, as I think it automatically fills in some of the values that you'd otherwise need to copy and paste between the example launch scripts, and may make the intended order of running pipelines more obvious.

As for your original question, wb_command is more of a "box of tools" - there are a great many things you can do with a screwdriver, and not all of them are good ideas.  The HCP pipeline scripts are the implementation of what we consider best practices.

Tim


From: Patterson, Dianne K - (dkp) <d...@arizona.edu>
Sent: Monday, June 13, 2022 8:09 PM

To: Dianne Patterson <dian...@gmail.com>; HCP-Users <hcp-...@humanconnectome.org>
Subject: Re: [hcp-users] wb_command tutorial?
 
WARNING: This message has originated from an External Source. This may be a phishing expedition that can result in unauthorized access to our IT System. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.

Patterson, Dianne K - (dkp)

unread,
Jun 13, 2022, 10:15:19 PM6/13/22
to hcp-...@humanconnectome.org, Dianne Patterson
fMRIprep claims to do processing that is analysis-agnostic.  So I use it before running GIFT, but it also supports CONN, for example, or standard GLM analysis.

What little reading I've done about CIFTI and GIFTI and the goals of the HCP has always seemed like it is the right way to go.
So I was hoping that the dtseries and GIFTI files that fmriprep generates would indeed be ready for analysis. 
I can manipulate the fmriprep surface files with wb_command and other tools (at least within the limited scope of my knowledge).

It is disappointing if those outputs are not useful ; (
I am looking forward to a world in which there IS an analysis-agnostic preprocessing pipeline...maybe that is still a pipe dream. 

-Dianne

Dianne Patterson, Ph.D
RII Neuroimaging Staff Scientist
Speech, Language and Hearing Sciences, Room 314

From: Glasser, Matt <glas...@wustl.edu>
Sent: Monday, June 13, 2022 6:58 PM
To: hcp-...@humanconnectome.org <hcp-...@humanconnectome.org>; Dianne Patterson <dian...@gmail.com>

Glasser, Matt

unread,
Jun 13, 2022, 10:22:21 PM6/13/22
to hcp-...@humanconnectome.org, Dianne Patterson

I’m not really sure what is meant by analysis-agnostic.  Certainly, the HCP Pipelines allow folks to do all kinds of things after running them; however, it is easier to stay within a set of tools than to go between (if you do, you’ll have to write the interface between them).  In our view, fMRIPrep is at best comparable to the HCP Minimal Preprocessing Pipelines, though some implementation choices are sub-optimal in our view.  fMRIPrep doesn’t really have anything comparable to the more advanced HCP Pipelines; however.  Although it is good that fMRIPrep supports surfaces and CIFTI, perhaps that is less of their focus than it is ours (we support volume-based analyses only very grudgingly except in very specific situations such single subject analyses without smoothing). 

Reply all
Reply to author
Forward
0 new messages