forked from d-michele/gene-fusions-classifier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile_TESTS
113 lines (91 loc) · 5.11 KB
/
Makefile_TESTS
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# =============================================================================================== #
# SRC: Makefile #
# =============================================================================================== #
# =============================================================================================== #
# VARIABLES SECTION #
# =============================================================================================== #
# Here - Specify which python interpreter to employ.
SCRIPT_INTERPETER = python3
# Here - Specify which is the root directory where all results
# from different analyses will be stored, for later investingations
# about results, logs and image files.
BASE_DIR_RESULTS = bioinfo_project
# Here - There are some variable exploited in order
# to run some local tests.
#
# See tasks related to test for more details.
SCRIPT_2_TEST = test_feature.py
TESTS_DIR = tests
# Here - There are two variable used to run the
# classifier tool for genes fusions recognizing:
# - SCRIPT_ANALYSIS, standas for the `main.py` file which is used to
# write the program;
# - PROGRAM_ANALYSIS, is a symbolic link that can be used to run
# the program written above without taking care about how it was implemented
# as weel as without knowing which kind of programming language has been adopted.
#
# See task named `run_analysis` for details how both them have been employed.
SCRIPT_ANALYSIS = main.py
PROGRAM_ANALYSIS = genes_fusions_classifier
# =============================================================================================== #
# VARIABLES DEFINED TO RUN TESTS WITHIN PROPER TASKS #
# =============================================================================================== #
# ---------------------------- #
# A Test #
# ---------------------------- #
NETWORK_NAME = ModelEmbeddingBidirect
ARGS_ANALYSIS = --validation --load_network $(NETWORK_NAME)
# ---------------------------- #
# Test Setup Project's subidrs #
# ---------------------------- #
SCRIPT_TEST_ENVIRONMENT_SETUP = script_environment_setup_test.py
ARGS_TEST_ENVIRONMENT_SETUP = --validation --train --network_parameters models/ModelEmbeddingBidirect.json --load_network ModelEmbeddingBidirect
# ---------------------------- #
# Test Load Project's data #
# ---------------------------- #
SCRIPT_TEST_FETCH_AND_PRE_PROCESS = script_fetch_and_preprocess_test.py
ARGS_TEST_FETCH_AND_PREPROCESS = --validation --train --network_parameters models/ModelEmbeddingBidirect.json --load_network ModelEmbeddingBidirect
# ---------------------------- #
# Test Pipeline for Analyses #
# ---------------------------- #
SCRIPT_TEST_PIPELINE = script_pipeline_test.py
ARGS_TEST_PIPELINE = --validation --network_parameters models/ModelEmbeddingBidirect.json --load_network ModelEmbeddingBidirect --sequence_type protein
# ---------------------------- #
# Test Spredsheet for Analyses #
# ---------------------------- #
SCRIPT_TEST_SPREDSHEET = script_create_spredsheet.py
ARGS_TEST_SPREDSHEET = --validation --network_parameters models/ModelEmbeddingBidirect.json --load_network ModelEmbeddingBidirect --sequence_type protein
# =============================================================================================== #
# TASKS SECTION #
# =============================================================================================== #
# ---------------------------- ---------------------#
# TESTS - SECTION #
# ------------------------------------------------- #
test_setup_environment_for_analysis: setup_before_run_task
cp $(TESTS_DIR)/$(SCRIPT_TEST_ENVIRONMENT_SETUP) $(SCRIPT_2_TEST)
$(SCRIPT_INTERPETER) $(SCRIPT_2_TEST) $(ARGS_TEST_ENVIRONMENT_SETUP)
rm -f $(SCRIPT_2_TEST)
test_fetch_data_and_preprocess_for_analysis: setup_before_run_task
cp $(TESTS_DIR)/$(SCRIPT_TEST_FETCH_AND_PRE_PROCESS) $(SCRIPT_2_TEST)
$(SCRIPT_INTERPETER) $(SCRIPT_2_TEST) $(ARGS_TEST_FETCH_AND_PREPROCESS)
rm -f $(SCRIPT_2_TEST)
test_pipeline_for_analysis: setup_before_run_task
cp $(TESTS_DIR)/$(SCRIPT_TEST_PIPELINE) $(SCRIPT_2_TEST)
$(SCRIPT_INTERPETER) $(SCRIPT_2_TEST) $(ARGS_TEST_PIPELINE)
rm -f $(SCRIPT_2_TEST)
test_spredsheet_creation_for_analysis: setup_before_run_task
cp $(TESTS_DIR)/$(SCRIPT_TEST_SPREDSHEET) $(SCRIPT_2_TEST)
$(SCRIPT_INTERPETER) $(SCRIPT_2_TEST) $(ARGS_TEST_SPREDSHEET)
rm -f $(SCRIPT_2_TEST)
# ---------------------------- ---------------------#
# MANAGEMENT - SECTION #
# ------------------------------------------------- #
setup_before_run_task:
clear
# Clear directory with subdirectories corresponind to
# different runs with their results.
clear_result_dirs: setup_before_run_task
rm -fr $(BASE_DIR_RESULTS)
# different runs with their results.
clear_result_dirs_from_tests: setup_before_run_task
bash ./scripts/script_clear_results_dir_from_tests.sh ./bioinfo_project --not-cancel