clust 是一種用于識(shí)別在一個(gè)或多個(gè)物種的異構(gòu)數(shù)據(jù)集中持續(xù)共表達(dá)(相關(guān)性良好)的基因簇(組)的全自動(dòng)方法。

(一)對(duì)于單個(gè)數(shù)據(jù)集,clust 自動(dòng)識(shí)別共表達(dá)基因的 clusters 的數(shù)量 k 并完成聚類。

(二)對(duì)于多個(gè)數(shù)據(jù)集,clust 自動(dòng)識(shí)別在每個(gè)輸入數(shù)據(jù)集中共表達(dá)(相關(guān)性良好)的基因 clusters,此處每個(gè)數(shù)據(jù)集的條件或時(shí)間點(diǎn)數(shù)量不同。

對(duì)于 clust,具有如下的特征:
- 無(wú)需對(duì)數(shù)據(jù)進(jìn)行預(yù)處理,clust 能夠自動(dòng)對(duì)數(shù)據(jù)進(jìn)行歸一化處理
- 無(wú)需預(yù)設(shè)聚類的數(shù)量,clust 能夠自動(dòng)識(shí)別 cluster 的數(shù)目
- 可以通過(guò)參數(shù)
-t控制聚類的緊密度(tightness) - 同時(shí)也可以適用于如下數(shù)據(jù)集:
- 由不同技術(shù)生成(如 RNA-seq 或微陣列)
- 來(lái)自不同物種
- 條件或時(shí)間點(diǎn)數(shù)量不同
- 同一條件有多個(gè)重復(fù)
- 需要不同類型的歸一化
- 由不同年份和實(shí)驗(yàn)室生成
- 存在缺失值
- 并非所有基因都被包含在每個(gè)數(shù)據(jù)集中
-
輸出文件:
- 聚類統(tǒng)計(jì)表
- 列出各聚類所含基因的表格
- 預(yù)處理(歸一化、匯總和過(guò)濾)數(shù)據(jù)集文件
- 聚類基因表達(dá)譜圖譜(PDF 文件)
官網(wǎng):https://github.com/BaselAbujamous/clust
網(wǎng)頁(yè)版:http://clust.baselabujamous.com
安裝
方法一:使用 conda(推薦)
conda create -n clust
conda activate clust
conda install -c bioconda clust
方法二:使用 pip
# 以下任選一條命令即可
sudo pip install clust
pip install --user clust
補(bǔ)充:更新版本(分別對(duì)應(yīng)如上的安裝命令)
conda update -c bioconda clust
sudo pip install clust --upgrade
pip install --user clust --upgrade
使用
1. 基礎(chǔ)版
輸入數(shù)據(jù)格式:每個(gè)數(shù)據(jù)集都以單個(gè) TAB 分隔(TSV)文件表示,其中第一列表示基因 ID,第一行表示樣本的唯一標(biāo)簽,文件的其余部分包括數(shù)值,主要是基因表達(dá)值。

