美文网首页生信log
生信log47|Trim Galore的singularity镜

生信log47|Trim Galore的singularity镜

作者: 小周的万用胶囊 | 来源:发表于2024-05-13 13:37 被阅读0次

最近重新深入生信分析的学习,重新看一下转录组还有其他分析方法看新工具和新思路。这篇日志记录Trim Galore的Singularity镜像用法(目前没有singularity的用法)和镜像构建的思路(Dockerfile由官方提供)。

0. 准备和预知信息

  • 安装好singularity

  • 镜像大小: 537 MB

  • 镜像中的预装软件

- Ubuntu 18.04
- Python 3.6.7
- Cutadapt 2.0
- fastqc 0.11.8
- trim Galore 0.6.0
  • 镜像下载
#下载trim-galore
singularity pull library://jiayiliujiayi/condas/trim-galore

1. 来源DEF解析- Singularity的"Dockerfile"解析

  • 当成一个小型的linux机子,在linux服务器上怎么软件就在镜像中怎么装软件
  • 最少原则:只装必要的软件
Bootstrap: docker
From: alpine:3.8


#这里就是安装
%post
    apk update
    apk upgrade
    apk add git make
    apk add bash curl fontconfig gcc bzip2-dev libc-dev ncurses-dev openjdk8-jre ttf-dejavu xz-dev zlib-dev
    apk add perl python2 python2-dev py2-pip

    pip install cutadapt

    cd /usr/local/bin
    curl -fsSL "https://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.11.8.zip" -o fastqc_v0.11.8.zip
    unzip fastqc_v0.11.8.zip
    find /usr/local/bin/FastQC -name "fastqc" -maxdepth 1 -exec chmod +x {} \;
    find /usr/local/bin/FastQC -name "fastqc" -maxdepth 1 -perm /u+x -exec ln -s {} /usr/local/bin \;

    cd /usr/local/bin
    #可以在里面下载,也可以在构建镜像的时候拷贝进去
    curl -fsSL "https://github.com/FelixKrueger/TrimGalore/archive/0.5.0.tar.gz" | tar -xz
    find /usr/local/bin/ -name "trim_galore" -exec ln -s {} /usr/local/bin \;

%labels
    Maintainer m-bull
    Version trim_galore-0.5.0

2. 使用方法-如何使用这个镜像

  • 注意点目录挂载$PWD:/in中的/in一定要打全,$PWD这个值可换成自己想要放数据的绝对路径

4. 用AI写DEF

在此推荐一下我的星火小助手(笨蛋): https://xinghuo.xfyun.cn/botweb/2035826

作用:根据用户的需求和描述生成Singularity镜像描述文件(deffile)、转换Dockerfile到singularity的deffile、回答用户对Singularity容器化技术的疑问

阅读全文


参考

https://github.com/chrishah/trim_galore-docker

https://singularityhub.github.io/singularityhub-archive/containers/connor-lab-singularity-recipes-trim_galore/

相关文章

网友评论

    本文标题:生信log47|Trim Galore的singularity镜

    本文链接:https://www.haomeiwen.com/subject/rjeefjtx.html