File: Makefile

package info (click to toggle)
pique 1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,944 kB
  • sloc: perl: 1,064; makefile: 133; sh: 40
file content (92 lines) | stat: -rw-r--r-- 2,522 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#@(#)Makefile  2025-04-30  A.J.Travis and A.Douglas, last modified by Étienne Mollier

#
# PIQUE - Parallel Identification Of QTL's using EMMAX
#

PLINK = plink1.9
PIQUE-INPUT = pique-input
PIQUE-RUN = pique-run
PHENO_GROUP = rice_phenotype_group.txt
PHENO = rice_phenotype.txt
PLOT_FILES = plot_files.txt
IPREFIX = sativas413
OPREFIX = sativas_GWAS
TPREFIX = sativas_GWAS_trans
GPREFIX = sativas_group_GWAS
GROUPS = ADMIX AUS IND TEJ TRJ
THREADS = 16
OPT = -d -v
TEST := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
PATH := $(realpath $(TEST)/../bin):$(PATH)

help:
	@echo "Targets:"
	@echo "\tinput"
	@echo "\trun"
	@echo "\ttrans"
	@echo "\tgroup"
	@echo "\ttest_vcf"
	@echo "\tld"
	@echo "\tblocks"
	@echo "\tplot"
	@echo "\tall"

all:  input run trans group test_vcf ld blocks plot

input: $(IPREFIX).ped
	$(PIQUE-INPUT) $(OPT) -i $(IPREFIX) -o $(OPREFIX) -p $(PHENO) -k -c -e 5
	touch input

run: input
	$(PIQUE-RUN) $(OPT) -i $(OPREFIX) -k IBS -c $(OPREFIX).covar -n $(THREADS)
	touch run

trans: $(IPREFIX).ped
	rm -rf $(TPREFIX)
	$(PIQUE-INPUT) $(OPT) -i $(IPREFIX) -o $(TPREFIX) -p $(PHENO) -k -c -e 5
	$(PIQUE-RUN) $(OPT) -i $(TPREFIX) -k IBS -c $(TPREFIX).covar -n $(THREADS) -t BC

group: $(IPREFIX).ped
	rm -rf $(GPREFIX)
	$(PIQUE-INPUT) $(OPT) -i $(IPREFIX) -o $(GPREFIX) -p $(PHENO_GROUP) -k -c -e 5
	$(PIQUE-RUN) $(OPT) -i $(GPREFIX) -k IBS -c $(GPREFIX).covar -n $(THREADS)
	for group in $(GROUPS); do \
	    prefix=$(GPREFIX)\_$$group; \
	    $(PIQUE-RUN) $(OPT) -i $$prefix -k IBS -n $(THREADS); \
	done

$(IPREFIX).ped $(IPREFIX).map:
	tar xf RiceDiversity_44K_Genotypes_PLINK.tar.xz
	mv -i ./RiceDiversity_44K_Genotypes_PLINK/sativas* .
	rmdir RiceDiversity_44K_Genotypes_PLINK

test_vcf: test_vcf.vcf
	rm -rf $@_GWAS
	$(PIQUE-INPUT) $(OPT) -i $@ -f vcf -o $@_GWAS -p $(PHENO) -k -c -e 5
	$(PIQUE-RUN) -i $@_GWAS -k IBS -c $@_GWAS.covar -n $(THREADS)

test_vcf.vcf: $(IPREFIX).ped $(IPREFIX).map
	$(PLINK) --file $(IPREFIX) --recode vcf --out $(basename $@)

ld: input
	$(PLINK) --file $(IPREFIX)_recode12 --r --out $(OPREFIX)_r
	$(PLINK) --file $(IPREFIX)_recode12 --r2 --out $(OPREFIX)_r2

blocks:
	$(PLINK) --file $(IPREFIX)_recode12 --blocks no-pheno-req --out $(OPREFIX)_blocks

plot: $(PLOT_FILES) run
	GWAS_manhattanplots -b 0.1 -q -y 12 -i $<

clean:
	rm -rf RiceDiversity_44K_Genotypes_PLINK sativas413*
	rm -rf __MACOSX
	rm -rf $(OPREFIX)* $(TPREFIX)* $(GPREFIX)*
	rm -rf test_vcf*
	rm -f input run
	rm -f *.bh *.png
	rm -f .pversion *.log

clobber: clean
	rm -f $(IPREFIX)_recode12.*