10
votes
Accepted
9
votes
Accepted
Snakemake: Cannot find first rule?
you are starting snakemake the wrong way.
snakemake snakemake
means "Running the pipeline in ...
9
votes
Accepted
How to resolve in snakemake error : "Target rules may not contain wildcards."
The problem is that you need a master rule that requires all of your desired outputs as inputs, in your case it would be :
...
7
votes
Accepted
How can I ask snakemake to produce a dag where each node represents a rule?
I think you are looking for --rulegraph instead of --dag
...
5
votes
Accepted
How to specify resources for cluster in snakemake
This feature was added in version 3.6.0. Look at release notes.
{wildcards} normally expands to a something that looks vaguely like a dictionary. In other words, ...
5
votes
Accepted
How are snakemake's --cluster and --drmaa options implemented?
I'd always kind of wondered how this worked too, so I took this as an excuse to look into the snakemake code. At the end of the day this becomes a question of (1) how are jobs actually submitted and (...
5
votes
Running Snakemake in one single conda env
A good practice is to provide yml file along with your Snakefile. This file should contain all the enviroment definitions that ...
5
votes
Accepted
Snakemake and SLURM -unable to use it with with --cluster
In your submission script you have -n {-cluster.n}, hence the error from snakemake I guess. Are you sure it is not a typo and it should be ...
5
votes
Accepted
Running Snakemake in one single conda env
Using only the --use-conda directive, snakemake copies environments somewhere in the local .snakemake directory. This is ...
5
votes
Accepted
Mix globbing and wildcards when specifying rule input
A nice solution comes from a colleague of mine, as seen in this Snakemake workflow. The trick is to access the wildcards programmatically using an anonymous (lambda) function. In my example above, it ...
5
votes
Accepted
'Wildcards' object has no attribute 'sample'
Snakemake gets wildcards from the parsing the input/output file names.
For example, if you had
...
5
votes
How do I write tests for a snakemake pipeline?
You can run CI on a snakemake workflow when provoding a minimal example dataset. Maybe an example from the snakemake-workflows repo will be helpful: https://github.com/snakemake-workflows/dna-seq-...
5
votes
Accepted
snakemake multiple parameters for multiple input and single output in snakemake. ConbineGVCFs gatk problem
Found out the problem. Turns out I can write a lambda function as follows
params:
extra=lambda wildcards, input: ' -V '.join(input.all_gvcf_list)
and add '-...
5
votes
Modification time does not trigger a snakemake rule
This is a Snakemake feature: For small files (less than 100000 bytes), checksums are compared to determine if a job needs to run if the input file is newer than output file:
https://github.com/...
4
votes
Accepted
How can I specify an email address in the SLURM snakemake json configuration file?
As noted by the comments and the SLURM manual (not so much bioinformatics related?)
You need the following terms in your batch/queuing command:
...
4
votes
Accepted
Output file names are not known beforehand
Could you give an example of names of input files and output files of normalize.py ?
It seems to me that your case could be similar to the one described about the <...
4
votes
How are snakemake's --cluster and --drmaa options implemented?
DRMAA (Distributed Resource Management Application API) appears to be an open API that describes a specification for submission and management of work submitted to some grid/cluster. If your scheduler ...
4
votes
Accepted
conda doesn't install latest version of snakemake
Python (whether installed with conda or not) will prefer packages installed in your home directory unless you tell it not to. This is a little known secret about using a virtualenv, actually, since ...
4
votes
Accepted
Can't install snakemake v5.15.0 from conda
This is an example of the conda solver behaving incorrectly. In this case, it's choosing to pick a version that minimizes the number of dependencies required. Version 5.3.0 has 25 fewer dependencies, ...
4
votes
Accepted
How to modify execution orders for Snakemake?
I think you should use the priority directive to give precedence to downstream rule(s).
Here below I give higher priority to step2 so when the first sample has ...
4
votes
Accepted
How can I incorporate wildcards in Snakemake in an R script?
Your problem is that Snakemake is passing all the input data to the R script simultaneously instead of running them individually :)
As written your rule takes a list of input files and gives a list of ...
3
votes
How to resolve in snakemake error : "Target rules may not contain wildcards."
Given the Makefile you provided and which someone then deleted from the question, you should probably just add this line (this should be the first rule):
...
3
votes
3
votes
Accepted
Dealing with absence of coverage
I'll fix the bamCoverage issue in the 2.6.0 release (it may already be fixed since I rewrite how bigWig files are made for that release). You can follow my status ...
3
votes
How to specify resources for cluster in snakemake
The solutions are either, upgrade snakemake or just take all wildcards out of cluster.json file and write them directly to ...
3
votes
Accepted
Running snakemake with multiple conda environments without rebuilding environments every time
Each YAML file will always create its own environment. The packages in each aren't downloaded and installed each time, if they're already installed elsewhere they're just hard-linked in. You'll want ...
3
votes
Accepted
Snakemake: Re-read the samples.tsv file midway through the workflow
You're right, it doesn't re-run things again for each job, so your original definition of samples is still the one it's working with.
It seems like it goes against ...
2
votes
Accepted
Python string editing in Snakemake
It seems that it is not possible to apply strip() directly on the wildcard placeholders. Luckily it is possible to executed functions in the ...
2
votes
Accepted
combining the use of workdir and option --jobscript in snakemake
To quote from the snakemake documentation
All paths in the snakefile are interpreted relative to the directory snakemake is executed in. This behaviour can be overridden by specifying a workdir in ...
2
votes
Accepted
Access workdir defined on command line from within Snakefile
You could query Python for the working directory within the Snakefile, since evidently Snakemake changes the actual working directory of the process to the one specified by ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
snakemake × 64python × 17
conda × 7
hpc × 5
workflow-management × 4
rna-seq × 3
ngs × 2
variant-calling × 2
gatk × 2
quality-control × 2
fastqc × 2
bioconda × 2
slurm × 2
r × 1
snp × 1
nanopore × 1
software-installation × 1
errors × 1
bcftools × 1
deeptools × 1
public-dataset × 1
salmon × 1
docker × 1
reproducibility × 1
anaconda × 1