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
3
votes
1 answer

Obtain actual --cores [N], --jobs [N], -j [N] value given from command line within the snakefile

How is it possible to access all configuration values and corresponding parameters passed by command line to snakemake, within the snakefile? For example by running: snakemake -p --use-conda -j 16 --snakefile ../../Snakefile --configfile…
vid1998
  • 71
  • 1
  • 5
3
votes
1 answer

Access jobid inside cluster.yaml file

I am trying to use a different directory for logs of a snakemake workflow run on a cluster. Therefore, my cluster.yaml file looks like: __default__: time: 5:00:00 threads: 5 vmem: 10G #stderr:…
3
votes
1 answer

fastqc using Snakemake

I have a list of samples going through Snakemake. When I arrive at my fastqc step, I suddenly have two files per sample (an R1 and R2 file). Consider the following rule: rule fastqc: input: os.path.join(fastq_dir,…
Freek
  • 1,097
  • 2
  • 12
  • 30
3
votes
1 answer

Snakemake and Pandas syntax: Getting sample specific parameters from the sample table

First off all, this could be a duplicate of Snakemake and pandas syntax. However, I'm still confused so I'd like to explain again. In Snakemake I have loaded a sample table with several columns. One of the columns is called 'Read1', it contains…
Freek
  • 1,097
  • 2
  • 12
  • 30
3
votes
1 answer

How does Snakemake parse slurm jobid with --cluster-status and sacct used

I am running a large snakemake (v5.3.0) pipeline using a slurm scheduler (v14.11.4). Unfortunately ~1/1000 jobs crash with a NODE_FAILED (ExitCode 0) which snakemake does not recognise, leading to half finished output files. In order to make…
Feliks
  • 154
  • 2
  • 9
3
votes
1 answer

snakemake rule calls a shell script but exits after first command

I have a shell script that works well if I just run it from command line. When I call it from a rule within snakemake it fails. The script runs a for loop over a file of identifiers and uses those to grep the sequences from a fastq file followed by…
Mack123456
  • 376
  • 2
  • 8
3
votes
1 answer

RSeQC with multiQC and snakemake

I want to include RSeQC results using multiQC in a snakemake workflows. I have the issue that one of the RSeQC tool only reports a .r and a .pdf while it seems that multiQC requires a .txt input to create a plot. Has anyone working code for…
splaisan
  • 845
  • 6
  • 22
3
votes
1 answer

Arithmetic on "threads" wildcard in rule definition

In my workflow, I have two multithreaded programs that I am piping together. See the rule definition from my Snakemake file below. rule do_the_thing: input: 'input.dat' output: 'output.dat' threads: 16 shell: 'cmd1 --threads…
Daniel Standage
  • 8,136
  • 19
  • 69
  • 116
3
votes
0 answers

limit total thread use, number of jobs, and maximum threads per rule when using qsub with snakemake

I'm looking for a way to be able to specify from the command line: the total number of threads to be used at the same time (even if by multiple jobs) the maximal number of jobs to run in parallel (which I currently successfully get using --jobs so…
3
votes
2 answers

Why is Snakemake not seeing symbol link files?

I have a rule whose output files are symbolic link files. Even though the link files are being made, Snakemake exits with a MissingOutputException and lists the output files as being missing. If instead of making a symlink with "ln -s" I copy the…
tedtoal
  • 1,030
  • 1
  • 10
  • 22
3
votes
1 answer

Using Conda enviroment in SnakeMake on SGE cluster problem

Related: SnakeMake rule with Python script, conda and cluster I have been trying to set up my SnakeMake pipelines to run on SGE clusters (qsub). Using simple commands or tools that are installed directly to computational nodes, there is no…
user44697
  • 313
  • 4
  • 11
3
votes
0 answers

Access command line --jobs parameter in Snakefile

Is there a way to access the --jobs (or -j) parameter specified on the command line when running snakemake directly in the Snakefile without going through a parsing of the command line (sys.argv, argparse, etc...)? One would think all command line…
Eric C.
  • 3,310
  • 2
  • 22
  • 29
3
votes
4 answers

snakemake: optional input for rules

I was wondering if there is a way to have optional inputs in rules. An example case is excluding unpaired reads for alignment (or having only unpaired reads). A pseudo rule example: rule hisat2_align: input: rU: lambda wildcards: ('-U…
meono
  • 58
  • 1
  • 6
3
votes
0 answers

Dynamic jobs not executed, pipeline stoping at 50%

I don't understand why my snakemake process stops at 50% and does not whant to proceed eventhough the DAG and the dry-run knows there are new things to be done. I have a snakefile that: Prints a wonderful DAG Counts a correct number of jobs Here…
tdayris
  • 31
  • 5
3
votes
0 answers

Snakemake does not recognize symlinked files as input files

I am running a snakemake pipeline on a couple of files that I symlinked from another directory. However, it seems that the snakemake file does not recognize the input files when they are symlinked. Is this supposed to happen, or is there someway…
dddxxx
  • 349
  • 2
  • 12