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.
Tag: snakemake
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: Expand Incorrectly Defining Output Folders
I have a workaround based upon this discussion, so I don’t think this problem is especially urgent. However, before applying code to a larger number of folders, I would like to see if I can better understand what went wrong in an earlier version of the code. Here is the Snakemake code: I think that the problem is that the
Correctly consuming a multiline config file in snakemake as an input
For various reasons I would like to be able to define my inputs in a separate config file. My current version without using a config file looks like: Instead of this I would like my config file to be something like: And then my snakemake file would be: However, I get an error telling me that I have missing input
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
How do I write a snakemake input when not all jobs successfully output files from previous rule?
Basically, I have three snakemake rules (other than rule all) and cannot figure this problem out, despite the checkpoint resources. Rule one has my first and only file that I start with. It will have x outputs (the number varies depending on the input file). Each of those x outputs needs to be processed separately in rule 2, meaning that
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):