【发布时间】:2020-02-25 19:08:55
【问题描述】:
我正在使用snakemake 构建管道,并使用conda 和singularity 环境来确保可重复性。我遇到了一个错误,我的地块上的文本被矩形替换
在 Linux 和 Mac 系统上试验管道并禁用奇异容器后,问题似乎源于缺少字体库,因为当我仅使用 conda (--use-conda ) 在我的 Mac 上。
奇点容器是从使用 Debian GNU/Linux 的 this miniconda docker 镜像构建的。 我设法创建了一个不会绘制文本的最小示例管道。
# Snakefile
singularity: "docker://continuumio/miniconda3"
rule all:
input:
"mtcars-plot.png"
rule plot_mtcars:
output:
"mtcars-plot.png"
conda:
"minimal.yaml"
script:
"mtcars-test.R"
# mtcars-test.R
library(ggplot2)
png("mtcars-plot.png")
ggplot(mtcars, aes(factor(cyl), mpg)) + geom_boxplot()
dev.off()
# minimal.yaml
channels:
- bioconda
- conda-forge
- defaults
dependencies:
- r-base =3.6
- r-ggplot2
要绘制断线图,请运行管道
snakemake --use-conda --use-singularity
在 Debian GNU/Linux 上使用 R 正确绘制文本可能会缺少哪些软件包/库?
【问题讨论】:
-
似乎与此有关:github.com/ContinuumIO/anaconda-issues/issues/7455 那台机器上安装了字体吗?似乎也在这里讨论:github.com/conda-forge/r-base-feedstock/issues/91
-
感谢@MrFlick 的链接,这些链接帮助解决了这个问题!
标签: r linux pipeline snakemake singularity-container