Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
蛇毒+;Docker卷-“Docker卷”;“缺少规则例外情况”;_Docker_Snakemake - Fatal编程技术网

蛇毒+;Docker卷-“Docker卷”;“缺少规则例外情况”;

蛇毒+;Docker卷-“Docker卷”;“缺少规则例外情况”;,docker,snakemake,Docker,Snakemake,我正在尝试将snakemake与docker映像一起使用,但docker卷有问题。不幸的是,关于如何使用“singularity args”来实现这一点,目前还没有详细的说明 我的蛇形档案是: rule all: input: 'a/file3.txt' rule step1: output: touch('a/file1.txt') rule step2: input: rules.step1.output[0]

我正在尝试将snakemake与docker映像一起使用,但docker卷有问题。不幸的是,关于如何使用“singularity args”来实现这一点,目前还没有详细的说明

我的蛇形档案是:

rule all:
    input:
        'a/file3.txt'

rule step1:
    output:
        touch('a/file1.txt')

rule step2:
    input:
        rules.step1.output[0]
    output:
        'a/file2.txt'
    params:
        text = 'this is a test',
        path = '/data/file2.txt'
    singularity:
        "docker://XXX/test"
    shell:
        "python test.py {params.text} {params.path}"

rule step3:
    input:
        rules.step2.output[0]
    output:
        touch('a/file3.txt')
docker映像基本上是一个python文件,它将字符串写入文件(用于测试目的)。我正在尝试将我的主目录装载到docker/data目录。使用docker,我可以使用'-v'装入卷

用蛇毒做这件事的正确方法是什么

我尝试了以下命令(在MacOS和Ubuntu18.04上),但都失败了

snakemake -s pipeline.py --use-singularity --singularity-args “-B /home/XXX/snakemake/a:/data”
snakemake -s pipeline.py --use-singularity --singularity-args “-B /home/XXX/snakemake/a”
错误消息是:

No rule to produce /home/XXX/snakemake/a:/data” (if you use input functions make sure that they don't raise unexpected exceptions).
我漏了一步吗


提前谢谢

我可以通过以下命令在Ubuntu 18.04上运行它:

SINGULARITY_BINDPATH=“/home/XXX/snakemake/a:/data”; snakemake -s pipeline.py --latency-wait 10 --use-singularity
不幸的是,我没能让标志--“奇点args”起作用。无论使用'--bind'还是'-B',我都会得到错误“没有生成/Users/XXX/Devel/snakemake/a:/data的规则”

我在Python3虚拟环境中使用Snakemake 5.6.0。 另外,顺便说一句,我不相信MacOS奇点二进制是有效的。它和蛇怪有问题

现在这项工作已经足够好了

更新


虽然这个解决方案有效,但真正的解决方案(打字错误)是由@dariober提供的。

只是一个简单的检查。。。在命令行中,您有倾斜的双引号(
),而不是直引号(
),例如:


可能您是从使用倾斜引号的文本编辑器复制和粘贴的?我会使用直引号,因为其他类型可能会以错误的方式进行解释。

就是这样!我总是使用文本编辑进行注释,它一定已经替换了引号。太棒了!
snakemake -s pipeline.py --use-singularity --singularity-args “-B /home/XXX/snakemake/a”