PlantCAD2:被子植物跨物种功能注释的长上下文DNA语言模型安装测试

论文

https://www.biorxiv.org/content/10.1101/2025.08.27.672609v4

PlantCAD2: A Long-Context DNA Language Model for Cross-Species Functional Annotation in Angiosperms

作者单位是 康奈尔大学

这个模型具体能干啥暂时还没有看明白,论文抽时间看,先把软件安装上再说

论文对应的github链接

https://github.com/plantcad/plantcad/tree/main

安装对应的教程

https://github.com/plantcad/plantcad/blob/main/docs/local-install.md

最开始本来想用现成的docker,这类有docker镜像的我原来的做法是在自己win10系统上安装了docker desktop,开着科学上网工具把对应的镜像个拉下来,然后上传到服务器再用singularity转换成singularity的镜像,之前有几个软件是这样安装的,但是 docker desktop很快就把C盘占满了,目前还不知道怎么删除不想要的镜像 ,docker desktop使不太明白。这次这个方法就没有成功。

尝试了用conda + pip本地安装

第一步创建一个python 3.11的环境

conda create -n PlantCAD python=3.11
conda activate PlantCAD

把对应的 github仓库下载下来,进入对应的目录

这里我们不按照官网的教程顺序,首先安装 pyvcf3

conda install pyvcf3=.0.4

然后安装

pip install mamba-ssm==2.2.4 causal-conv1d==1.5.0.post8 --no-build-isolation

但是我用这个命令遇到报错

× Encountered error while generating package metadata.
╰─> causal-conv1d

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

这里没有查到是什么原因,找打软件对应的whl文件进行安装

http://github.com/Dao-AILab/causal-conv1d/releases/tag/v1.5.0.post8

https://github.com/state-spaces/mamba/releases/tag/v2.2.4

分别选择的是

mamba_ssm-2.2.4+cu12torch2.5cxx11abiFALSE-cp311-cp311-linux_x86_64.whl

causal_conv1d-1.5.0.post8+cu12torch2.5cxx11abiFALSE-cp311-cp311-linux_x86_64.whl

这里后面对应的一大串分别是啥意思也没有搞明白,复制到deepseek里会给出以下解释

pip install mamba_ssm-2.2.4+cu12torch2.5cxx11abiFALSE-cp311-cp311-linux_x86_64.whl
pip install causal_conv1d-1.5.0.post8+cu12torch2.5cxx11abiFALSE-cp311-cp311-linux_x86_64.whl

然后把 requirements.txt 里的内容

git+https://github.com/dridk/PyVCF3.git@1.0.4

给删掉,我这边的服务器上git连不上网

然后运行命令

pip install -r requirements.txt -i https://repo.huaweicloud.com/repository/pypi/simple

这里 -i 指定华为源,速度很快

等到运行完大概率就安装好了,如果遇到提示还缺少哪些依赖的模块的话用pip把对应的模块安装好就可以了

模型对应下载链接

https://huggingface.co/kuleshov-group/PlantCAD2-Large-l48-d1536/tree/main

这个网站上怎么一次性把所有的文件都下载下来我暂时没有搞懂,我是一个一个文件下载的

测试一下对sv的vcf文件打分

time python src/zero_shot_score_sv.py -input-vcf test.vcf -input-fasta test.ref.fasta -output scored_sv.vcf -model 'PlantCAD2-Large-l48-d1536' -contextSize 8192 -flank-size 5

12个SV 1分钟就算完了

没有gpu可能运行不了这个模型,或者自己暂时没有找到对应的参数进行设置

声明:来自小明的数据分析笔记本,仅代表创作者观点。链接:https://eyangzhen.com/7778.html

小明的数据分析笔记本的头像小明的数据分析笔记本

相关推荐

添加微信
添加微信
Ai学习群
返回顶部