Questions tagged [snakemake]

Snakemake is a workflow management system with a Python-style specification language.

Snakemake is a workflow management system with a Python-style specification language.

1634 questions
4
votes
1 answer

Preprocessing for wildcarded Snakemake rules

I have a Snakemake recipe which contains a very expensive preparatory step, common for all its calls. Here is a pseudorule for demonstration sake: rule sample: input: "{name}.config" output: "{name}.npz" run: …
abukaj
  • 2,582
  • 1
  • 22
  • 45
4
votes
1 answer

snakemake randomly identifying outputs as incomplete

I'm having some trouble with a snakemake workflow I developed. For a specific rule, the output is sometimes identified as incomplete by snakemake: IncompleteFilesException: The files below seem to be incomplete. If you are sure that certain files…
soungalo
  • 1,106
  • 2
  • 19
  • 34
4
votes
3 answers

Possible to have wildcard as dictionary key in snakemake rule output?

I need my output to be dynamic to input, the best way I thought to do is this by having output based on a dictionary. He is a stripped down example: config.yaml: {'names' : ['foo', 'bar']} Snakefile: configfile: "config.yaml" rule all: …
curious
  • 640
  • 4
  • 10
4
votes
2 answers

Acess scripts in external snakemake directory without defining absolute path

My end goal is to host a snakemake workflow on a GitHub repo that can be accessed as a snakemake module. I'm testing locally before I host it, but I'm running into an issue. I cannot access the scripts in the snakemake module directory. It looks…
Robert Link
  • 367
  • 2
  • 9
4
votes
2 answers

"Select jobs to execute..." runs literally forever

I have a rather complex workflow with 750 samples and roughly 18.000 jobs, at first snakemake runs just fine but then after around 4.000 jobs it suddenly freezes and upon restart it hangs with "Select jobs to execute..." for 24h, after that I…
Daniel Fischer
  • 3,280
  • 1
  • 18
  • 29
4
votes
1 answer

Conda environment is not activated in snakemake for rules declared as local

I have an issue with Snakemake v5.26.1 and I am not sure whether this is a bug or whether I am doing something wrong. I have the following rule: rule multiqc: input: expand('results/{project}/fastqc/{sample}/{sample}_R{idx}_fastqc.{ext}',…
Dimitris
  • 41
  • 4
4
votes
1 answer

Best practices for (bio)conda versions in Snakemake wrappers?

What would be best environment.yml practices for specifying packages in Snakemake wrappers using conda? I understand that the channels should be: channels: - conda-forge - bioconda - base However, what is a good choice for specifying…
Manuel
  • 6,461
  • 7
  • 40
  • 54
4
votes
2 answers

ERROR: (gcloud.container.clusters.create) ResponseError: code=400, message=Failed

Hi I am getting following error ERROR: (gcloud.container.clusters.create) ResponseError: code=400, message=Failed precondition when calling the ServiceConsumerManager: tenantmanager::185014: Consumer 370525719069 should enable…
DISHA98 LODHA
  • 85
  • 1
  • 5
4
votes
1 answer

Snakemake: Tranverse DAG depth-first?

Snakemake appears to traverse the DAG in a breadth-first manner. Is it possible (e.g. through an option / flag / etc.) to force snakemake to traverse the DAG depth-first?
Scholar
  • 463
  • 5
  • 19
4
votes
2 answers

Snakemake cannot handle very long command line?

This is a very strange problem. When my {input} specified in the rule section is a list of <200 files, snakemake worked all right. But when {input} has more than 500 files, snakemake just quitted with messages (one of the commands exited with…
zhanxw
  • 3,159
  • 3
  • 34
  • 32
4
votes
3 answers

Python: Undefined variable: 'snakemake', ignore warning, or ideally autocomplete for real

I'm using Snakemake and it's been rather enjoyable, but I would love it if VSCode stopped complaining about Undefined variable: 'snakemake'. The issue is that Snakemake runs jobs in such a way that it injects this global into your python scope, but…
wulftone
  • 1,628
  • 1
  • 18
  • 34
4
votes
0 answers

Pipes in Snakemake: how to share resources between rules?

My regular way of piping, partially based upon this Biostars post, is the following: rule map: input: "{sample}.fq.gz", output: "sort/{sample}.bam" threads: 24 shell: """ bwa mem reference.fa {input} \ -t {threads} |…
DriesB
  • 41
  • 3
4
votes
1 answer

lambda function in snakemake output

I currently have a snakemake workflow that requires the use of lambda wildcards, set up as follows: Snakefile: configfile: "config.yaml" workdir: config["work"] rule all: input: expand("logs/bwa/{ref}.log", ref=config["refs"]) rule…
Ensa
  • 105
  • 1
  • 5
4
votes
3 answers

Snakemake: pass command line arguments to scripts

I am using some python scripts with snakemake to automate the workflow. These scripts take in command line arguments and, while I could replace them with snakemake.input[0], snakemake.output[0], etc, I am reluctant to do so since I'd also like to be…
mbarete
  • 399
  • 2
  • 17
4
votes
2 answers

Use special symbols in Snakemake parameter section

I have created the following snakemake rule: rule cutadapt: input: input output: output log: logs params: "-a 'A{100}' --nextseq-trim=20 -m 20" wrapper: "0.50.4/bio/cutadapt/se" and I get…
pat2402
  • 79
  • 7