Skip to content
Advertisement

Tag: snakemake

Snakemake doesn’t activate conda environment correctly

I have a Python module modulename installed in a conda environment called myenvname. My snakemake file consists of one simple rule: The contents of the test2.py are the following: When I run the above snakemake file with the command snakemake -j 1 –use-conda –conda-frontend conda I get ModuleNotFoundError, which would imply that there is no modulename in my specified environment.

Is there a function in snakemake to make the list of output dependent on the arguments passed into the shell command

I have a snakemake rule that calls a python program, the output of the python program is dependent on the arguments passed. I would like to make snakemake aware of the differences between the expected output when a certain parameter is passed (Boolean) or not passed. My current solution is to create a list of output list_phen_gen_output dependent on the

Wrong snakemake glob_wilcards and wildcard_constraints

Within my snakemake pipeline I’m trying to retrieve the correct wildcards. I’ve looked into wildcard_constraints and this post and this post, however I can’t figure out the exact solution. Here’s an example of file names within 2 datasets. 1 dataset contains paired mouse RNAseq read files and another dataset contains human paired RNAseq read files. “Mus_musculus” dataset is “PRJNA362883_GSE93946_SRP097621” with

snakemake – accessing config variables from cluster submission wrapper

I am using a cluster submission wrapper script with snakemake –cluster “python qsub_script.py”. I need to pass a global variable, taken from the config[‘someVar’]. This should be applied to all rules. I could add it to the params of each rule, and then access it using job_properties[‘params’][‘someVar’], but this is probably not the best solution. Is there a way to

Snakemake use all samples as one input with porechop

I’m trying to use porechop on several data with a Snakemake workflow. In my Snakefile, there are three rules, a fastqc rule and a porechop rule, in addition to the all rule. The fastqc rule works very well, I have all three out for my three fastq. But for porechop, instead of running the command three times, it runs the

Snakemake: Difference between wildcard.wildcard_name and {wildcard}?

I’m in the process of learning Snakemake, and I’m confused about the difference between wildcard.wildcard_name and {wildcard_name}. For example, if this is the rule: What is the difference between wildcards.genome_id and {genome_id}? Thank you so much! Answer First, you need to be aware that Snakemake is based on Python. It will help if you are familiar with the syntax of

Snakemake – How to set conda environment path

In Snakemake, conda environments can be easily set up by defining rules as such conda: “envs/my_environment.yaml”. This way, YAML files specify which packages to install prior to running the pipeline. Some software requires a path to third-party-software, to execute specific commands. An example of this is when generating a reference index with RSEM (example from GitHub page DeweyLab – RSEM):

Advertisement