使用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
# 激活环境就能用了
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. 模型
    如果你需要自己训练模型,请参考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。

  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
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容