smares commited on
Commit
c45c4e3
·
verified ·
1 Parent(s): e856f02

Create config.yaml

Browse files
Files changed (1) hide show
  1. config.yaml +301 -0
config.yaml ADDED
@@ -0,0 +1,301 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ESMCBA Configuration File
2
+ # =========================
3
+
4
+ # Project Settings
5
+ # ----------------
6
+ project:
7
+ name: "ESMCBA"
8
+ version: "1.0"
9
+ random_seed: 42
10
+
11
+ # Environment & Paths
12
+ # -------------------
13
+ paths:
14
+ # Root directories
15
+ root_dir: "."
16
+ data_dir: "./data"
17
+ models_dir: "./models"
18
+ output_dir: "./outputs"
19
+ figures_dir: "./figures"
20
+ figures_manuscript_dir: "./figures_manuscript"
21
+ performances_dir: "./performances"
22
+
23
+ # Data files
24
+ amino_acid_properties: "./data/Amino_Acid_Properties.csv"
25
+ iedb_data: "./data/IEDB_full_subset_filtered_out_MHCFlurry.csv"
26
+ hla_sequences: "./data/HLA_sequences.fasta"
27
+
28
+ # Model checkpoints (Hugging Face or local)
29
+ huggingface_repo: "smares/ESMCBA"
30
+ checkpoint_cache: "~/.cache/huggingface/hub"
31
+
32
+ # Hugging Face Settings
33
+ # ----------------------
34
+ huggingface:
35
+ use_hf_cache: true # Use HF cache instead of local download
36
+ enable_hf_transfer: true # Speed up downloads
37
+ repo_type: "model"
38
+
39
+ # Device Configuration
40
+ # --------------------
41
+ device:
42
+ use_gpu: true # Set to false to force CPU
43
+ gpu_id: 0 # GPU device ID if multiple GPUs available
44
+ num_workers: 4 # DataLoader workers
45
+
46
+ # Model Configuration
47
+ # -------------------
48
+ model:
49
+ # ESM Model settings
50
+ esm_model: "esm_cambrian"
51
+ esm_version: "3.1.3"
52
+
53
+ # Encoding type
54
+ encoding: "epitope" # Options: epitope, full_sequence, etc.
55
+
56
+ # Model architecture
57
+ architecture:
58
+ embedding_dim: 1280
59
+ hidden_dims: [512, 256, 128]
60
+ dropout: 0.3
61
+ activation: "relu"
62
+
63
+ # Available HLA alleles with their checkpoints
64
+ hla_models:
65
+ B1402:
66
+ checkpoint: "ESMCBA_epitope_0.95_30_ESMMASK_epitope_FT_25_0.001_5e-05_AUG_3_HLAB1402_2_1e-05_1e-06__1_B1402_0404_Hubber_B1402_final.pth"
67
+ description: "HLA-B*14:02 model"
68
+
69
+ B1503:
70
+ checkpoint: "ESMCBA_epitope_0.95_30_ESMMASK_epitope_FT_25_0.001_5e-05_AUG_6_HLAB1503_2_0.0001_1e-05__2_B1503_0404_Hubber_B1503_final.pth"
71
+ description: "HLA-B*15:03 model"
72
+
73
+ B5101:
74
+ checkpoint: "ESMCBA_epitope_0.5_20_ESMMASK_epitope_FT_15_0.0001_1e-05_AUG_6_HLAB5101_5_0.001_1e-06__3_B5101_Hubber_B5101_final.pth"
75
+ description: "HLA-B*51:01 model"
76
+
77
+ # Training Configuration
78
+ # ----------------------
79
+ training:
80
+ # Hyperparameters
81
+ batch_size: 32
82
+ num_epochs: 50
83
+ learning_rate: 0.001
84
+ weight_decay: 1e-05
85
+
86
+ # Learning rate scheduler
87
+ scheduler:
88
+ type: "ReduceLROnPlateau" # Options: ReduceLROnPlateau, StepLR, CosineAnnealing
89
+ patience: 5
90
+ factor: 0.5
91
+ min_lr: 1e-06
92
+
93
+ # Early stopping
94
+ early_stopping:
95
+ enabled: true
96
+ patience: 10
97
+ min_delta: 0.001
98
+
99
+ # Optimization
100
+ optimizer: "Adam" # Options: Adam, AdamW, SGD
101
+ gradient_clip: 1.0
102
+
103
+ # Data augmentation
104
+ augmentation:
105
+ enabled: true
106
+ num_augmentations: 3
107
+ methods: ["mask", "noise", "shuffle"]
108
+
109
+ # Training splits
110
+ train_split: 0.7
111
+ val_split: 0.15
112
+ test_split: 0.15
113
+
114
+ # Class balancing
115
+ balance_classes: true
116
+ sampling_strategy: "oversample" # Options: oversample, undersample, weighted
117
+
118
+ # Embeddings Generation
119
+ # ---------------------
120
+ embeddings:
121
+ # Sequence settings
122
+ max_sequence_length: 30
123
+ min_sequence_length: 8
124
+
125
+ # Batch processing
126
+ batch_size: 64
127
+
128
+ # Output format
129
+ save_format: "numpy" # Options: numpy, pytorch, hdf5
130
+ compression: true
131
+
132
+ # Example peptides for testing
133
+ test_peptides:
134
+ - "ASCQQQRAGHS"
135
+ - "ASCQQQRAGH"
136
+ - "ASCQQQRAG"
137
+ - "DVRLSAHHHR"
138
+ - "DVRLSAHHHRM"
139
+ - "GHSDVRLSAHH"
140
+
141
+ # Evaluation Configuration
142
+ # -------------------------
143
+ evaluation:
144
+ # Metrics
145
+ metrics:
146
+ - "accuracy"
147
+ - "precision"
148
+ - "recall"
149
+ - "f1_score"
150
+ - "roc_auc"
151
+ - "pr_auc"
152
+ - "mcc" # Matthews correlation coefficient
153
+
154
+ # Thresholds
155
+ ic50_threshold: 500 # nM
156
+ classification_threshold: 0.5
157
+
158
+ # Cross-validation
159
+ cross_validation:
160
+ enabled: true
161
+ n_folds: 5
162
+ stratified: true
163
+
164
+ # Comparison with other predictors
165
+ external_predictors:
166
+ - "MHCFlurry"
167
+ - "HLAthena"
168
+ - "MixMHCpred"
169
+ - "MHCnuggets"
170
+
171
+ # Visualization Configuration
172
+ # ----------------------------
173
+ visualization:
174
+ # Figure settings
175
+ dpi: 300
176
+ format: "pdf" # Options: pdf, png, svg
177
+ style: "seaborn-v0_8-darkgrid"
178
+
179
+ # Plot dimensions
180
+ figure_size: [10, 8]
181
+ font_size: 12
182
+
183
+ # UMAP settings
184
+ umap:
185
+ n_neighbors: 15
186
+ min_dist: 0.1
187
+ n_components: 2
188
+ metric: "euclidean"
189
+ random_state: 42
190
+
191
+ # Color schemes
192
+ color_palette: "husl"
193
+
194
+ # Plot types to generate
195
+ plot_types:
196
+ - "roc_curves"
197
+ - "pr_curves"
198
+ - "confusion_matrix"
199
+ - "umap_embeddings"
200
+ - "sequence_logos"
201
+ - "binding_heatmaps"
202
+
203
+ # RFdiffusion Analysis
204
+ # --------------------
205
+ rfdiffusion:
206
+ # Structure analysis
207
+ contact_map:
208
+ distance_threshold: 8.0 # Angstroms
209
+ visualization: true
210
+
211
+ # Design evaluation
212
+ metrics:
213
+ - "rmsd"
214
+ - "interface_energy"
215
+ - "binding_affinity"
216
+ - "sequence_recovery"
217
+
218
+ # Filtering criteria
219
+ filters:
220
+ min_plddt: 70
221
+ max_rmsd: 3.0
222
+ min_interface_contacts: 10
223
+
224
+ # Data Processing
225
+ # ---------------
226
+ data:
227
+ # Filtering
228
+ filtering:
229
+ remove_duplicates: true
230
+ remove_invalid_sequences: true
231
+ remove_ambiguous_residues: true
232
+
233
+ # IC50 data
234
+ ic50:
235
+ min_value: 1 # nM
236
+ max_value: 50000 # nM
237
+ log_transform: true
238
+
239
+ # Sequence constraints
240
+ sequence:
241
+ min_length: 8
242
+ max_length: 15
243
+ allowed_residues: "ACDEFGHIKLMNPQRSTVWY"
244
+
245
+ # Logging Configuration
246
+ # ----------------------
247
+ logging:
248
+ level: "INFO" # Options: DEBUG, INFO, WARNING, ERROR, CRITICAL
249
+ log_dir: "./logs"
250
+ log_file: "esmcba.log"
251
+
252
+ # Console output
253
+ console:
254
+ enabled: true
255
+ color: true
256
+
257
+ # File output
258
+ file:
259
+ enabled: true
260
+ rotation: "daily"
261
+ max_size: "10MB"
262
+ backup_count: 5
263
+
264
+ # MLflow tracking (optional)
265
+ mlflow:
266
+ enabled: false
267
+ tracking_uri: "http://localhost:5000"
268
+ experiment_name: "ESMCBA"
269
+
270
+ # Performance Tracking
271
+ # --------------------
272
+ performance:
273
+ # Save results
274
+ save_predictions: true
275
+ save_embeddings: true
276
+ save_metrics: true
277
+
278
+ # Output formats
279
+ results_format: "csv" # Options: csv, tsv, json, parquet
280
+
281
+ # Benchmarking
282
+ benchmark:
283
+ enabled: true
284
+ datasets:
285
+ - "IEDB"
286
+ - "Apollo"
287
+ - "custom"
288
+
289
+ # Reproducibility
290
+ # ---------------
291
+ reproducibility:
292
+ set_seed: true
293
+ deterministic: true
294
+ cudnn_benchmark: false # Set to true for speed (less reproducible)
295
+
296
+ # Notebook Settings
297
+ # -----------------
298
+ notebook:
299
+ output_format: "html" # Options: html, pdf, slides
300
+ execute_on_save: false
301
+ kernel: "ESM_cambrian"