-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.RPTOR
49 lines (36 loc) · 1.69 KB
/
Makefile.RPTOR
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
## Makefile for autogenerating analysis and figures for RPTOR paper...
# Source data
ALL_EXPR = data/all_gene_expression.tsv
CTRL_GENO = data/control_FLG_genotypes.dat
CASE_GENO = data/eczema_FLG_genotypes.dat
CASE_EXPR = data/eczema_gene_expression.tsv
# Output to be generated
GENE ?= RPTOR
GENEID:=$(shell grep "$(GENE)\b" $(ALL_EXPR) | cut -f 1)
FIG = $(GENE)_boxplot.pdf
COR = $(GENE)_correlation_eczema.tsv
ANNOT = $(GENE)_correlation_eczema_annotated.tsv
VERSION = 0.7
.PHONY: clean reallyclean figures all version
all: figures
figures: $(FIG) $(ANNOT)
@echo "Creating figures - Done!"
## Plot filaggrin gene expression across cases and controls stratified by genotype
$(FIG): bin/plot_expression_boxplot.R $(ALL_EXPR) $(CTRL_GENO) $(CASE_GENO)
Rscript bin/plot_expression_boxplot.R $(ALL_EXPR) $(CTRL_GENO) $(CASE_GENO) $(GENE)
## Perform filaggrin gene expression correlation analysis
$(COR): bin/FLG_correlation_analysis.R $(CASE_EXPR) $(CASE_GENO)
Rscript bin/FLG_correlation_analysis.R $(CASE_EXPR) $(CASE_GENO) $(GENE)_correlation_eczema $(GENEID) 25
## annotate output with Ensembl info, if script available
$(ANNOT): $(COR)
@which -s add_gene_name_column.pl && add_gene_name_column.pl --in $< --species human --delim ',' --desc --info-col 1 --out $@ || echo "Note: although not critical, the add_gene_name_column.pl script was not found. It can be downloaded from here: https://github.com/drchriscole/ensemblUtils"
## report version of make file and scripts
version:
@echo "Makefile version: $(VERSION)"
Rscript bin/plot_expression_boxplot.R --version
Rscript bin/FLG_correlation_analysis.R --version
## remove output files
clean:
rm -f $(GENE)*.pdf $(GENE)*.tsv
reallyclean:
rm -f *.pdf *.tsv