參考以下鏈接, 本教程僅作一個跑通的示例
https://github.com/PengNi/ccsmeth安裝
#第一種安裝方式
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
模型
如果你需要自己訓(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。運行
命令行很簡單
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