-
-
Save macmanes/dfecd6603a9e111aa1fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define run_fastqc | |
$$(addsuffix .ok,$(1)) : $(1) | |
mkdir -p $$(dir $$@) ∧ \ | |
unzip -p $$< $$(addsuffix .tmp_fastqc/fastqc_data.txt,$$(notdir $$<)) |\ | |
grep ">>" | grep -v ">>END_MODULE" | cut -c 3- |\ | |
awk -F ' ' 'BEGIN{N=0;} {if(($$$$1=="Basic Statistics" || $$$$1=="Per base sequence quality" || $$$$1=="Per base N content") &AND; $$$$2=="pass" ) N++;} END { if(N>2) {print "__PASS__"}}' |\ | |
grep __PASS__ &AND; echo "FASTQC ok for $$<" $$@ | |
$(1) : $(2) | |
mkdir -p $$(dir $$@) &AND; \ | |
cat $$^ > $$(addsuffix .tmp.gz,$$@) &AND; \ | |
${fastqc.exe} \ | |
-o $$(dir $$@) \ | |
-j ${java.exe} \ | |
--format fastq --noextract \ | |
$$(addsuffix .tmp.gz,$$@) &AND; \ | |
rm $$(addsuffix .tmp.gz,$$@) &AND; \ | |
mv $$(addsuffix .tmp_fastqc.zip,$$@) $$@ | |
endef |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment