-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile.analysis
87 lines (67 loc) · 3.18 KB
/
Makefile.analysis
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
all:
ANALYSIS = results/analysis
MODELS = results/models
COVARIATE_MODELS = $(MODELS)/surv/cox_clinical_model_scores.rds \
$(MODELS)/resp/svm_clinical_model_scores.rds \
$(MODELS)/resp/lgr_clinical_model_scores.rds
FULL_MODELS = $(MODELS)/surv/cnet_model_scores.rds \
$(MODELS)/resp/rfe_model_scores.rds \
$(MODELS)/resp/lgr_model_scores.rds \
$(MODELS)/resp/edger_model_scores.rds \
$(MODELS)/resp/limma_model_scores.rds
MODEL_SUMMARIES = $(ANALYSIS)/model_goodness.txt \
$(ANALYSIS)/covariate_goodness.txt
CLEAN_TARGETS = $(ANALYSIS)/covariate_goodness.txt \
$(ANALYSIS)/model_goodness.txt \
$(ANALYSIS)/compared_runs.txt $(ANALYSIS)/potential_hits.txt \
$(ANALYSIS)/goodness_hits.txt \
$(ANALYSIS)/microbial_features.txt \
$(ANALYSIS)/microbial_feature_stats.txt \
$(ANALYSIS)/expression_features.txt \
$(ANALYSIS)/selected_hits.txt \
$(ANALYSIS)/simplified_expression.txt \
$(ANALYSIS)/simplified_microbial.txt \
$(ANALYSIS)/univariate_response.txt \
$(ANALYSIS)/univariate_survival.txt
all: $(ANALYSIS)/covariate_goodness.txt
$(ANALYSIS)/covariate_goodness.txt: $(COVARIATE_MODELS)
mkdir -p $(ANALYSIS) && Rscript melt_covariates.R $^ > $@
all: $(ANALYSIS)/model_goodness.txt
$(ANALYSIS)/model_goodness.txt: $(FULL_MODELS)
mkdir -p $(ANALYSIS) && Rscript melt_covariates.R $^ > $@
all: $(ANALYSIS)/compared_runs.txt
$(ANALYSIS)/compared_runs.txt: $(MODEL_SUMMARIES)
mkdir -p $(ANALYSIS) && Rscript compare_runs.R $^ > $@
all: $(ANALYSIS)/potential_hits.txt
$(ANALYSIS)/potential_hits.txt: $(ANALYSIS)/compared_runs.txt
Rscript keep_potential_hits.R $^ > $@
all: $(ANALYSIS)/goodness_hits.txt
$(ANALYSIS)/goodness_hits.txt: $(ANALYSIS)/potential_hits.txt
Rscript filter_fdr.R 0.01 $^ > $@
all: $(ANALYSIS)/selected_hits.txt
$(ANALYSIS)/selected_hits.txt: $(ANALYSIS)/goodness_hits.txt
Rscript select_hits.R $^ > $@
all: $(ANALYSIS)/microbial_features.txt
$(ANALYSIS)/microbial_features.txt: $(ANALYSIS)/goodness_hits.txt
Rscript pull_coefficients.R $$( Rscript hits_to_paths.R kraken $^ ) > $@
all: $(ANALYSIS)/microbial_feature_stats.txt
$(ANALYSIS)/microbial_feature_stats.txt: $(ANALYSIS)/simplified_microbial.txt
Rscript count_features.R $^ > $@
all: $(ANALYSIS)/univariate_response.txt
$(ANALYSIS)/univariate_response.txt: $(ANALYSIS)/microbial_features.txt
Rscript response_vs_features.R --microbial_features $^ > $@
all: $(ANALYSIS)/univariate_survival.txt
$(ANALYSIS)/univariate_survival.txt: $(ANALYSIS)/microbial_features.txt
Rscript survival_vs_features.R --how CNET --microbial_features $^ > $@
all: $(ANALYSIS)/simplified_microbial.txt
$(ANALYSIS)/simplified_microbial.txt: $(ANALYSIS)/univariate_response.txt $(ANALYSIS)/univariate_survival.txt $(ANALYSIS)/microbial_features.txt
Rscript simplify_microbial.R $^ > $@
all: $(ANALYSIS)/simplified_expression.txt
$(ANALYSIS)/simplified_expression.txt: $(ANALYSIS)/expression_features.txt $(ANALYSIS)/selected_hits.txt
Rscript simplify_expression.R $^ > $@
all: $(ANALYSIS)/expression_features.txt
$(ANALYSIS)/expression_features.txt: $(ANALYSIS)/goodness_hits.txt
Rscript pull_coefficients.R $$( Rscript hits_to_paths.R htseq $^ ) > $@
clean:
-rm -f $(CLEAN_TARGETS)
.DELETE_ON_ERROR: