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
6
votes
2 answers

Snakemake: confusion on how to access config files properly

This question follows on from a question I asked previously and it regards understanding how to access config files correctly using Snakemake. I have a specific problem I need to address which I'll ask first and a general problem understanding how…
Darren
  • 277
  • 4
  • 17
6
votes
1 answer

Snakemake memory limiting

In Snakemake, I have 5 rules. For each I set the memory limit by resources mem_mb option. It looks like this: rule assembly: input: file1 = os.path.join(MAIN_DIR, "1.txt"), \ file2 = os.path.join(MAIN_DIR, "2.txt"), \ …
bapors
  • 887
  • 9
  • 26
6
votes
1 answer

SLURM / Sbatch creates many small output files

I am running a pipeline on a SLURM-cluster, and for some reason a lot of smaller files (between 500 and 2000 bytes in size) named along the lines of slurm-XXXXXX.out (where XXXXXX is a number). I've tried to find out what these files are on the…
erikfas
  • 4,357
  • 7
  • 28
  • 36
6
votes
1 answer

Multiple inputs and outputs in a single rule Snakemake file

I am getting started with Snakemake and I have a very basic question which I couldnt find the answer in snakemake tutorial. I want to create a single rule snakefile to download multiple files in linux one by one. The 'expand' can not be used in the…
Masih
  • 920
  • 2
  • 19
  • 36
6
votes
1 answer

How to get the basename of the wildcard values in the snakemake output rule?

In the following example, the output files will be created in the same location as the input files. Is there a way to get the basename of the wildcard value in the output section, so that I can use the basename of the input file to name the output…
Veera
  • 861
  • 1
  • 9
  • 18
6
votes
1 answer

How to use expand in snakemake when some particular combinations of wildcards are not desired?

Let's suppose that I have the following files, on which I want to apply some processing automatically using snakemake: test_input_C_1.txt test_input_B_2.txt test_input_A_2.txt test_input_A_1.txt The following snakefile uses expand to determine all…
bli
  • 7,549
  • 7
  • 48
  • 94
6
votes
2 answers

Prevent snakemake from making output directory

Is there a way to prevent snakemake from making a directory for output that doesn't exist yet? fimo from the MEME suite annoyingly fails at the end of a run if the directory already exists. My workaround is to give fimo a different directory to…
Harold
  • 293
  • 3
  • 10
6
votes
3 answers

How to do a partial expand in Snakemake?

I'm trying to first generate 4 files, for the LETTERS x NUMS combinations, then summarize over the NUMS to obtain one file per element in LETTERS: LETTERS = ["A", "B"] NUMS = ["1", "2"] rule all: input: expand("combined_{letter}.txt",…
bli
  • 7,549
  • 7
  • 48
  • 94
6
votes
2 answers

Always run rule in Snakefile (snakemake)

I am writing a Snakefile for a snakemake workflow. As part of my workflow I need to check whether a set of records in a database has changed, and if they have re-download them. My thought was to write a rule that checks the database timestamp and…
Chris
  • 1,313
  • 2
  • 13
  • 26
6
votes
4 answers

emacs mode for snakemake?

snakemake is a python-like replacement for make that is geared more towards workflows than compilation. It's quite nice, but also quite new, and I cannot seem to find a mode for it in Emacs. I just want something very simple: a very slight…
5
votes
2 answers

Perl installed via conda snakemake shell error: Can´t open perl script .. no such file or directory

I´m currently writing a snakemake pipeline, for which I want to include a perl script. The script is not written by me, but from a github page. I never worked with perl before. I installed perl (5.32.1) via conda. I have installed miniconda and am…
snakelake
  • 139
  • 5
5
votes
1 answer

Snakemake 'run' directive produces no error message

When I use the run directive in snakemake (using python code) it doesn't produce any kind of error message for troubleshooting. Is this desired behavior? Am I missing something? Here a minimal example using snakemake 7.8.3 and python 3.9.13. I…
Trillian Astra
  • 129
  • 1
  • 10
5
votes
2 answers

Can I define a default profile for snakemake?

From the documentation, I know that I can define a profile and use it via snakemake --profile Can I make one of these profiles the default (to be used when I enter the command snakemake)? Defining an alias in .bashrc would be a workaround.…
wheat
  • 116
  • 1
  • 1
  • 10
5
votes
1 answer

Best way for installing non-conda dependencies in Snakemake conda environments

I would like to be able to install R packages from GitHub in a R conda environment created by Snakemake, as well as python libraries via pip in a python environment. I'll use these environments in a whole set of rules thereafter. My initial thought…
Cainã Max Couto-Silva
  • 4,839
  • 1
  • 11
  • 35
5
votes
1 answer

problem with snakemake submitting jobs with multiple wildcard on SGE

I used snakemake on LSF cluster before and everything worked just fine. However, recently I migrated to SGE cluster and I am getting a very strange error when I try to run a job with more than one wildcard. When I try to submit a job based on this…
Kamil S Jaron
  • 494
  • 10
  • 23