以下流程是在数据中心的超算上的配置过程。
创建环境 主要是安装依赖的软件。PS:推荐使用mamba
.
1 2 3 4 5 conda create --name EGAPx_v.0.4.0-alpha conda activate EGAPx_v.0.4.0-alpha conda install bioconda::nextflow conda install conda-forge::singularity conda install -c conda-forge openjdk=11
下载软件 从GiHub 克隆官方仓库即可。
1 2 3 4 cd ~/software/EGAPX_v.0.4.0-alpha git clone https://github.com/ncbi/egapx.gitcd egapx python3 ui/egapx.py -dl -lc ../local_cache
拉取镜像 1 2 3 4 5 cd ~/software/EGAPX_v.0.4.0-alpha/egapxrm egap*sif singularity cache clean singularity pull docker://docker.1ms.run/ncbi/egapx:0.4.0-alpha
下载BUSCO数据库 需要下载与taxid
对应的物种适用的BUSCO
数据库。PS:这里可以不要short_reads
这些信息,下载数据是根据taxid自动下载的。新的物种在运行之前建议先单独下载BUSCO
数据库,我是在本地下载好了再上传到集群。
我的测试yaml
文件是这样的:
1 2 genome: /share/org/xx/xx/software/EGAPX_v.0.4.0-alpha/example/GCA_020809275.1_ASM2080927v1_genomic.fna.gz taxid: 6954
这里重要的是taxid
. 下载的过程:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 python3 ui/egapx.py input_D_farinae_small.yaml -dl -lc ../local_cache /mnt/g/database/egapx/ui/egapx.py:1401: SyntaxWarning: invalid escape sequence '\[' biomol_str = " AND biomol_transcript\[properties\] " !!WARNING!! This is an alpha release with limited features and organism scope to collect initial feedback on execution. Outputs are not yet complete and not intended for production use. Downloading gnomon/2 Downloading ortholog_references/3 Downloading target_proteins/2 Downloading taxonomy/2 Downloading reference_sets/3 Downloading misc/2 Downloading cmsearch/1 Download SRA to /mnt/g/database/local_cache/sra_dir Downloading BUSCO lineage arachnida_odb10
软件配置文件 需要制作Nextflow
的配置文件:
1 2 3 4 5 cd ~/software/EGAPX_v.0.4.0-alpha/egapxmkdir egapx_config vi egapx_config/singularity.config
在这个文件中输入下面的内容(这个文件内部不能有中文字符!!!哪怕是注释也不行!!! ):
1 2 singularity.enabled = true process.container = '/share/org/xxx/xxx/software/EGAPX_v.0.4.0-alpha/egapx/egapx_0.4.0-alpha.sif'
样品配置文件 1 2 3 4 genome: /share/org/xxx/xxx/project/xxx/24.hifi_genome/hifiasm/fasta_outputs/xxx.fasta taxid: 71234 short_reads: /share/org/xxx/xxx/project/xxx/34.test_ncbi_egapx/xxx.txt locus_tag_prefix: xxx
其中的short_reads
文件是这样的:
1 2 test_1 /share/org/YZWL/yzwl_lixg/project/06.longliuxing_BSA/01.data/rnaseq/CRR564428_f1.fq.gz test_1 /share/org/YZWL/yzwl_lixg/project/06.longliuxing_BSA/01.data/rnaseq/CRR564428_r2.fq.gz
运行脚本 这里命名为00.test_egapx.sh
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 #!/bin/bash source ~/.bashrc conda activate baseexport JAVA_HOME=/share/org/xxx/xxx/miniforge3/envs/EGAPx_v.0.4.0-alphaexport PATH=$JAVA_HOME /bin:$PATH export PATH="/share/org/xxx/xxx/software:$PATH " python3 \ ui/egapx.py \ /share/org/xxx/xxx/project/xxx/34.test_ncbi_egapx/test_OV.yaml \ -e singularity \ -w /share/org/xxx/xxx/project/xxx/34.test_ncbi_egapx/work \ -o /share/org/xxx/xxx/project/xxx/34.test_ncbi_egapx/output \ -lc /share/org/xxx/xxx/software/EGAPX_v.0.4.1-alpha/local_cache
提交作业 我自定义的提交函数:
1 2 3 4 5 6 7 8 9 10 11 12 13 sub test_ncbi 83.测试ncbi基因注释流程egapx.sh --> 🚀 提交作业,参数如下: 📝 作业名称: test_ncbi 🔄 队列 : c01 💻 CPU核心 : 88 🧠 内存 : 500G 🎮 GPU数量 : 0 🖥️ 主机数 : 1 📤 输出日志: 99.log /2025-08-27-test_ncbi.out 📥 错误日志: 99.log /2025-08-27-test_ncbi.err 📜 执行脚本: 83.测试ncbi基因注释流程egapx.sh -------------------------------------------------- Job 60273741 has been submitted to the queue [c01].
报错处理 在使用本地文件的时候,如果一直提示从NCBI
下载SRA
数据,就修改源代码:
1 2 3 4 5 cp /share/org/xxx/xxx/software/EGAPX_v.0.4.1-alpha/egapx/ui/egapx.py{,.backup} sed -i '326a\ sras = [] # Force disable SRA detection' /share/org/xxx/xxx/software/EGAPX_v.0.4.1-alpha/egapx/ui/egapx.py