注意:當(dāng)相同的基因 ID 出現(xiàn)在不同的數(shù)據(jù)集中時(shí),會(huì)被認(rèn)為是同一個(gè)基因;如果同一文件中有多行具有相同的標(biāo)識(shí)符會(huì)自動(dòng)將它們的值相加進(jìn)行匯總;基因名稱不應(yīng)包含空格、逗號(hào)或分號(hào)。
(一)對(duì)于歸一化過(guò)的同質(zhì)數(shù)據(jù)集,可以直接運(yùn)行:
clust data_path -o output_directory [...]
該命令使用默認(rèn)參數(shù)運(yùn)行 clust,data_path 可以是單個(gè)數(shù)據(jù)文件(v1.8.5 以上)的路徑,也可以是包含一個(gè)或多個(gè)數(shù)據(jù)文件的目錄路徑;如果沒(méi)使用 -o 提供輸出目錄,clust 會(huì)在當(dāng)前工作目錄下為結(jié)果創(chuàng)建一個(gè)新目錄。
(二)對(duì)于原始 RNA-seq TPM、FPKM 或 RPKM 數(shù)據(jù),可參考如下進(jìn)階版的歸一化部分。 有關(guān)處理 replicates 數(shù)據(jù)、處理來(lái)自多個(gè)物種的數(shù)據(jù),以及處理微陣列數(shù)據(jù)(僅RNA-seq數(shù)據(jù)或與RNA-seq數(shù)據(jù)混合)也可參考如下進(jìn)階版中對(duì)應(yīng)內(nèi)容。
2. 進(jìn)階版
2.1 歸一化(Normalisation)
在 V1.7.0 及更新版本中,可以實(shí)現(xiàn)自動(dòng)規(guī)范化,除非用戶通過(guò) -n 另有說(shuō)明,否則會(huì)自動(dòng)檢測(cè)每個(gè)數(shù)據(jù)集最適合的歸一化方法,所使用的歸一化 codes 存儲(chǔ)在輸出文件 /Normalisation_actual 中。
$ cat ~/clust/rpkm_Results_05_Aug_24/Normalisation_actual.txt
total_rpkm_gene.csv 101 3 4
在 V1.6.0 及更早版本 中,用戶應(yīng)通過(guò) -n 說(shuō)明所需的歸一化技術(shù),否則不應(yīng)用歸一化。
(一)方法一(V1.7.0 及更新版本):列出要應(yīng)用于一個(gè)或多個(gè)數(shù)據(jù)集的一個(gè)或多個(gè)歸一化 codes(可從下表中選?。?/p>
clust data_path -n code1 [code2 code3 ...] [...]
# 示例
clust total_rpkm_gene.csv -n 101 3 4 -o rpkm_Results_05_Aug_24
(二)方法二:提供列出每個(gè)數(shù)據(jù)集的歸一化 codes 的文件,分隔符可以是空格、TAB、逗號(hào)或分號(hào)

clust data_path -n normalisation_file [...]
# 示例
clust total_rpkm_gene.csv -n Normalisation_actual.txt -o rpkm_Results_05_Aug_24
常用數(shù)據(jù)集建議 codes:
- RNA-seq TPM, FPKM, and RPKM data: 101 3 4
- Log2 RNA-seq TPM, FPKM, and RPKM data: 101 4
- One-colour microarray gene expression data: 101 3 4
- Log2 one-colour microarray gene expression data: 101 4
- Two-colour microarray gene expression data: 3 6
- Log2 two-colour microarray gene expression data: 6
- Log2 fold-changes 4
在此基礎(chǔ)上,如果數(shù)據(jù)集中有太多的零或一些負(fù)值,則建議使用 31 代替 3。
All normalisation codes:
| Code | Definition |
|---|---|
| 0 | No normalisation (Default in v1.6.0 and earlier) |
| 1 | Divide by the mean value of the row |
| 2 | Divide by the first value of the row |
| 3 | Log2 |
| 31 | Set all values that are less than 1.0 to 1.0, then log2 (v1.7.0+) |
| 4 | Z-score: subtract the mean of the row and then divide by its standard deviation |
| 5 | Divide by the total (sum) of the row |
| 6 | Subtract the mean value of the row |
| 7 | Divide by the maximum value of the row |
| 8 | 2 to the power X |
| 9 | Subtract the minimum value of the row |
| 10 | Rank across rows (1 for the lowest, up to N for N columns; average ranks at ties) |
| 11 | Rank across rows (1 for the lowest, up to N for N columns; order arbitrarly at ties) |
| 12 | Linear transformation to the [0, 1] range across rows (0.0 for the lowest and 1.0 for the highest) |
| 13 | Set all values of genes with low expression everywhere to zeros. The threshold of low expression is found by fitting a bimodal distribution to per-gene maximum expression values over all samples (v1.7.0+) |
| - | - |
| 101 | Quantile normalisation |
| 102 | Column-wise mean subtraction |
| 103 | Subtract the global mean of the entire dataset |
| - | - |
| 1000 | Automatic detection of suitable normalisation (Default in v1.7.0 and newer) |
注意:codes 的順序決定了歸一化技術(shù)的應(yīng)用順序
2.2 處理 replicates
提供包含有 replicates 信息的文件,其中文件中的每一行代表一個(gè)樣本,按順序包含數(shù)據(jù)集文件的名稱(如 X0.txt),樣本條件的名稱,該樣本條件的一個(gè)或多個(gè) replicates 名稱,且這些名稱應(yīng)與數(shù)據(jù)集文件中的列名相匹配,分隔符可以是空格、TAB、逗號(hào)或分號(hào)。

$ cat rpkm_replicates_file.txt
total_rpkm_gene.csv AC AC1_count, AC2_count, AC3_count
total_rpkm_gene.csv BC BC1_count, BC2_count, BC3_count
total_rpkm_gene.csv BD BD1_count, BD2_count, BD3_count
total_rpkm_gene.csv AD AD1_count, AD2_count, AD3_count
total_rpkm_gene.csv BE BE1_count, BE2_count, BE3_count
total_rpkm_gene.csv AE AE1_count, AE2_count, AE3_count
具體使用代碼:
clust data_path -r replicates_file [...]
# 示例
clust total_rpkm_gene.csv -r rpkm_replicates_file.txt -o rpkm_Results_05_Aug_24
2.3 多物種數(shù)據(jù)
提供包含有多物種信息的文件 mapping file,其中 mapping file 是一個(gè) TAB 分隔文件,第一行顯示物種名稱,第一列顯示 orthologue groups(OG)的 ID,每個(gè) OG 包括零個(gè)、一個(gè)或多個(gè)orthologous genes,每個(gè)物種一欄用逗號(hào)分隔,具體文件格式可參考官網(wǎng)信息。
clust data_path -m map_file [...]
2.4 多技術(shù)數(shù)據(jù)
提供包含有多技術(shù)信息的文件mapping file,注意此處需要為不同技術(shù)數(shù)據(jù)集應(yīng)用不同的歸一化 codes,如果微陣列數(shù)據(jù)文件的第一列包含探針 ID,而這些探針 ID 在使用不同微陣列/RNA-seq 平臺(tái)生成的數(shù)據(jù)集中并不完全相同,則應(yīng)確保探針-基因映射信息包含在上述 mapping file 中,具體文件格式可參考官網(wǎng)信息。
clust data_path -m map_file [...]
2.5 缺失值處理
使用 -d 自動(dòng)舍棄未出現(xiàn)在所有(或大部分)數(shù)據(jù)集中的基因;如共有 20 個(gè)數(shù)據(jù)集,可以通過(guò)以下方法強(qiáng)制 clust 丟棄至少 17 個(gè)數(shù)據(jù)集未包含的基因:
clust data_path -d 17 [...]
2.6 低表達(dá)基因處理
在 v1.7.0+ 中,clust 默認(rèn)會(huì)在合并 replicates 和歸一化后過(guò)濾掉表達(dá)譜平坦(表達(dá)譜完全沒(méi)有變化)的基因;可使用 --no-fil-flat 禁止該操作。
如果向 clust 提供三個(gè)選項(xiàng) -fil-v、-fil-c 和 -fil-d,clust 可以自動(dòng)過(guò)濾掉表達(dá)值低的基因:
clust data_path -fil-v value -fil-c conditions -fil-d datasets
此代碼將舍棄在數(shù)據(jù)集中低于 value 值、在 conditions 條件下低于 conditions 值的所有基因。
此部分需要在歸一化之前使用,但要在合并 replicates 數(shù)據(jù)和處理跨物種基因 mapping 之后使用。
2.7 noisy clusters 處理
緊密度參數(shù) -t 可以控制聚類的緊密程度(較緊密較小的聚類 vs 較不緊密較大的聚類),為正實(shí)數(shù),默認(rèn)值為 1.0;小于 1.0 的值(如 0.5)產(chǎn)生的聚類不太緊密,而大于 1.0 的值(如 2.0、5.0、10.0...)產(chǎn)生的聚類更緊密。
更大的 -t 值可以獲得更緊密的聚類:
clust data_path -t tightness_level
示例
clust Data/ -r Replicates.txt \
-n Normalisation.txt \
-m MapIDs.txt \
-t 5 \
-o MyResultsDirectory/
參考
- BaselAbujamous/clust: Automatic and optimised consensus clustering of one or more heterogeneous datasets (github.com)
- Basel Abu-Jamous and Steven Kelly (2018) Clust: automatic extraction of optimal coexpressed gene clusters from gene expression data.
Genome Biology: 19:172; doi: https://doi.org/10.1186/s13059-018-1536-8.