我正在使用
。
在Linux和Mac系统上尝试使用该管道并禁用singularity容器后,似乎问题源于缺少字体库,因为当我仅在Mac上使用
singularity容器是从使用Debian GNU / Linux的this miniconda docker镜像构建的。 我已经成功创建了一个最小的示例管道,在其中文本不会被绘制。
要绘制断点图,请运行管道。
我该安装哪些包/库才能在Debian GNU/Linux上正确绘制R文本?
snakemake
构建管道,并使用conda
和singularity
环境来确保可重复性。 我遇到了一个错误,我的绘图中的文本被替换为矩形![enter image description here](https://istack.dev59.com/46aWR.webp)
在Linux和Mac系统上尝试使用该管道并禁用singularity容器后,似乎问题源于缺少字体库,因为当我仅在Mac上使用
conda
(--use-conda
)运行管道时,文本会正常绘制。singularity容器是从使用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文本?