I want to use a pipeline that requires an * and R{1,2} in the input string.
rule preprocess:
input:
reads = '{WORKDIR}/*/*R{1,2}.fastq.gz'
output:
bam = '{WORKDIR}/mapping/bwa/{sample}.bam'
shell:
"nextflow run somePipeline "
"--reads '{input.reads}' "
The final shell command should be:
nextflow run somePipeline --reads 'work_dir/main_sample_folder/*/*R{1,2}.fastq.gz'
However, Snakemake thinks 'R{1,2} is a wildcard and produces the following error:
Wildcards in input files cannot be determined from output files:
'1'
I've tried escaping the curly brackets with double curly brackets R{{1,2}} and with backslash R\{1,2\}, but it did not work.
How to escape R{1,2} part of the input, so that Snakemake does not think this is a wildcard, rather a part of the string?