FSL-FIX

1 Introduction

1.1Overview - FMRIB's ICA-based Xnoiseifier

FIX attempts to auto-classify ICA components into "good" vs "bad" components, so that the bad components can be removed from the 4D FMRI data. FIX is intended to be run on single-session MELODIC ICA output. See example raw data movies showing the (potentially huge) effect of FIX cleanup. This beta-version of FIX is a set of R, MATLAB and shell scripts and hence requires you to have various other software than just FSL - and for now is not bundled as part of FSL. If you use FIX, please cite these papers:

1. G. Salimi-Khorshidi, G. Douaud, C.F. Beckmann, M.F. Glasser, L. Griffanti S.M. Smith. Automatic denoising of functional MRI data: Combining independent component analysis and hierarchical fusion of classifiers. NeuroImage, 90:449-68, 2014

2. L. Griffanti, G. Salimi-Khorshidi, C.F. Beckmann, E.J. Auerbach, G. Douaud, C.E. Sexton, E. Zsoldos, K. Ebmeier, N. Filippini, C.E. Mackay, S. Moeller, J.G. Xu, E. Yacoub, G. Baselli, K. Ugurbil, K.L. Miller, and S.M. Smith. ICA-based artefact removal and accelerated fMRI acquisition for improved resting state network imaging. NeuroImage, 95:232-47, 2014

The latest version (1.06) can now be run without MATLAB, using either the supplied precompiled-matlab binaries, or with Octave. The other change from v1.05 is a change in the top-level meta-classifier, which gives a tiny average improvement in classification accuracy. There is no need to rerun feature generation from v1.05 for use in v1.06, but the old trained-weights files cannot be used with v1.06 (and any custom trained-weights files will need regenerating).

For FIX to work well, it is very important that it is run using good "training data". While a few example trained-weights files are supplied with FIX, for major studies we would strongly recommend training FIX on your own study data (see details in the User Guide section). You can find example training-input data, including our hand-labellings, here (note that you do not need this example training-input data in order to run FIX; you just need the download linked in the User Guide - Downloading and Installing FIX section) , which includes several trained-weights files).

2 User Guide

2.1 下载和安装FIX

2.2 运行FIX

2.2.1 简单用法,假定你已经有训练数据

/usr/local/fix/fix <mel.ica>
/usr/local/fix/training_files/Standard.RData  20

您需要提供由MELODIC或FEAT GUI创建的完整的“一级first-level”(单session)输出目录(<mel.ica>),并运行完整的配准(registration),包括使用结构像。如果使用FEAT,你需要在Prestats中打开ICA。对于单个被试ICA,一般应该使用MELODIC的自动维数估计(这将创建子文件夹< meli.ICA >/filtered_func_data.ica)。20是好组件与坏组件的阈值;敏感值一般在5-20之间。但是,如果对您来说非常重要的是几乎没有好的组件被删除,因此您希望在数据中留下大量的坏组件,那么就使用一个较低的阈值(例如,在1-5范围内)。强烈建议你看看ICA组件检查至少有几个科目的分类-查看名为fix4melview_Standard_thr20.txt之类的文件最后一行列出了组件视为噪音要删除(索引从1而非0开始计数)。当运行修复如图所示上面,您将得到4D预处理FMRI数据的清洁版本:filtered_func_data_clean.nii.gz
如果您有一个计算集群,您可以通过在它前面加上类似fsl_sub -q long ...的东西来将整个命令发送到集群。但是,如果您使用fix来训练分类器并运行留一测试(参见2.2.3),我们建议您在本地运行fix,如果您的本地计算机能够向集群提交作业,因为它将为您完成这一任务,并行化LOO,并大大提高它的速度)。

2.2.2 每个步骤单独运行时的用法

上面的命令等价于下面的3步:
(1)提取特征(用于后续训练 和/或 分类)

/usr/local/fix/fix -f <mel.ica>

(2)使用特定训练集 来 分类 ICA成分(<thresh> is in the range 0-100, typically 5-20))

/usr/local/fix/fix -c <mel.ica> <training.RData> <thresh>

(3)使用 .txt 文件中列出的伪影,应用清洗到 Melodic目录里面的数据。
使用.txt文件中列出的工件,对外围Feat/Melodic目录中的数据应用清理。这个文本文件可以是上面步骤的输出,也可以手动创建,以防您想手动删除人工组件。在第二种情况下,确保txt文件只包含一行(或至少应该是最后一行),其中包含坏组件的列表,格式(例如):[1,4,99,…注意,方括号和逗号的使用是必需的。另外,确保在最后有一个空行(例如,在写完列表后按回车)。从1开始计数,而不是0。

/usr/local/fix/fix -a <mel.ica/fix4melview_TRAIN_thr.txt>  [-m [-h <highpass>]]  [-A]
  • m: 可选的,也是用于清洗 motion 混淆(24个回归参数),头动混淆的高通滤波又以下控制:
    • if -h 被忽略,fix会查询是否存在一个design.fsf文件来找到高通截断。如果-h被忽略且不存在design.fsf文件,将不执行头动混淆的过滤;
      if 设置了 -h <highpass>,则;
      -h -1 不对头动混淆执行过滤,-h 0执行线性去漂移。
      -h <highpass> 的<highpass>为正值时,应用 <highpass>的高通apply highpass with <highpass> being full-width (2
      sigma) in seconds.
  • -A:应用aggressive(全变异)清洗,而不是默认的less-aggressive(单一变异)清洗。

2.2.3 训练数据集

FIX需要从多个数据集进行训练,这些数据集已经手工将ICA组件划分为“好”和“坏”。到目前为止,我们已经手工训练了一些不同类型的数据,FIX提供了这些数据的训练权重文件。如果您想自己训练FIX(通常是推荐的),为了更好地针对您拥有的数据类型优化它,您将需要自己进行手动分类(至少10个被试)。或者,你也可以使用训练过的 由FIX提供的*.RData文件之一。
目前提供了几个训练好的权重文件:

  • Standard.RData - for use on more "standard" FMRI datasets / analyses; e.g., TR=3s, Resolution=3.5x3.5x3.5mm, Session=6mins, default FEAT preprocessing (including default spatial smoothing).这个时FEAT预处理默认的(包括了空间平滑)

  • HCP_hp2000.RData for use on "minimally-preprocessed" 3T HCP-like datasets, e.g., TR=0.7s, Resolution=2x2x2mm, Session=15mins, no spatial smoothing, minimal (2000s FWHM) highpass temporal filtering.

  • HCP7T_hp2000.RData for use on "minimally-preprocessed" 7T HCP-like datasets, e.g., TR=1.0s, Resolution=1.6x1.6x1.6mm, Session=15mins, no spatial smoothing, minimal (2000s FWHM) highpass temporal filtering.

  • WhII_MB6.RData derived from the Whitehall imaging study, using multiband x6 EPI acceleration: TR=1.3s, Resolution=2x2x2mm, Session=10mins, no spatial smoothing, 100s FWHM highpass temporal filtering.

  • WhII_Standard.RData derived from more traditional early parallel scanning in the Whitehall imaging study, using no EPI acceleration: TR=3s, Resolution=3x3x3mm, Session=10mins, no spatial smoothing, 100s FWHM highpass temporal filtering.

  • UKBiobank.RData derived from fairly HCP-like scanning in the UK Biobank imaging study: 40 subjects, TR=0.735s, Resolution=2.4x2.4x2.4mm, Session=6mins, no spatial smoothing, 100s FWHM highpass temporal filtering.

你可以遭到训练输入数据的示例,包括我们的手工标签,, here (注意如果为了运行FIX你不需要这个训练数据的示例; 你需要的只是已经包含在FIX路径中的训练好的权重trained-file文件).

2.2.3.2 如何创建一个新的trained-weights 文件

暂时pass

2.2.4 必要的输入文件——详细信息

如果你没有执行全部的基于GUI的MELODIC/FEAT 分析,你可能需要,在一个目录中包括以下文件:

  filtered_func_data.nii.gz          preprocessed 4D data
  filtered_func_data.ica             melodic (command-line program) full output directory
  mc/prefiltered_func_data_mcf.par   motion parameters created by mcflirt (in mc subdirectory)
  mask.nii.gz                        valid mask relating to the 4D data
  mean_func.nii.gz                   temporal mean of 4D data
  reg/example_func.nii.gz            example image from 4D data
  reg/highres.nii.gz                 brain-extracted structural
  reg/highres2example_func.mat       FLIRT transform from structural to functional space
  design.fsf                         FEAT/MELODIC setup file; if present, this controls the
                                       default temporal filtering of motion parameters

3 FAQ

3.1 When I run FIX, I obtain the following output: “No valid labelling file specified”. What does it mean?

FIX doesn’t find the classification file with the list of components to be removed, so the error could be either in the features extraction or in the classification. To see which is the problem have a look at the following log files:

  • <subject.ica>/fix/logMatlab.txt (this should show errors in Matlab part, i.e. features extraction)

  • <subject.ica>/.fix.log

  • <subject.ica>/.fix_2b_predict.log (those are log file in general for the whole routine) You’ll probably find errors related to Matlab or R, so you might need to check your settings.sh file following the setup instructions described in the FIX README file

3.2 How do I choose the best training dataset (among the existing ones) and/or threshold for my data?

FIX is more likely to work better with the training dataset that is most similar to your data, both in terms of acquisition parameters (TR and resolution) and preprocessing steps applied. Regarding the threshold to use, you can start with the “default” 20 and increase or decrease it according to FIX performance (i.e. visual check of the components' classification contained in the file fix4melview_TRAIN_thr.txt). For example, if it is very important to you that almost no good components are removed, and hence you would prefer to leave in the data a larger number of bad components, then use a low threshold. If you want to remove more noise, use a higher threshold.

3.3 What is the difference between fsl_regfilt and FIX?

FIX is an automated equivalent of fsl_regfilt (they both perform non-aggressive (unique variance) cleanup by default), so you don’t need to run both:

  • fsl_regfilt: manual classification of unwanted components + run fsl_regfilt —> cleaned data 不想要的成分的手工分类 + 运行fsl_regfilt —> 清洗数据

  • FIX: automated classification artefactual components and regression of their contribution out of the data —> cleaned data 自动分类伪影成分 和 把它们的影响从数据中回归掉

To check that FIX is removing the artifactual components correctly (i.e. it is doing what you would do running fsl_regfilt) you can check the classification done by FIX in the fix4melview….txt file and adjust the training dataset and threshold you are using as appropriate.
要检查FIX是否正确地移除了伪影成分(即它是否做了你想用fsl_regfilt做的)你可以检查 在fix4melview….txt文件中的FIX的分类并调整训练数据集,调整你用作appropriate的阈值。

3.4 Can I use FIX to clean task fMRI data?

Yes, although you will probably need to create a study-specific training dataset

3.5 When I run FIX to create a new training file (-t), the output folder is created, but no .RData is produced at the end, with no explicit error message. What does it mean?

Check the content of the folllowing hidden files within the output directory created:
.fixlist --> should contain the list of subjects included in the training dataset (to check if they've been all loaded/recognised properly)

.Rlog1 --> contains errors from R about the generation of the .RData file

Also, make sure that the .txt files (hand_labels_noise.txt) are in the correct format: the last line should contain the list of the components only, within square brackets and comma separated, and there should be an empty line at the end (i.e. hit return after writing the list).

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 219,635评论 6 508
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 93,628评论 3 396
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 165,971评论 0 356
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,986评论 1 295
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 68,006评论 6 394
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,784评论 1 307
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,475评论 3 420
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 39,364评论 0 276
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,860评论 1 317
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 38,008评论 3 338
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 40,152评论 1 351
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,829评论 5 346
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,490评论 3 331
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 32,035评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 33,156评论 1 272
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 48,428评论 3 373
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 45,127评论 2 356

推荐阅读更多精彩内容

  • 16宿命:用概率思维提高你的胜算 以前的我是风险厌恶者,不喜欢去冒险,但是人生放弃了冒险,也就放弃了无数的可能。 ...
    yichen大刀阅读 6,055评论 0 4
  • 公元:2019年11月28日19时42分农历:二零一九年 十一月 初三日 戌时干支:己亥乙亥己巳甲戌当月节气:立冬...
    石放阅读 6,885评论 0 2
  • 今天上午陪老妈看病,下午健身房跑步,晚上想想今天还没有断舍离,马上做,衣架和旁边的的布衣架,一看乱乱,又想想自己是...
    影子3623253阅读 2,914评论 1 8