本文檔將協助您快速配置環境並執行 InterSubMod 分析流程。
- OS: Linux (Ubuntu 18.04+ Recommended)
- Compiler: GCC 7+ 或 Clang 5+ (支援 C++17)
- Dependencies: HTSlib 1.10+, CMake 3.14+, Python 3 (Matplotlib, Seaborn, Pandas)
# 1. Clone 專案
git clone https://github.com/liaoyoyo/InterSubMod.git
cd InterSubMod
# 2. 建立並編譯 (使用最大並行數加速)
mkdir -p build && cd build
cmake ..
make -j$(nproc)編譯完成後,主程式位於 build/bin/inter_sub_mod。
我們提供整合腳本 scripts/run_vcf_all_snv.sh,可自動完成核心運算與圖表繪製。
請使用以下指令執行完整的 VCF 測試流程:
# 回到專案根目錄
cd /big8_disk/liaoyoyo2001/InterSubMod
# 執行全流程測試 (包含 reads 過濾、矩陣建構、視覺化)
./scripts/run_vcf_all_snv.sh --mode all-with-w1000 --plot-type distance--mode all-with-w1000: 啟用標準過濾器,並設定分析窗口為 SNV 前後 ±1000bp。這是最推薦的標準分析模式。--plot-type distance: 只生成距離熱圖(可改為all/cluster/no)。- 此腳本會自動執行以下步驟:
- 呼叫 C++ 核心程式
inter_sub_mod處理數據。 - 產出甲基化矩陣與 reads 資訊。
- 呼叫 Python 腳本生成距離熱圖與分群熱圖。
- 呼叫 C++ 核心程式
您也可以自定義參數:
# 指定輸出目錄
./scripts/run_vcf_all_snv.sh --mode all-with-w1000 -o output/my_custom_run
# 僅生成距離熱圖 (Skip Cluster Heatmap)
./scripts/run_vcf_all_snv.sh --mode all-with-w1000 --plot-type distance
# 使用更多執行緒 (C++ Core: 64, Python Plotting: 64)
./scripts/run_vcf_all_snv.sh --threads 64 --plot-threads 64執行完成後,請前往輸出目錄(預設為 output/YYYYMMDD_vcf_*)。
輸出包含根層摘要檔與依 VCF/染色體分層的結果目錄,示意如下:
output/
├── full_execution_analysis.log # 完整執行日誌
├── significance_summary.csv # 各區域顯著性摘要
├── significance_statistics.txt # 全域統計
└── filtered_snv_tp/
├── chr1/
├── chr2/
└── ...
Note
output/ 建議在 repo 內保留為入口目錄,實際儲存可放在其他硬碟並以軟連結對接;output 內容不納入 Git 版本控管。
若需直接控制底層參數,可直接呼叫執行檔:
./build/bin/inter_sub_mod \
--tumor-bam data/tumor.bam \
--reference data/ref.fa \
--vcf data/somatic.vcf \
--output-dir results \
--threads 32 \
--window-size 1000 \
--log-level debugNote
手動執行僅產出數據檔案 (TSV/CSV),不會自動生成熱圖。如需圖表,請接續執行 tools/ 下的 Python 腳本。