使用ccsmeth對PacBio HiFi subreads進行call甲基化

  1. 參考以下鏈接, 本教程僅作一個跑通的示例
    https://github.com/PengNi/ccsmeth

  2. 安裝

#第一種安裝方式
git clone https://github.com/PengNi/ccsmeth.git

conda env create --name ccsmethenv -f /path/to/ccsmeth/environment.yml
# 激活環(huán)境就能用了
conda activate ccsmethenv


#第二種安裝方式
conda create -n ccsmethenv python=3.8
conda activate ccsmethenv

#安裝ccsmeth
git clone https://github.com/PengNi/ccsmeth.git
cd ccsmeth
python setup.py install
#或者用pip安裝
pip install ccsmeth
#或者用conda安裝
conda install ccsmeth -c bioconda

#安裝一些依賴
conda install bedtools -c bioconda  # required by pybedtools->ccsmeth:call_mods
conda install pbccs pbmm2 samtools -c bioconda

#如果要使用GPU,安裝其他依賴
conda install pytorch==2.1.0 pytorch-cuda=11.8 -c pytorch -c nvidia
  1. 模型
    如果你需要自己訓(xùn)練模型,請參考github鏈接。
    這里就使用他們訓(xùn)練好的模型:
    在軟件目錄的models中存放了他們的模型
    如果軟件版本>=0.5.0, 使用model_ccsmeth_5mCpG_call_mods_attbigru2s_b21.v3.ckpt。
    如果<=0.4.1, 使用model_ccsmeth_5mCpG_call_mods_attbigru2s_b21.v2.ckpt。

  2. 運行
    命令行很簡單

ccsmeth call_hifi --subreads 1.subreads.bam  --threads 20 --output 1.car.hifi.bam

#--ref是參考基因組文件
ccsmeth align_hifi --hifireads 1.car.hifi.bam --ref car.fa --output car.pbmm2.bam --threads 40

ccsmeth call_mods --input carmeli.pbmm2.bam  --ref carmeli.fa --model_file /path/to/model_ccsmeth_5mCpG_call_mods_attbigru2s_b21.v3.ckpt \
        --output car.hifi.pbmm2.call_mods.bam --threads 40 --threads_call 2 --model_type attbigru2s --rm_per_readsite --mode align

ccsmeth call_freqb --input_bam car.hifi.pbmm2.call_mods.bam \
        --ref car.fa --output car.meth.output --threads 40 --sort --bed
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容