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
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 …
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: rule get_genome_fasta: “”…
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 …
Use local directory for wrapper in Snakemake rule
I want to know how to use a local directory for wrapper in Snakemake rule. I have read this Use Github URL for wrapper in Snakemake rule and try follows command But, I get a stderr with ‘NoneType’ object has no attribute ‘name’. Any help is much appreciated. Thanks. AdvertisementAnswer It is (slightly hidden) mentioned […]