Funannotate的docker安装

Funannotate 是一个基因组预测、注释和比较软件包。它最初是为了注释真菌基因组(大小约为 30 Mb 的真核生物基因组),但随着时间的推移,它已经演变为适用于更大基因组的工具。Funannotate 还是一个轻量级的比较基因组平台。通过 funannotate annotate 命令添加功能注释的基因组可以通过 funannotate compare 脚本运行,该脚本会输出基于 HTML 的整个基因组比较结果。该软件可以进行同源聚类、构建整个基因组的系统发育树、运行基因本体富集分析,以及计算正选择下的同源聚类的 dN/dS 比率。(摘自官方)

贴上官方教程:Installation — Funannotate 1.8.16 documentation,使用 docker 安装比 conda 方便的多

1.镜像获取

因为服务器 docker 版本问题无法直接拉取镜像,因此想尝试直接下载镜像,找到一个工具 dget​(dget: docker hub 直接下载工具 (gitee.com)),下载 linux amd64 ​版本,然后运行:

./dget nextgenusfs/funannotate

因为网络问题可能会下载一部分后失败,重新在目标目录运行即可,下载有缓存支持,如果一次出错了,直接再次执行就可以了,全部完成后,得到的是名为 funannotate_latest-img.tar.gz ​的压缩文件。
同时按照教程,再下载一个执行脚本并赋予 755 权限,,软链接到用户的 ./.local/bin ​目录。

wget -O funannotate-docker https://raw.githubusercontent.com/nextgenusfs/funannotate/master/funannotate-docker

2.挂载镜像

记住你的压缩的位置,docker ​进行加载:

docker load -i ./funannotate_latest-img.tar.gz

用 docker images ​看看是否成功挂载:

(test) [test@login ~]$ docker images
REPOSITORY                                            TAG                                    IMAGE ID            CREATED             SIZE
nextgenusfs/funannotate                               latest                                 bcde41375f71        7 weeks ago         12.6 GB

3.运行 funannotate-docker​

这个时候如果运行 funannotate-docker ​会报错,服务器 docker ​版本太老了。

(test) [test@login ~]$ funannotate-docker
unknown flag: --mount
See 'docker run --help'.

解决方法,更改 funannotate-docker ​的源代码为下面这个:

#!/usr/bin/env bash

realpath() {
  OURPWD=$PWD
  cd "$(dirname "$1")"
  LINK=$(readlink "$(basename "$1")")
  while [ "$LINK" ]; do
    cd "$(dirname "$LINK")"
    LINK=$(readlink "$(basename "$1")")
  done
  REALPATH="$PWD/$(basename "$1")"
  cd "$OURPWD"
  echo "$REALPATH"
}

USER="$(id -u $(logname)):$(id -g $(logname))"
WORKDIR="$(realpath .)"
MOUNT="-v ${WORKDIR}:${WORKDIR}"
TZ="$(date +'%Z')"

docker run --rm -it \
  --user "${USER}" \
  -e TZ="${TZ}" \
  --workdir "${WORKDIR}" \
  ${MOUNT} \
  nextgenusfs/funannotate:latest funannotate "$@"

现在试试,成功 (▔▽▔)/

(test) [test@login ~]$ funannotate-docker

Usage:       funannotate <command> <arguments>
version:     1.8.17

Description: Funannotate is a genome prediction, annotation, and comparison pipeline.

Commands:
  clean       Find/remove small repetitive contigs
  sort        Sort by size and rename contig headers
  mask        Repeatmask genome assembly

  train       RNA-seq mediated training of Augustus/GeneMark
  predict     Run gene prediction pipeline
  fix         Fix annotation errors (generate new GenBank file)
  update      RNA-seq/PASA mediated gene model refinement
  remote      Partial functional annotation using remote servers
  iprscan     InterProScan5 search (Docker or local)
  annotate    Assign functional annotation to gene predictions
  compare     Compare funannotated genomes

  util        Format conversion and misc utilities
  setup       Setup/Install databases
  test        Download/Run funannotate installation tests
  check       Check Python, Perl, and External dependencies [--show-versions]
  species     list pre-trained Augustus species
  database    Manage databases
  outgroups   Manage outgroups for funannotate compare

Written by Jon Palmer (2016-2022) nextgenusfs@gmail.com with contributions by Jason Stajich jasonstajich.phd@gmail.com

4.测试是否正常

运行 funannotate-docker test -t predict --cpus 12 ​看是否能正常运行,若正常会在最后显示:

#########################################################
SUCCESS: `funannotate predict` test complete.
#########################################################
  • 9
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值