Hi,
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 [???]
Thanks for your input, Pierre! Unfortunately, neither of the options works. Given three pairs of fastq files, using the word option outputs the first mate of the first pair of fastq and the first mate of the second pair instead of mate1 and mate2 of the first pair. See below my test case output:
Edit: Nevermind! Finally found the way. I leave the fix here just in case :)
or just
should be (two prerequistes: if $(fastq_p2) is changed, then fastq_p1_trimmed must be recomputed