GenEpi / Tool === ###### tags: `基因體/三級分析/GenEpi` ###### tags: `基因體`, `SNP`, `dbSNP`, `Variant`, `GenEpi`, `ML`, `生物資訊` <br> [返回 GenEpi 首頁](https://hackmd.io/1toBEWFgT06g74yub09BIg) <br> ## Github - https://github.com/Chester75321/GenEpi <br> ## 安裝套件 ``` $ pip install GenEpi ``` - python2: pip - python3: pip3 - 注意事項 - GenEpi 是一個 **「很吃記憶體」** 的套件 - 在計算含有大量 SNP 的基因之上位作用時,可能會導致記憶體錯誤 - 我們建議執行 GenEpi 的記憶體,**應超過 256GB** <br> ## GenEpi 套件資訊 - 使用方式,共有 6 個步驟 ```python import genepi ### step1_downloadUCSCDB # 從 UCSC 上,下載基因資料庫 genepi.DownloadUCSCDB(...) ### step2_estimateLD # 執行「連鎖不平衡(LD)」降維 genepi.EstimateLDBlock(...) ### step3_splitByGene # 只專注「位於基因上」的SNP genepi.SplitByGene(...) ### step4_singleGeneEpistasis_Logistic (for case/control trial) # 對「正常組與病例組」的單基因,執行「邏輯回歸&穩定選擇」 genepi.BatchSingleGeneEpistasisLogistic(...) ### step5_crossGeneEpistasis_Logistic (for case/control trial) # 對「正常組與病例組」的跨基因,執行「邏輯回歸&穩定選擇」 genepi.CrossGeneEpistasisLogistic(...) ### step6_ensembleWithCovariates (for case/control trial) # 使用共變異數分類 genepi.EnsembleWithCovariatesClassifier(...) ``` <br> ## 環境測試 - [GenEpi/genepi/example/](https://github.com/Chester75321/GenEpi/tree/master/genepi/example) - example&#46;py - sample.csv - sample.gen - sample_q.csv <br> - 測試 (共執行 6 個步驟) ```bash GenEpi-master/genepi/example$ python3 example.py step1: Down load UCSC Database. DONE! step2: Estimate LD. DONE! Warning of step3: .gen file should be sorted by chromosome and position step3: Split by gene. DONE! step4: Detect single gene epistasis. DONE! .59254545454545475 step5: Detect cross gene epistasis. DONE! (Training score:0.63; 2-fold Test Score:0.61) step6: Ensemble with covariates. DONE! (Training score:0.63; 2-fold Test Score:0.62) ``` - 沒有錯誤,就表示沒問題 <br> - 輸出結果 ``` ├── sample.LDBlock (LD區塊?) ├── sample_LDReduced.gen (LD降維結果?) │ ├── snpSubsets (???) │ ├── APOC1_23.gen │ ├── APOE_11.gen │ ├── PVRL2_48.gen │ └── TOMM40_67.gen │ ├── singleGeneResult (單基因上位作用結果) │   ├── All_Logistic_k2.csv │   ├── APOC1_Feature.csv │   ├── APOC1_Result.csv │   ├── APOE_Feature.csv │   ├── APOE_Result.csv │   ├── PVRL2_Feature.csv │   ├── PVRL2_Result.csv │   ├── TOMM40_Feature.csv │   └── TOMM40_Result.csv │ └── crossGeneResult (跨基因上位作用結果)     ├── Feature.csv     └── Result.csv ``` <br> ## [1] 解析程式碼 - DownloadUCSCDB - [UCSC db](https://hackmd.io/JA-_6-QqSWqDSqL8aMRmfw?view)