-
Notifications
You must be signed in to change notification settings - Fork 0
/
candidateGenesGUI.m
698 lines (617 loc) · 36.2 KB
/
candidateGenesGUI.m
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
classdef candidateGenesGUI < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
UIFigure matlab.ui.Figure
TabGroup matlab.ui.container.TabGroup
FirstStepTab matlab.ui.container.Tab
CANDIDATEGENESGUILabel matlab.ui.control.Label
ChooseDatasetDropDown matlab.ui.control.DropDown
ChooseadrivergeneDropDown matlab.ui.control.DropDown
SpecifyDriverGeneEditField matlab.ui.control.EditField
OutputImagesDropDown matlab.ui.control.DropDown
OutputDirectoryButton matlab.ui.control.Button
ChooseDatasetDropDownLabel matlab.ui.control.Label
ChooseDriverGeneDropDownLabel matlab.ui.control.Label
SpecifcyDriverGeneEditFieldLabel matlab.ui.control.Label
ChooseOutputDirectoryLabel matlab.ui.control.Label
OutputImagesDropDownLabel matlab.ui.control.Label
UploadFileButton matlab.ui.control.Button
UploadGeneExpressionFileLabel matlab.ui.control.Label
GeneExpressionFileTextArea matlab.ui.control.TextArea
OutputDirectoryTextArea matlab.ui.control.TextArea
TextAreaLabel matlab.ui.control.Label
TextArea matlab.ui.control.TextArea
SecondStepTab matlab.ui.container.Tab
CANDIDATEGENESGUILabel_2 matlab.ui.control.Label
GeneExpressionCheckBox matlab.ui.control.CheckBox
KMbyExpressionCheckBox matlab.ui.control.CheckBox
KMbyClusteringCheckBox matlab.ui.control.CheckBox
KMbyMutationCheckBox matlab.ui.control.CheckBox
CancerSubtypeCheckBox matlab.ui.control.CheckBox
MutationsTypeCheckBox matlab.ui.control.CheckBox
DoneButton matlab.ui.control.Button
ChoosewhichanalysestodoLabel matlab.ui.control.Label
end
properties (Access = private)
funcArgs
end
methods (Access = private)
function turnOffDriverGene(app)
app.SpecifcyDriverGeneEditFieldLabel.Enable = 'off';
app.SpecifyDriverGeneEditField.Enable = 'off';
app.SpecifyDriverGeneEditField.Editable = 'off';
app.SpecifyDriverGeneEditField.Value = '';
end
% checking whether the driver gene name is within Hugo Symbol's
% guidelines:
% Examples:
% Correct:
% JOI0-35345-3453
% DJKFJGLK-3453-ET53
% C3orf2B4BBB123C-C23orf123B34 % not correct irl but can't be helped.
% A342-C123orf234-B4234
% A342-C123orf21B34-B4234
%
% Wrong:
% S-ERWRW-3213
% A-
% QEQ-
% 243DFG
% AC23orf23
% WEP304-2C23orf23
% geneSymbol - a character vector if one gene inserted
% or a cell array with characters if multiple genes.
function isValid = checkValidGeneSymbol(~, geneSymbol)
expression = '^(([A-Z][A-Z0-9]+)|(C\d{1,4}orf\d{1,4}[A-Z0-9]{0,3}))(([-]?[A-Z0-9]+)|(-C\d{1,4}orf\d{1,4}[A-Z0-9]{0,3})){0,2}';
[~, endIdx] = regexp(geneSymbol,expression);
if iscellstr(geneSymbol)
len_arr = cellfun(@length, geneSymbol);
lenAsCell = num2cell(len_arr);
isSameLength = cellfun(@isequal, lenAsCell, endIdx);
isValid = isSameLength & ~isempty(geneSymbol);
elseif ischar(geneSymbol)
len = length(geneSymbol);
isValid = isequal(len, endIdx) & ~isempty(geneSymbol);
end
end
% Pop an error message if genes are not according to hugo symbol
% nomenclature.
function faultyGenesMsg(~, isValid, genes)
if iscellstr(genes)
if length(isValid) > 1
genes = genes(~isValid);
end
invalid_genes = strjoin(genes,' ');
else
invalid_genes = genes;
end
msg = sprintf('Invalid gene name(s): %s', invalid_genes);
errordlg(msg, 'cannot start calculation',"replace");
end
function turnOffImagesText(app)
app.TextAreaLabel.Enable = 'off';
app.TextArea.Editable = 'off';
app.TextArea.Enable = 'off';
end
% Since Matlab has some problems saving files within different
% computers unless the given path is in its IP form - I change some
% computer names into their IP address.
function newPath = changePathToIP(~, path)
if contains(path, '\\metlab24')
newPath = strrep(path, '\\metlab24', '\\132.66.95.239');
elseif contains(path, '\\metlab25')
newPath = strrep(path, '\\metlab25', '\\132.66.95.241');
elseif contains(path, '\\metlab26')
newPath = strrep(path, '\\metlab26', '\\132.66.207.18');
else
newPath = path;
end
end
end
% Callbacks that handle component events
methods (Access = private)
% Code that executes after component creation
function startupFcn(app)
% Initializing accodring to germ_cell_1 dataset.
% clinical data file:
app.funcArgs.filename_km = '\\metlab25\G\TsarfatyLabUsers2020\Nizan\Hila\DB for human survival analysis\germ cell\Testicular Germ Cell Tumors (TCGA, PanCancer Atlas)\data_clinical_patient.xlsx';
% mutations file:
app.funcArgs.filename_mut = '\\metlab25\G\TsarfatyLabUsers2020\Nizan\Hila\DB for human survival analysis\germ cell\Testicular Germ Cell Tumors (TCGA, PanCancer Atlas)\data_mutations_extended.xlsx';
app.funcArgs.sheet_name = 1; % sheet index in gene expression file.
app.funcArgs.use_days_not_months = 0; % whether to use days vs. months as the time unit for survival analysis.
app.funcArgs.colTimeData = 32; % overall survival in months column in clinical file - OS_MONTHS.
app.funcArgs.colSurvivalStatus = 31; % OS_STATUS (LIVING/DECEASED) column in clinical file.
app.funcArgs.colCancerSubtypes = 0; % usually not needed if do_subtype_histograms == 0.
app.funcArgs.colPatientsNamesKM = 1; % PATIENT_ID column in clinical data.
app.funcArgs.livingStatusStr = "LIVING";
app.funcArgs.deceasedButNotCancerStr = ""; % usually not needed. Only in breast cancer.
app.funcArgs.timeCutOff = 120; % Stop calculating the survival analysis after 120 months.
app.funcArgs.extraClinicalDataCellMatrix = []; % redundant currently.
app.funcArgs.colMutationsTypes = 10; % Where the types of mutations are located in mutation file.
app.funcArgs.colPatientsNamesMutation = 17; % patients id column in mutations table (tumor_sample_barcode).
app.funcArgs.colGeneNamesMut = 1; % the column with gene names in mutations file.
app.funcArgs.rowMutationsData = 2; % Where the data begins in mutations table.
app.funcArgs.use_cbioportal_not_lab_std = 1; % by which standard the dataset is presented, can be the lab's standard 0, or cbioportal 1.
app.funcArgs.gene_nomenclature = "both"; % nomenclatures of genes can be 'hugo', 'entrez', or 'both'.
% Chosen values by the user:
app.funcArgs.filename = 0; % gene expression excel file.
app.funcArgs.gene_name = 'MET'; % driver gene name.
app.funcArgs.getGeneImages = {'none'}; % which images to get. can be either 'all', 'none' or specific by gene names.
app.funcArgs.outputDir = 0; % output directory.
% Analyses
app.funcArgs.do_genes_expression_calculations = 0;
app.funcArgs.do_km_analysis = 0;
app.funcArgs.do_km_by_mutation_and_expression = 0;
app.funcArgs.do_km_by_clustering = 0;
app.funcArgs.do_mutation_analysis = 0;
app.funcArgs.do_subtype_histograms = 0;
end
% Value changed function: ChooseDatasetDropDown
function chooseDataset(app, event)
value = app.ChooseDatasetDropDown.Value;
switch value
case 'germ_cell_1'
app.funcArgs.filename_km = '\\metlab26\d\Users\Hila Shacham\Candidate Genes\DB for human survival analysis\germ cell\Testicular Germ Cell Tumors (TCGA, PanCancer Atlas)\data_clinical_patient.xlsx';
app.funcArgs.filename_mut = '\\metlab26\d\Users\Hila Shacham\Candidate Genes\DB for human survival analysis\germ cell\Testicular Germ Cell Tumors (TCGA, PanCancer Atlas)\data_mutations_extended.xlsx';
app.funcArgs.colTimeData = 32;
app.funcArgs.colSurvivalStatus = 31;
app.funcArgs.colCancerSubtypes = 0;
app.funcArgs.colPatientsNamesKM = 1;
app.funcArgs.livingStatusStr = "LIVING";
app.funcArgs.deceasedButNotCancerStr = "";
app.funcArgs.colMutationsTypes = 10;
app.funcArgs.colPatientsNamesMutation = 17;
app.funcArgs.colGeneNamesMut = 1;
app.funcArgs.rowMutationsData = 2;
case 'lymphoma_1'
app.funcArgs.filename_km = '\\metlab26\d\Users\Hila Shacham\Candidate Genes\DB for human survival analysis\lymphoma\Pediatric Acute Lymphoid Leukemia - Phase II (TARGET, 2018)\data_clinical_patient.xlsx';
app.funcArgs.filename_mut = '\\metlab26\d\Users\Hila Shacham\Candidate Genes\DB for human survival analysis\lymphoma\Pediatric Acute Lymphoid Leukemia - Phase II (TARGET, 2018)\data_mutations_extended.xlsx';
app.funcArgs.colTimeData = 22;
app.funcArgs.colSurvivalStatus = 20;
app.funcArgs.colCancerSubtypes = 0;
app.funcArgs.colPatientsNamesKM = 1;
app.funcArgs.livingStatusStr = "LIVING";
app.funcArgs.deceasedButNotCancerStr = "";
app.funcArgs.colMutationsTypes = 10;
app.funcArgs.colPatientsNamesMutation = 17;
app.funcArgs.colGeneNamesMut = 1;
app.funcArgs.rowMutationsData = 2;
case 'sarcoma_1'
app.funcArgs.filename_km = '\\metlab26\d\Users\Hila Shacham\Candidate Genes\DB for human survival analysis\sarcoma\Adult Soft Tissue Sarcomas TCGA, Cell 2017\data_clinical_patient.xlsx';
app.funcArgs.filename_mut = '\\metlab26\d\Users\Hila Shacham\Candidate Genes\DB for human survival analysis\sarcoma\Adult Soft Tissue Sarcomas TCGA, Cell 2017\data_mutations_extended.xlsx';
app.funcArgs.colTimeData = 13;
app.funcArgs.colSurvivalStatus = 11;
app.funcArgs.colCancerSubtypes = 0;
app.funcArgs.colPatientsNamesKM = 1;
app.funcArgs.livingStatusStr = "LIVING";
app.funcArgs.deceasedButNotCancerStr = "";
app.funcArgs.colMutationsTypes = 10;
app.funcArgs.colPatientsNamesMutation = 17;
app.funcArgs.colGeneNamesMut = 1;
app.funcArgs.rowMutationsData = 2;
case 'breast_cancer_1'
app.funcArgs.filename_km = '\\metlab26\d\Users\Hila Shacham\breast cancer sources\brca_metabric\data_clinical_patient.xlsx';
app.funcArgs.filename_mut = '\\metlab26\d\Users\Hila Shacham\breast cancer sources\brca_metabric\data_mutations_extended.xlsx';
app.funcArgs.colTimeData = 13;
app.funcArgs.colSurvivalStatus = 17;
app.funcArgs.colCancerSubtypes = 15;
app.funcArgs.colPatientsNamesKM = 1;
app.funcArgs.livingStatusStr = "Living";
app.funcArgs.deceasedButNotCancerStr = "Died of Other Causes";
app.funcArgs.colMutationsTypes = 9;
app.funcArgs.colPatientsNamesMutation = 17;
app.funcArgs.colGeneNamesMut = 1;
app.funcArgs.rowMutationsData = 3;
case 'ovary_cancer_1'
app.funcArgs.filename_km = '\\metlab26\d\Users\Hila Shacham\Candidate Genes\DB for human survival analysis\ovary cancer sources\Ovarian Serous Cystadenocarcinoma (TCGA, Provisional)\data_bcr_clinical_data_patient.xlsx';
app.funcArgs.filename_mut = '\\metlab26\d\Users\Hila Shacham\Candidate Genes\DB for human survival analysis\ovary cancer sources\Ovarian Serous Cystadenocarcinoma (TCGA, Provisional)\data_mutations_extended.xlsx';
app.funcArgs.colTimeData = 57;
app.funcArgs.colSurvivalStatus = 56;
app.funcArgs.colCancerSubtypes = 0; % no subtypes
app.funcArgs.colPatientsNamesKM = 1;
app.funcArgs.livingStatusStr = "LIVING";
app.funcArgs.deceasedButNotCancerStr = "";
app.funcArgs.colMutationsTypes = 9;
app.funcArgs.colPatientsNamesMutation = 16;
app.funcArgs.colGeneNamesMut = 1;
app.funcArgs.rowMutationsData = 2;
end
end
% Button pushed function: UploadFileButton
function UploadFileButtonPushed(app, event)
[file, path] = uigetfile('*.xlsx', 'Select gene expression file');
if isequal(file, 0) && isequal(app.funcArgs.filename, 0)
app.funcArgs.filename = 0;
elseif ~isequal(file, 0)
newPath = changePathToIP(app, path);
app.funcArgs.filename = fullfile(newPath, file);
app.GeneExpressionFileTextArea.Value = app.funcArgs.filename;
end
end
% Value changed function: ChooseadrivergeneDropDown
function ChooseadrivergeneDropDownValueChanged(app, event)
value = app.ChooseadrivergeneDropDown.Value;
switch value
case "MET"
app.funcArgs.gene_name = 'MET';
app.turnOffDriverGene();
case "TP53"
app.funcArgs.gene_name = 'TP53';
app.turnOffDriverGene();
case "BRCA1"
app.funcArgs.gene_name = 'BRCA1';
app.turnOffDriverGene();
case "Other"
app.funcArgs.gene_name = '';
app.SpecifcyDriverGeneEditFieldLabel.Enable = 'on';
app.SpecifyDriverGeneEditField.Enable = 'on';
app.SpecifyDriverGeneEditField.Editable = 'on';
end
end
% Value changed function: SpecifyDriverGeneEditField
function SpecifyDriverGeneEditFieldValueChanged(app, event)
value = app.SpecifyDriverGeneEditField.Value;
app.funcArgs.gene_name = value;
end
% Value changed function: OutputImagesDropDown
function OutputImagesDropDownValueChanged(app, event)
value = app.OutputImagesDropDown.Value;
switch value
case "none"
app.funcArgs.getGeneImages = {'none'};
app.turnOffImagesText();
case "all"
app.funcArgs.getGeneImages = {'all'};
app.turnOffImagesText();
case "other"
app.TextAreaLabel.Enable = 'on';
app.TextArea.Editable = 'on';
app.TextArea.Enable = 'on';
end
end
% Value changed function: TextArea
function TextAreaValueChanged(app, event)
value = app.TextArea.Value;
if iscellstr(value)
value = strjoin(value,' ');
end
genes = split(value, {',', ', ', ' ,', ' '});
genes(cellfun(@isempty, genes)) = [];
app.funcArgs.getGeneImages = genes;
end
% Button pushed function: OutputDirectoryButton
function OutputDirectoryButtonPushed(app, event)
dirPath= uigetdir;
if ~isequal(dirPath, 0)
newDirPath = changePathToIP(app, dirPath);
app.funcArgs.outputDir = newDirPath;
app.OutputDirectoryTextArea.Value = app.funcArgs.outputDir;
end
end
% Value changed function: GeneExpressionCheckBox
function GeneExpressionCheckBoxValueChanged(app, event)
value = app.GeneExpressionCheckBox.Value;
app.funcArgs.do_genes_expression_calculations = value;
end
% Value changed function: KMbyExpressionCheckBox
function KMbyExpressionCheckBoxValueChanged(app, event)
value = app.KMbyExpressionCheckBox.Value;
app.funcArgs.do_km_analysis = value;
end
% Value changed function: KMbyMutationCheckBox
function KMbyMutationCheckBoxValueChanged(app, event)
value = app.KMbyMutationCheckBox.Value;
app.funcArgs.do_km_by_mutation_and_expression = value;
end
% Value changed function: KMbyClusteringCheckBox
function KMbyClusteringCheckBoxValueChanged(app, event)
value = app.KMbyClusteringCheckBox.Value;
app.funcArgs.do_km_by_clustering = value;
end
% Button pushed function: DoneButton
function DoneButtonPushed(app, event)
% Checking whether gene expression table is OK:
if isequal(app.funcArgs.filename, 0)
errordlg('No gene expression file chosen', 'cannot start calculation',"replace");
return
end
[~,~,ext] = fileparts(app.funcArgs.filename);
if ~isequal(ext,'.xlsx')
errordlg('Wrong file extension for gene expression file', 'cannot start calculation',"replace");
return
end
% Check whether the driver gene was correctly inserted:
if isempty(app.funcArgs.gene_name)
errordlg('No driver gene chosen', 'cannot start calculation',"replace");
return
end
validDriverGene = checkValidGeneSymbol(app, app.funcArgs.gene_name);
if ~validDriverGene
faultyGenesMsg(app, validDriverGene, app.funcArgs.gene_name);
return
end
% Check whether the gene names for which to output images were
% inserted correctly:
if isequal(app.OutputImagesDropDown.Value, 'other')
if isempty(app.funcArgs.getGeneImages)
errordlg('No gene names were inserted for output images', 'cannot start calculation',"replace");
return
end
validGeneNames = checkValidGeneSymbol(app, app.funcArgs.getGeneImages);
if sum(~validGeneNames) > 0
faultyGenesMsg(app, validGeneNames, app.funcArgs.getGeneImages);
return
end
end
% Check whether an output directory was given:
if isequal(app.funcArgs.outputDir, 0)
errordlg('No output directory chosen', 'cannot start calculation',"replace");
return
end
% Check that at least one analysis was chosen:
anyAnalysis = app.funcArgs.do_genes_expression_calculations |...
app.funcArgs.do_km_analysis | ...
app.funcArgs.do_km_by_mutation_and_expression | ...
app.funcArgs.do_km_by_clustering | ...
app.funcArgs.do_mutation_analysis | ...
app.funcArgs.do_subtype_histograms;
if isequal(anyAnalysis, 0)
errordlg('Choose at least one analysis', 'cannot start calculation',"replace");
return
end
progress = uiprogressdlg(app.UIFigure, ...
'Title', 'Code Running', ...
'Message', 'Your code is running, will close when done', ...
'Indeterminate', 'on');
Candidate_Genes(app.funcArgs.filename, ...
app.funcArgs.filename_km, ...
app.funcArgs.sheet_name,...
app.funcArgs.do_genes_expression_calculations, ...
app.funcArgs.do_km_analysis, ...
app.funcArgs.do_subtype_histograms, ...
app.funcArgs.use_cbioportal_not_lab_std,...
app.funcArgs.gene_nomenclature, ...
app.funcArgs.gene_name, ...
app.funcArgs.colPatientsNamesKM,...
app.funcArgs.colTimeData, ...
app.funcArgs.colSurvivalStatus, ...
app.funcArgs.colCancerSubtypes, ...
app.funcArgs.livingStatusStr, ...
app.funcArgs.deceasedButNotCancerStr, ...
app.funcArgs.timeCutOff, ...
app.funcArgs.use_days_not_months, ...
app.funcArgs.outputDir,...
app.funcArgs.extraClinicalDataCellMatrix, ...
app.funcArgs.do_mutation_analysis, ...
app.funcArgs.colMutationsTypes,...
app.funcArgs.colPatientsNamesMutation, ...
app.funcArgs.colGeneNamesMut, ...
app.funcArgs.filename_mut, ...
app.funcArgs.rowMutationsData, ...
app.funcArgs.getGeneImages, ...
app.funcArgs.do_km_by_mutation_and_expression, ...
app.funcArgs.do_km_by_clustering);
close(progress);
end
end
% Component initialization
methods (Access = private)
% Create UIFigure and components
function createComponents(app)
% Create UIFigure and hide until all components are created
app.UIFigure = uifigure('Visible', 'off');
app.UIFigure.Position = [100 100 599 581];
app.UIFigure.Name = 'UI Figure';
% Create TabGroup
app.TabGroup = uitabgroup(app.UIFigure);
app.TabGroup.Position = [2 1 599 581];
% Create FirstStepTab
app.FirstStepTab = uitab(app.TabGroup);
app.FirstStepTab.Title = 'First Step';
% Create CANDIDATEGENESGUILabel
app.CANDIDATEGENESGUILabel = uilabel(app.FirstStepTab);
app.CANDIDATEGENESGUILabel.HorizontalAlignment = 'center';
app.CANDIDATEGENESGUILabel.FontName = 'Yu Gothic UI Semibold';
app.CANDIDATEGENESGUILabel.FontSize = 18;
app.CANDIDATEGENESGUILabel.FontWeight = 'bold';
app.CANDIDATEGENESGUILabel.Position = [177 508 200 27];
app.CANDIDATEGENESGUILabel.Text = 'CANDIDATE GENES GUI';
% Create ChooseDatasetDropDown
app.ChooseDatasetDropDown = uidropdown(app.FirstStepTab);
app.ChooseDatasetDropDown.Items = {'Testicular germ cell tumor - TCGA PanCancer Atlas', 'Limphoid Leukemia - TARGET 2018', 'Sarcoma soft tissue - TCGA 2017', 'Breast cancer - METABRIC Nature 2016', 'Ovarian Serous Cystadenocarcinoma (TCGA, Provisional)'};
app.ChooseDatasetDropDown.ItemsData = {'germ_cell_1', 'lymphoma_1', 'sarcoma_1', 'breast_cancer_1', 'ovary_cancer_1'};
app.ChooseDatasetDropDown.ValueChangedFcn = createCallbackFcn(app, @chooseDataset, true);
app.ChooseDatasetDropDown.FontName = 'Yu Gothic UI';
app.ChooseDatasetDropDown.FontSize = 14;
app.ChooseDatasetDropDown.Position = [131 460 418 22];
app.ChooseDatasetDropDown.Value = 'germ_cell_1';
% Create ChooseadrivergeneDropDown
app.ChooseadrivergeneDropDown = uidropdown(app.FirstStepTab);
app.ChooseadrivergeneDropDown.Items = {'MET', 'TP53', 'BRCA1', 'Other'};
app.ChooseadrivergeneDropDown.ValueChangedFcn = createCallbackFcn(app, @ChooseadrivergeneDropDownValueChanged, true);
app.ChooseadrivergeneDropDown.FontName = 'Yu Gothic UI';
app.ChooseadrivergeneDropDown.FontSize = 14;
app.ChooseadrivergeneDropDown.Position = [171 325 100 22];
app.ChooseadrivergeneDropDown.Value = 'MET';
% Create SpecifyDriverGeneEditField
app.SpecifyDriverGeneEditField = uieditfield(app.FirstStepTab, 'text');
app.SpecifyDriverGeneEditField.ValueChangedFcn = createCallbackFcn(app, @SpecifyDriverGeneEditFieldValueChanged, true);
app.SpecifyDriverGeneEditField.Editable = 'off';
app.SpecifyDriverGeneEditField.FontName = 'Yu Gothic UI';
app.SpecifyDriverGeneEditField.Enable = 'off';
app.SpecifyDriverGeneEditField.Position = [365 289 100 22];
% Create OutputImagesDropDown
app.OutputImagesDropDown = uidropdown(app.FirstStepTab);
app.OutputImagesDropDown.Items = {'None', 'All', 'Specific IDMGs (excluding driver gene)'};
app.OutputImagesDropDown.ItemsData = {'none', 'all', 'other'};
app.OutputImagesDropDown.ValueChangedFcn = createCallbackFcn(app, @OutputImagesDropDownValueChanged, true);
app.OutputImagesDropDown.FontName = 'Yu Gothic UI';
app.OutputImagesDropDown.FontSize = 14;
app.OutputImagesDropDown.Position = [441 247 100 22];
app.OutputImagesDropDown.Value = 'none';
% Create OutputDirectoryButton
app.OutputDirectoryButton = uibutton(app.FirstStepTab, 'push');
app.OutputDirectoryButton.ButtonPushedFcn = createCallbackFcn(app, @OutputDirectoryButtonPushed, true);
app.OutputDirectoryButton.FontName = 'Yu Gothic UI';
app.OutputDirectoryButton.FontSize = 14;
app.OutputDirectoryButton.Position = [177 66 120 28];
app.OutputDirectoryButton.Text = 'Output Directory';
% Create ChooseDatasetDropDownLabel
app.ChooseDatasetDropDownLabel = uilabel(app.FirstStepTab);
app.ChooseDatasetDropDownLabel.FontName = 'Yu Gothic UI';
app.ChooseDatasetDropDownLabel.FontSize = 14;
app.ChooseDatasetDropDownLabel.Position = [20 460 102 22];
app.ChooseDatasetDropDownLabel.Text = 'Choose Dataset';
% Create ChooseDriverGeneDropDownLabel
app.ChooseDriverGeneDropDownLabel = uilabel(app.FirstStepTab);
app.ChooseDriverGeneDropDownLabel.FontName = 'Yu Gothic UI';
app.ChooseDriverGeneDropDownLabel.FontSize = 14;
app.ChooseDriverGeneDropDownLabel.Position = [20 325 136 22];
app.ChooseDriverGeneDropDownLabel.Text = 'Choose a driver gene';
% Create SpecifcyDriverGeneEditFieldLabel
app.SpecifcyDriverGeneEditFieldLabel = uilabel(app.FirstStepTab);
app.SpecifcyDriverGeneEditFieldLabel.FontName = 'Yu Gothic UI';
app.SpecifcyDriverGeneEditFieldLabel.Enable = 'off';
app.SpecifcyDriverGeneEditFieldLabel.Position = [20 289 337 22];
app.SpecifcyDriverGeneEditFieldLabel.Text = 'Specify other driver gene name (Hugo symbol, case sensitive):';
% Create ChooseOutputDirectoryLabel
app.ChooseOutputDirectoryLabel = uilabel(app.FirstStepTab);
app.ChooseOutputDirectoryLabel.FontName = 'Yu Gothic UI';
app.ChooseOutputDirectoryLabel.FontSize = 14;
app.ChooseOutputDirectoryLabel.Position = [20 69 156 22];
app.ChooseOutputDirectoryLabel.Text = 'Choose output directory';
% Create OutputImagesDropDownLabel
app.OutputImagesDropDownLabel = uilabel(app.FirstStepTab);
app.OutputImagesDropDownLabel.FontName = 'Yu Gothic UI';
app.OutputImagesDropDownLabel.FontSize = 14;
app.OutputImagesDropDownLabel.Position = [21 247 410 22];
app.OutputImagesDropDownLabel.Text = 'Output images? (If you have too many genes, don''t choose ''All''):';
% Create UploadFileButton
app.UploadFileButton = uibutton(app.FirstStepTab, 'push');
app.UploadFileButton.ButtonPushedFcn = createCallbackFcn(app, @UploadFileButtonPushed, true);
app.UploadFileButton.FontName = 'Yu Gothic UI';
app.UploadFileButton.FontSize = 14;
app.UploadFileButton.Position = [239 400 100 28];
app.UploadFileButton.Text = 'Upload File';
% Create UploadGeneExpressionFileLabel
app.UploadGeneExpressionFileLabel = uilabel(app.FirstStepTab);
app.UploadGeneExpressionFileLabel.FontName = 'Yu Gothic UI';
app.UploadGeneExpressionFileLabel.FontSize = 14;
app.UploadGeneExpressionFileLabel.Position = [20 403 213 22];
app.UploadGeneExpressionFileLabel.Text = 'Upload gene expression excel file';
% Create GeneExpressionFileTextArea
app.GeneExpressionFileTextArea = uitextarea(app.FirstStepTab);
app.GeneExpressionFileTextArea.Editable = 'off';
app.GeneExpressionFileTextArea.FontName = 'Arial';
app.GeneExpressionFileTextArea.FontColor = [0.502 0.502 0.502];
app.GeneExpressionFileTextArea.Position = [20 363 521 28];
% Create OutputDirectoryTextArea
app.OutputDirectoryTextArea = uitextarea(app.FirstStepTab);
app.OutputDirectoryTextArea.Editable = 'off';
app.OutputDirectoryTextArea.FontName = 'Arial';
app.OutputDirectoryTextArea.FontColor = [0.502 0.502 0.502];
app.OutputDirectoryTextArea.Position = [20 24 521 28];
% Create TextAreaLabel
app.TextAreaLabel = uilabel(app.FirstStepTab);
app.TextAreaLabel.FontName = 'Yu Gothic UI';
app.TextAreaLabel.Enable = 'off';
app.TextAreaLabel.Position = [20 205 510 32];
app.TextAreaLabel.Text = {'Images for the following IDMGs (Hugo symbol, case sensitive, separated by space or comma):'; 'Example 1: BAX, ATM, PDZD2; or Example 2: BAX ATM PDZD2'};
% Create TextArea
app.TextArea = uitextarea(app.FirstStepTab);
app.TextArea.ValueChangedFcn = createCallbackFcn(app, @TextAreaValueChanged, true);
app.TextArea.Editable = 'off';
app.TextArea.Enable = 'off';
app.TextArea.Position = [21 112 509 84];
% Create SecondStepTab
app.SecondStepTab = uitab(app.TabGroup);
app.SecondStepTab.Title = 'Second Step';
% Create CANDIDATEGENESGUILabel_2
app.CANDIDATEGENESGUILabel_2 = uilabel(app.SecondStepTab);
app.CANDIDATEGENESGUILabel_2.HorizontalAlignment = 'center';
app.CANDIDATEGENESGUILabel_2.FontName = 'Yu Gothic UI Semibold';
app.CANDIDATEGENESGUILabel_2.FontSize = 18;
app.CANDIDATEGENESGUILabel_2.FontWeight = 'bold';
app.CANDIDATEGENESGUILabel_2.Position = [177 508 200 27];
app.CANDIDATEGENESGUILabel_2.Text = 'CANDIDATE GENES GUI';
% Create GeneExpressionCheckBox
app.GeneExpressionCheckBox = uicheckbox(app.SecondStepTab);
app.GeneExpressionCheckBox.ValueChangedFcn = createCallbackFcn(app, @GeneExpressionCheckBoxValueChanged, true);
app.GeneExpressionCheckBox.Text = 'Gene Expression Calculations';
app.GeneExpressionCheckBox.FontName = 'Yu Gothic UI';
app.GeneExpressionCheckBox.FontSize = 14;
app.GeneExpressionCheckBox.Position = [35 403 203 22];
% Create KMbyExpressionCheckBox
app.KMbyExpressionCheckBox = uicheckbox(app.SecondStepTab);
app.KMbyExpressionCheckBox.ValueChangedFcn = createCallbackFcn(app, @KMbyExpressionCheckBoxValueChanged, true);
app.KMbyExpressionCheckBox.Text = 'Kaplan Meier by expression and co-expression';
app.KMbyExpressionCheckBox.FontName = 'Yu Gothic UI';
app.KMbyExpressionCheckBox.FontSize = 14;
app.KMbyExpressionCheckBox.Position = [34 368 312 22];
% Create KMbyClusteringCheckBox
app.KMbyClusteringCheckBox = uicheckbox(app.SecondStepTab);
app.KMbyClusteringCheckBox.ValueChangedFcn = createCallbackFcn(app, @KMbyClusteringCheckBoxValueChanged, true);
app.KMbyClusteringCheckBox.Text = 'Kaplan Meier after clustering methods on expression';
app.KMbyClusteringCheckBox.FontName = 'Yu Gothic UI';
app.KMbyClusteringCheckBox.FontSize = 14;
app.KMbyClusteringCheckBox.Position = [34 294 352 22];
% Create KMbyMutationCheckBox
app.KMbyMutationCheckBox = uicheckbox(app.SecondStepTab);
app.KMbyMutationCheckBox.ValueChangedFcn = createCallbackFcn(app, @KMbyMutationCheckBoxValueChanged, true);
app.KMbyMutationCheckBox.Text = 'Kaplan Meier by mutation and expression';
app.KMbyMutationCheckBox.FontName = 'Yu Gothic UI';
app.KMbyMutationCheckBox.FontSize = 14;
app.KMbyMutationCheckBox.Position = [34 331 281 22];
% Create CancerSubtypeCheckBox
app.CancerSubtypeCheckBox = uicheckbox(app.SecondStepTab);
app.CancerSubtypeCheckBox.Enable = 'off';
app.CancerSubtypeCheckBox.Text = 'Cancer subtype analysis';
app.CancerSubtypeCheckBox.FontName = 'Yu Gothic UI';
app.CancerSubtypeCheckBox.FontSize = 14;
app.CancerSubtypeCheckBox.Position = [34 259 169 22];
% Create MutationsTypeCheckBox
app.MutationsTypeCheckBox = uicheckbox(app.SecondStepTab);
app.MutationsTypeCheckBox.Enable = 'off';
app.MutationsTypeCheckBox.Text = 'Mutations type analysis';
app.MutationsTypeCheckBox.FontName = 'Yu Gothic UI';
app.MutationsTypeCheckBox.FontSize = 14;
app.MutationsTypeCheckBox.Position = [34 224 167 22];
% Create DoneButton
app.DoneButton = uibutton(app.SecondStepTab, 'push');
app.DoneButton.ButtonPushedFcn = createCallbackFcn(app, @DoneButtonPushed, true);
app.DoneButton.FontName = 'Yu Gothic UI';
app.DoneButton.FontSize = 14;
app.DoneButton.Position = [250 132 100 28];
app.DoneButton.Text = 'Done';
% Create ChoosewhichanalysestodoLabel
app.ChoosewhichanalysestodoLabel = uilabel(app.SecondStepTab);
app.ChoosewhichanalysestodoLabel.FontName = 'Yu Gothic UI';
app.ChoosewhichanalysestodoLabel.FontSize = 14;
app.ChoosewhichanalysestodoLabel.FontWeight = 'bold';
app.ChoosewhichanalysestodoLabel.Position = [35 448 193 22];
app.ChoosewhichanalysestodoLabel.Text = 'Choose which analyses to do:';
% Show the figure after all components are created
app.UIFigure.Visible = 'on';
end
end
% App creation and deletion
methods (Access = public)
% Construct app
function app = candidateGenesGUI
% Create UIFigure and components
createComponents(app)
% Register the app with App Designer
registerApp(app, app.UIFigure)
% Execute the startup function
runStartupFcn(app, @startupFcn)
if nargout == 0
clear app
end
end
% Code that executes before app deletion
function delete(app)
% Delete UIFigure when app is deleted
delete(app.UIFigure)
end
end
end