1 安装
参照“基因组结构预测|Braker3流程”这篇知乎文章https://zhuanlan.zhihu.com/p/659050212 。github软件页面介绍了另外的安装方式,使用docker镜像和构建singularity容器沙盒。
2 conda问题
安装好之后,有很多软件的路径依然存在问题。需要测试之后依次设置到环境中。
#这是一部分需要设置的路径
export GENEMARK_PATH=/mnt/e/bio_soft/braker3_depends/GeneMark-ETP/bin
export MAKEHUB_PATH=/mnt/e/bio_soft/braker3_depends/GeneMark-ETP/bin
export PATH="$PATH:/mnt/e/bio_soft/braker3_depends/GeneMark-ETP/bin"
export PATH="$PATH:/mnt/e/bio_soft/braker3_depends/TSEBRA/bin"
export PROTHINT_PATH=/mnt/e/bio_soft/braker3_depends/ProtHint/bin/
chmod +x /root/miniconda3/envs/braker3/bin/augustus
export PROTHINT_PATH=/mnt/e/bio_soft/braker3_depends/ProtHint/bin
augustus最好不要用conda安装,直接自己make再加入到软件的环境中。augustus用conda安装会遇到依赖问题,这时候需要先指定-c conda-forge和-c bioconda安装,不能只指定bioconda。可以使用下载的augustus内的脚本路径。
3 singularity问题
#singularity运行
#测试
碰到了目录只读的问题,需要挂载文件夹来解决
(singularity) x@XFM-R9KP:/mnt/d/bio_data/jy_genome_make$ sudo chmod -R 777 /mnt/d/bio_data/jy_genome_make/species
singularity exec --bind /mnt/d/bio_data/jy_genome_make:/mnt/d/bio_data/jy_genome_make --bind /mnt/d/bio_data/jy_genome_make/species:/opt/Augustus/config/species ${BRAKER_SIF} braker.pl --genome JY.chr20.A.fasta --species sphagnum --bam jy.bam --threads 15 --gff3 --skipOptimize --workingdir barker3 --prot_seq jinyuan_pro/sphagnum4.cdhit.fasta
#报错
ERROR in file /opt/BRAKER/scripts/braker.pl at line 6008
Failed to create new species with new_species.pl, check write permissions in /opt/Augustus/config//species directory! Command was /usr/bin/perl /opt/Augustus/scripts/new_species.pl --species=sphagnum1 --AUGUSTUS_CONFIG_PATH=/opt/Augustus/config/ 1> /dev/null 2>/mnt/d/bio_data/jy_genome_make/barker3/errors/new_species.stderr
#修改如下
singularity exec --writable --bind /mnt/d/bio_data/jy_genome_make:/mnt/d/bio_data/jy_genome_make --bind /mnt/d/bio_data/jy_genome_make/species:/opt/Augustus/config/species ${BRAKER_SIF} braker.pl --genome JY.chr20.A.fasta --species sphagnum1 --bam jy.bam --threads 15 --gff3 --skipOptimize --workingdir barker3 --prot_seq jinyuan_pro/sphagnum4.cdhit.fasta
#报错2
singularity exec --writable --bind /mnt/d/bio_data/jy_genome_make:/mnt/d/bio_data/jy_genome_make --bind /mnt/d/bio_data/jy_genome_make/species:/opt/Augustus/config/species ${BRAKER_SIF} braker.pl --genome JY.chr20.A.fasta --species sphagnum1 --bam jy.bam --threads 15 --gff3 --skipOptimize --workingdir /mnt/d/bio_data/jy_genome_make/barker3 --prot_seq /mnt/d/bio_data/jy_genome_make/jinyuan_pro/sphagnum4.cdhit.fasta
#报错3
singularity exec --contain --writable --bind /mnt/d/bio_data/jy_genome_make:/mnt/d/bio_data/jy_genome_make --bind /mnt/d/bio_data/jy_genome_make/species:/opt/Augustus/config/species ${BRAKER_SIF} braker.pl --genome JY.chr20.A.fasta --species sphagnum1 --bam jy.bam --threads 15 --gff3 --skipOptimize --workingdir /mnt/d/bio_data/jy_genome_make/barker3 --prot_seq /mnt/d/bio_data/jy_genome_make/jinyuan_pro/sphagnum4.cdhit.fasta
最后报错依然未解决,还是俺太菜了,最后直接用docker了
4 使用docker
docker pull teambraker/braker3l
docker run -it --rm -v /mnt/e/bio_data/cy_genome_make/02.out.bam/:/work --workdir /work teambraker/braker3:latest braker.pl --genome /work/cy.out.fasta --species Polyporales --bam /work/out.trn.bam --thread 14 --gff3 --softmasking --skipOptimize --workingdir /work/barker3
最终docker无报错,有一个小的警告,
WARNING: Couldn't find gmes_petap.pl in /opt/ETP/bin. Will not set $GENEMARK_PATH to /opt/ETP/bin!
无其他报错,400m基因组分配14线程,3G BAM文件,运行时间约6h,还是很快的。