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

snakemake job fails if --drmaa-log-dir specified

I am using snakemake v. 5.7.0. The pipeline runs correctly when either launched locally or submitted to SLURM via snakemake --drmaa: jobs get submitted, everything works as expected. However, in the latter case, a number of slurm log files is…
January
  • 16,320
  • 6
  • 52
  • 74
4
votes
1 answer

Snakemake variable number of files

I'm in a situation, where I would like to scatter my workflow into a variable number of chunks, which I don't know beforehand. Maybe it is easiest to explain the problem by being concrete: Someone has handed me FASTQ files demultiplexed using…
Michael Knudsen
  • 629
  • 1
  • 7
  • 23
4
votes
2 answers

How to set binding memory limits in snakemake

I would like to have Snakemake set binding memory limits for individual rules. Based on the snakemake documentation, mem_mb argument seems like it would work, but the job uses more memory than I've allocated. Here's a simple rule that uses several…
karldw
  • 361
  • 3
  • 12
4
votes
1 answer

Replacing --cluster-config with --profile in snakemake

Recent version of Snakemake (v5.10.10) says cluster configuration has been deprecated and recommends to use profiles instead. However, I don't see any documentation on how to go about this. How do I convert the following cluster config (example used…
Manavalan Gajapathy
  • 3,900
  • 2
  • 20
  • 43
4
votes
1 answer

Snakemake: expand params

I am trying to build a simple workflow to feed a list of parameters to a script. To illustrate: SAMPLES=['A','B'] rule test: params: sample=expand("{sample}", sample=SAMPLES) script: "test.py {params.sample}" However,…
4
votes
1 answer

Why is the shell command not executed by snakemake

I've started working through a snakemake tutorial and the very first workflow from there does not work. Here is the rule I am using: rule make_a_copy: input: "a.txt" output: "a_copy.txt" shell: """ copy…
Evgenii
  • 335
  • 2
  • 11
4
votes
1 answer

Snakemake wrappers fails to open environment file: HTTP Error 404: Not Found

When using snakemake wrappers with snakemake version 5.5.2 like this: rule bcf_to_vcf: input: "{prefix}.bcf" output: "{prefix}.vcf" params: "" # optional parameters for bcftools view (except -o) wrapper: …
m00am
  • 5,910
  • 11
  • 53
  • 69
4
votes
3 answers

Snakemake - load cluster modules before an external script is called

In snakemake, you can call external scripts like so: rule NAME: input: "path/to/inputfile", "path/to/other/inputfile" output: "path/to/outputfile", "path/to/another/outputfile" script: …
bgbrink
  • 643
  • 1
  • 6
  • 23
4
votes
1 answer

Error submitting jobs on a condor cluster with snakemake

I am trying to sumbit some snakemake jobs to a condor cluster with the following command. snakemake -f TestJob --cluster-config cluster.json -j 30 --cluster condor_submit where the TestJob rule is specified in the SnakeFile rule TestJob: …
4
votes
2 answers

Snakemake - How to use every line of input file as wildcard

I am pretty new to using Snakemake and I have looked around on SO to see if there is a solution for the below - I am almost very close to a solution, but not there yet. I have a single column file containing a list of SRA ids and I want to use…
user10101904
  • 427
  • 2
  • 12
4
votes
2 answers

Is it possible to have an optional output file in Snakemake?

I'm writing a snakemake rule that will handle performing fastq trimming on either single or paired end sequencing data. If the data is paired end there should be two output files, if single end, there should be one. The rule I have written works so…
Al Bro
  • 383
  • 5
  • 15
4
votes
1 answer

How to determine failed rule in "onerror"?

I'm using snakemake for some automation and had a question about determining which rule fails when 'onerror' is called. I have tried cycling through the rules to determine which outputs don't exist, but the rules aren't ordered correctly. Here's…
4
votes
2 answers

How to get pairs of brace expansions without getting all combinations?

I work on macOS High Sierra 10.13.3. My shell is bash. When I type, echo {1,2}{3,4} I get: 13 14 23 24. Is there an option to get 13 24 only? I am interested in creating many files where two locations in a file vary together. For example, I want…
charlesdarwin
  • 717
  • 1
  • 9
  • 16
4
votes
1 answer

Executable Snakefile

I was overjoyed a few years ago to learn that I could make a Makefile executable with a shebang: #!/usr/bin/env make -f That way I could invoke my workflow with ./my-pipeline instead of make -f my-pipeline. I've since began favoring Snakemake over…
Daniel Standage
  • 8,136
  • 19
  • 69
  • 116
4
votes
2 answers

Snakemake: Ignore Rprofile when executing an R script

I'm experiencing some problems with executing R scripts in my snakemake workflow. It seems that my personal .Rprofile is loaded inside the R script. The job is run inside a singularity container and the problem is that I automatically load some…
fakechek
  • 239
  • 2
  • 14