I have tons of fastq files that I need to analyze, and I'm creating a Makefile template (to be filled with python+jinja2) to make all speedy and robust. Just as a clarification, I'm pretty new to Make in general :)
My main problem is that sometimes i will have paired end data, and I'm not really sure how to pass paired files to a command where the arguments have to be specificed with different flags ([???] in the example). With non-paired I could use $^ but in this case it doesn't seem to be suitable.
Any ideas? :)
fastq_p1 := $(wildcard *_1.fastq.gz) fastq_p2 := $(wildcard *_2.fastq.gz) fastq_p1_trimmed := $(fastq_p1:_1.fastq.gz=_1.trimmed.fastq.gz) fastq_p2_trimmed := $(fastq_p1:_1.fastq.gz=_2.trimmed.fastq.gz) bamfiles := $(fastq_p1:_1.fastq.gz=.bam) $(fastq_p1_trimmed) $(fastq_p2_trimmed) : $(fastq_p1) $(fastq_p2) flexbar -r [???] -p [???]