参考以下链接, 本教程仅作一个跑通的示例
https://github.com/PengNi/ccsmeth安装
#第一种安装方式
git clone https://github.com/PengNi/ccsmeth.git
conda env create --name ccsmethenv -f /path/to/ccsmeth/environment.yml
# 激活环境就能用了
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
模型
如果你需要自己训练模型,请参考github链接。
这里就使用他们训练好的模型:
在软件目录的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