Rule in snakemake using singularity: unterminated quoted string
0
0
Entering edit mode
3.7 years ago
compuTE ▴ 140

I'm running a snakemake pipeline that for a specific rule loads a container:

rule counts:
params:
    transcriptome=os.environ["INDEX"],
    outdir= (os.environ["OUTDIR"] + "/counts/"),
    indir= (os.environ["INDIR"] + "{sample}"),
    name = lambda wildcards: SAMPLES[wildcards.sample]
output:
    (os.environ["OUTDIR"] + "counts/" + "{sample}" + "/outs/web_summary.html")
container:
    "docker://marcusczi/cellranger_clean"
shell:
    """
    cellranger count --id={wildcards.sample} --transcriptome={params.transcriptome} --fastqs={params.indir} --sample={params.name}

    mkdir -p {params.outdir}
    mv ./{wildcards.sample}/ {params.outdir}

    """

Dry run looks fine, the rule itself I'm sure it works (tried it without the container). However, when I run it with docker I get this error:

Activating singularity image /some/path/.snakemake/singularity/c288fbc3fef5771f055a688c6678c24d.simg
/bin/sh: syntax error: unterminated quoted string
[    1.228141] reboot: Power down

And then it waits for the missing files, and fails.

I think the answer to this situation might be related to this previous question, but I have tried everything i can think of in terms of escaping characters (except for the wildcards and variables within curly brackets because I'm guessing it should be fine, and if not why am i even using snakemake :-( ). The paths for the directories I'm using are valid and exist, the name and wildcard "sample" are in the shape "sample_123", nothing fancy.

It's also worth saying that there are no single or double quotes in any of these variables.

I am in macos catalina 10.15.5, running snakemake 5.20.1, and I have been using the beta version of singularity for macos (3.3.0-rc.1.658.g7427b73f1.dirty).

I tried running the singularity outside snakemake, the software that I'm trying to run starts, but then complains that there is no disk left on space (which is not true). I'm running the singularity as sudo singularity run -B "$(pwd):$(pwd)" docker://marcusczi/cellranger_clean

I think this latest error might be either 1) I'm not running singularity as I should..? Or 2) A false statement of what is happening since cellranger (the software I'm trying to run) often has misleading error messages.

Thank you!!!

singularity snakemake docker cellranger • 1.3k views
ADD COMMENT

Login before adding your answer.

Traffic: 1979 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6