Hi!
I can't figure out what is wrong in my code. Snakemake reports this error
RuleException in line 8 of /storage1/GatkBwaTest/SnakemakeDir/snakefile2:
NameError: The name 'wildcard' is unknown in this context. Please make sure that you defined that variable. Also note that braces not used for variable access have to be escaped by repeating them, i.e. {{print $1}}
Сode looks like this:
(SAMPLES,) = glob_wildcards("../exom/{sample}_L001_R1_001.fastq")
INTERVALS = glob_wildcards("../SnakemakeInput/intervals/{interval}.bed")
rule all:
input:
expand("{sample}_R1.fastq", sample=SAMPLES)
rule sort:
output:
output1="{sample}_R1.fastq"
shell:
" zcat {wildcard.sample}*R1*.fastq.gz | paste - - - - | sort -k1,1 -S 30G | tr '\t' '\n' > {output.output1}"
I will be grateful for any answer!
what are you trying to do? you define both SAMPLES and INTERVALS, but you do not use them in the code?
I do not use intervals, because this is the first rule from a large pipeline. SAMPLES contains the name of the samples. For example NIST7035_TAAGGCGA_L001_R1_001.fastq.gz I want to use the first rule only for samples with R1 and add the same shell for R2