基本概念
Singularity 是基于Docker已经进行应用阶段开发的。针对和Docker的官方说明如下
- You don’t need Docker installed
- You can shell into a Singularity-ized Docker image
- You can run a Docker image instantly as a Singularity image
- You can pull a Docker image (without sudo)
- You can build images with bases from assembled Docker layers that include environment, guts, and labels
Singularity 安装
可以直接使用conda进行安装,这里最好使用root账户安装,不然后续使用依然可能存在权限问题。
1 | conda create -n singularity singularity |
Singularity 环境配置
1 | # 配置singularity 下载镜像时的存储目录 |
基于docker镜像构建singature镜像
1 | 方式1:从docker uri开始 |
运行Singularity 容器
1 | 使用exec直接运行任务 |
挂在目录( -B)
1 | /share/app/singularity/3.8.1/bin/singularity exec -B /ifstj2/B2C_RD_H1/Research_and_Development/ -B /ifstj2/B2C_RD_H1/Personal/liubo ensembl-vep_release_108.2.sif vep --fork 4 --cache --dir_cache /ifstj2/B2C_RD_H1/Research_and_Development/03.database/vep_cache_dir --assembly GRCh37 --offline --refseq --exclude_predicted --fasta /ifstj2/B2C_RD_H1/Research_and_Development/03.database/Hg19/hg19.fa -i /ifstj2/B2C_RD_H1/Personal/liubo/singularity/22S03467478.indel.final.vcf -o /ifstj2/B2C_RD_H1/Personal/liubo/singularity/test/22S03467478.indel.vcfanno.tab --format vcf --vcf_info_field ANN --force_overwrite --tab --verbose --no_escape --everything --shift_3prime 1 --dir_plugins /ifstj2/B2C_RD_H1/Research_and_Development/03.database/VEP_plugins/VEP_plugins-release-108 --plugin TSSDistance --plugin TERT --custom /ifstj2/B2C_RD_H1/Personal/liubo/0.Pipeline/aio.NewAnnotation/subpipeline/submodel_annotation_vep/Database/human_maked.gene.gff.gz,,gff --custom /ifstj2/B2C_RD_H1/Research_and_Development/03.database/vep_inhouse_data/clinvar.vcf.gz,ClinVar,vcf,exact,0,CLNSIG,CLNREVSTAT,CLNDN |