[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Question on declarative scripting: Concatenate two patsubst
From: |
address@hidden |
Subject: |
Question on declarative scripting: Concatenate two patsubst |
Date: |
Fri, 5 May 2017 15:28:42 +0200 (CEST) |
Dear All,
I try to learn makefile language. I want launch a tools using make.
On the RAW folder I have my input file (R1 and R2)
My tool need 2 input files and I prepare using patsubst. Here an example of
input file
RAW/290_CGATGT_L001_R1_001.fastq.gz RAW/300_CCGTCC_L001_R2_001.fastq.gz
I want to obtain this command:
$(RFILES)
$(OUTFILE)
$(OUTKAL)
kallisto -i RAW/290_CGATGT_L001_R1_001.fastq.gz -2
RAW/300_CCGTCC_L001_R2_001.fastq.gz > 300_CCGTCC_L001.sam
So this is where I arrived. I have able t create all 3 parameter but I'm not
able to run on one directive.
RDIR=RAW
OUTDIR=FINAL
RFILES:=$(wildcard $(RDIR)/*_R1_001.fastq.gz)
OUTFILE=$(patsubst %_R1_001.fastq.gz,%_R2_001.fastq.gz,$(RFILES))
OUTKAL=$(patsubst $(RDIR)/%_R1_001.fastq.gz,$(OUTDIR)/%,$(RFILES))
.PHONY: clean all
all: $(OUTFILE) $(RFILES) $(OUTDIR) $(OUTKAL)
$(OUTFILE): $(RFILES)
-echo $< $@
$(OUTKAL):$(RFILES) $(OUTFILE)
-echo "mitico -i " $<" -" " >" $@
$(OUTDIR):
mkdir -p $(OUTDIR)
clean::
$(RM) -rf $(OUTDIR)
Could you help me please?
thanks so much for any help!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Question on declarative scripting: Concatenate two patsubst,
address@hidden <=