snakemake

module 'asyncio' has no attribute 'coroutine' on snakemake

module 'asyncio' has no attribute 'coroutine' on snakemake Question: I followed the following code to install snakemake on my linux machine : conda activate base mamba create -c conda-forge -c bioconda -n snakemake snakemake conda activate snakemake Everything was fine, but when I try to run the following code : snakemake -s Snakemake_job -j n …

Total answers: 1

How to get the number of total scattergather items in Snakemake scatter/gather?

How to get the number of total scattergather items in Snakemake scatter/gather? Question: I’m trying out Snakemake’s scatter/gather inbuilts but am stumbling over how to get the number of total splits configured. The documentation doesn’t mention how I can access that variable as defined in the workflow or passed through CLI. Docs say I should …

Total answers: 1

Snakemake: specify cluster per rule

Snakemake: specify cluster per rule Question: I am running a large workflow in snakemake, that employs cluster execution (–cluster qsub) and a custom profile (–profile custom) for execution in a user-specific computing environment. How can I specify which computing environment (cluster, profile or local) to use for every rule? Otherwise, would it be possible to …

Total answers: 1

Is there a way to introduce a temporary wildcard in Snakemake from a list?

Is there a way to introduce a temporary wildcard in Snakemake from a list? Question: I recently started using Snakemake. I am building a pipeline where the goal is to separate fractions of reads (based on their taxID by classification by Kraken2). I am having problems understanding how I may introduce a new wildcard based …

Total answers: 1

What is the format for a Snakemake JSON config file?

What is the format for a Snakemake JSON config file? Question: I can find examples of yaml config files, but I can’t find any json config files, and my guesses are failing How do I do this in a JSON config file, such that config["samples"] will return the correct values? Yaml: samples: A: data/samples/A.fastq B: …

Total answers: 1

Use expand in python to create string with multiple paired variables (snakemake)

Use expand in python to create string with multiple paired variables (snakemake) Question: Snakemake expand function Hello, I have a list of lists such as : list_ranges=[[0,9],[10,19],[20,29],[30,33]] How can I used expand in Snakemake in order to create 4 arguments such as : /user/Temp_dir/Ranges_0-9.tpm /user/Temp_dir/Ranges_10-19.tpm /user/Temp_dir/Ranges_20-29.tpm /user/Temp_dir/Ranges_30-33.tpm So far I tried ; expand("/user/Temp_dir/Ranges_{range1}-{range2}.tpm", range1 = …

Total answers: 1

Reserved name in Snakemake?

Reserved name in Snakemake? Question: I use Snakemake version 7.12.1 and I get the following error while trying to execute a pipeline: AttributeError: invalid name for input, output, wildcard, params or log: pop is reserved for internal use I normally use the word pop as the wildcard for population with no issue. After the raised …

Total answers: 1

Wrong snakemake glob_wilcards and wildcard_constraints

Wrong snakemake glob_wilcards and wildcard_constraints Question: 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 …

Total answers: 2

how to speed up task performing using snakemake

how to speed up task performing using snakemake Question: Machine: 48 cores, 96 threads, RAM 256GB System: Ubuntu 20.04 Python: 3.9 I have a python script for some data processing and analysis and an input dataset containing around 40,000 files for the job. The script could be run by python a.py -i sample_list.txt -o /path/to/outdir. …

Total answers: 1