Skip to content

Commit ad561c7

Browse files
committed
everything works
1 parent 9dcf943 commit ad561c7

6 files changed

Lines changed: 41 additions & 31 deletions

File tree

braph2/analysis/GUIMeasurement.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
function GUIMeasurement(measurement_class, analysis, measure_rules)
32
% GUIMEASUREMENT creates a UI figure to specify Measurement settings
43
%

braph2/analysis/test_GUIAnalysis.m

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,14 @@
2121

2222
set(gcf, 'CloseRequestFcn', 'closereq')
2323
close(gcf)
24+
25+
%% INIT CON
26+
27+
analysis_file = [fileparts(which('example_workflow_CON_WU.m')) filesep() 'example data CON (DTI)' filesep() 'analysis_example_CON_BUT.analysis'];
28+
temp = load(analysis_file, '-mat', 'ga', 'BUILD');
29+
ga = temp.ga;
30+
31+
GUIAnalysis(ga)
32+
33+
% set(gcf, 'CloseRequestFcn', 'closereq')
34+
% close(gcf)

braph2/analysis/test_GUIAnalysisSettings.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
temp = load(cohort_file, '-mat', 'cohort', 'selected_group', 'selected_subjects', 'BUILD');
3232
cohort = temp.cohort;
3333

34-
GUIAnalysisSettings(cohort, 'AnalysisCON_BUD')
34+
GUIAnalysisSettings(cohort, 'AnalysisCON_BUT')
3535

36-
% set(gcf, 'CloseRequestFcn', 'closereq')
37-
% close(gcf)
36+
set(gcf, 'CloseRequestFcn', 'closereq')
37+
close(gcf)

braph2/workflows/Connectivity/AnalysisCON_BUT.m

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
function analysis = AnalysisCON_BUT(id, label, notes, cohort, measurements, randomcomparisons, comparisons, varargin)
4545
% AnalysisCON_BUT(ID, LABEL, NOTES, COHORT, MEASUREMENTS, RANDOMCOMPARISON, COMPARISONS)
4646
% creates a connectivity analysis of fixed threshold with ID, LABEL,
47-
% COHORT, MEASUREMENTS, RANDOMCOMPARISON and COMPARISONS. It
47+
% COHORT, MEASUREMENTS, RANDOMCOMPARISON and COMPARISONS. It
4848
% initializes the ANALYSISST_WU with default settings.
4949
%
5050
% AnalysisCON_BUT(ID, LABEL, NOTES, COHORT, MEASUREMENTS, RANDOMCOMPARISON, COMPARISONS, PROPERTY, VALUE, ...)
@@ -53,7 +53,7 @@
5353
% initializes the ANALYSISST_WU with specified settings VALUES.
5454
%
5555
% See also MeasurementCON_WU, RandomComparisonCON_WU, ComparisonCON_WU.
56-
56+
5757
analysis = analysis@AnalysisCON_WU(id, label, notes, cohort, measurements, randomcomparisons, comparisons, varargin{:});
5858
end
5959
end
@@ -65,12 +65,12 @@
6565
% creates a measurement ID with the ANALYSIS class, the
6666
% MEASURE_CODE, the GROUP and the THRESHOLD.
6767
%
68-
% See also getRandomComparisonID, getComparisonID.
68+
% See also getRandomComparisonID, getComparisonID.
6969

7070
measurement_id = getMeasurementID@AnalysisCON_WU(analysis, measure_code, group, varargin{:});
7171

7272
threshold = get_from_varargin(0, 'threshold', varargin{:});
73-
measurement_id = [measurement_id ' threshold=' num2str(threshold)];
73+
measurement_id = [measurement_id ' threshold=' num2str(threshold)];
7474
end
7575
function randomcomparison_id = getRandomComparisonID(analysis, measure_code, group, varargin)
7676
% GETRANDOMCOMPARISONID returns a random comparison ID
@@ -79,8 +79,8 @@
7979
% creates a random comparison ID with the ANALYSIS class, the
8080
% MEASURE_CODE, the GROUP and the THRESHOLD.
8181
%
82-
% See also getMeasurementID, getComparisonID.
83-
82+
% See also getMeasurementID, getComparisonID.
83+
8484
randomcomparison_id = getRandomComparisonID@AnalysisCON_WU(analysis, measure_code, group, varargin{:});
8585

8686
threshold = get_from_varargin(0, 'threshold', varargin{:});
@@ -142,7 +142,7 @@
142142

143143
graph_type = analysis.getGraphType();
144144
graph = Graph.getGraph(graph_type, A);
145-
end
145+
end
146146
end
147147
methods (Static) % Descriptive functions
148148
function analysis_class = getClass()
@@ -182,7 +182,7 @@
182182
function graph_type = getGraphType()
183183
% GETGRAPHTYPE returns the compatible type of graph
184184
%
185-
% GRAPH_TYPE = GETGRAPHTYPE() returns the compatible type of
185+
% GRAPH_TYPE = GETGRAPHTYPE() returns the compatible type of
186186
% graph 'GraphBU'.
187187
%
188188
% See also getSubjectClass.
@@ -221,7 +221,7 @@
221221
comparison_class = 'ComparisonCON_BUT';
222222
end
223223
end
224-
methods % plot methods
224+
methods % plot methods
225225
function p = getGlobalMeasurePlot(analysis, ui_parent_panel, ui_parent_axes, measure_code, group, subject, varargin) %#ok<INUSL>
226226
% GETGLOBALMEASUREPLOT creates a uipanel to contain a plot
227227
%
@@ -231,10 +231,10 @@
231231
%
232232
% See also getGraphPanel, getGlobalPanel.
233233

234-
X = analysis.selectMeasurements(measure_code, group, '.getThreshold()');
234+
X = analysis.selectMeasurements(measure_code, group, '.getThreshold()');
235235
if subject == 1
236236
Y = analysis.selectMeasurements(measure_code, group, '.getGroupAverageValue()');
237-
else
237+
else
238238
measurements = analysis.selectMeasurements(measure_code, group, '.getMeasureValues()');
239239
Y = cellfun(@(x) x(subject-1), measurements);
240240
end

braph2/workflows/Connectivity/AnalysisCON_WU.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@
182182
measure_code, ...
183183
group, ...
184184
'MeasurementCON.values', measures, ...
185-
'MeasurementCON.average_value', measure_average ...
186-
);
185+
'MeasurementCON.average_value', measure_average, ...
186+
varargin{:});
187187
end
188188
function randomcomparison = calculate_random_comparison(analysis, measure_code, group, varargin)
189189
% CALCULATE_RANDOM_COMPARISON returns a random comparison
@@ -366,8 +366,8 @@
366366
'ComparisonCON.p1', p1, ...
367367
'ComparisonCON.p2', p2, ...
368368
'ComparisonCON.confidence_min', ci_lower, ...
369-
'ComparisonCON.confidence_max', ci_upper ...
370-
);
369+
'ComparisonCON.confidence_max', ci_upper, ...
370+
varargin{:});
371371
end
372372
end
373373
methods (Static) % Descriptive functions

braph2/workflows/Connectivity/MeasurementCON_BUT.m

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,25 @@
2121
% MeasurementCON_BUT plot methods (Static):
2222
% getMeasurementSettingsPanel - returns a UIPanel
2323
%
24-
% See also Comparison, AnalysisCON_BUT, ComparisonCON_BUT, RandomComparisonCON_BUT.
25-
24+
% See also Comparison, AnalysisCON_BUT, ComparisonCON_BUT, RandomComparisonCON_BUT.
25+
2626
properties (Access = protected)
2727
threshold % threshold of the values
2828
end
2929
methods % Constructor
3030
function m = MeasurementCON_BUT(id, label, notes, atlas, measure_code, group, varargin)
3131
% MEASUREMENTCON_BUT(ID, LABEL, NOTES, ATLAS, MEASURE_CODE, GROUP, 'threshold', THRESHOLD)
3232
% creates a measurement with ID, LABEL, ATLAS and MEASURE_CODE
33-
% with the data from GROUP, this data will have a fixed THRESHOLD.
33+
% with the data from GROUP, this data will have a fixed THRESHOLD.
3434
%
35-
% MeasurementCON_BUT(ID, LABEL, NOTES, ATLAS, MEASURE_CODE, GROUP)
35+
% MeasurementCON_BUT(ID, LABEL, NOTES, ATLAS, MEASURE_CODE, GROUP)
3636
% creates a comparison with ID, LABEL, ATLAS, MEASURE_CODE,
3737
% with the data from GROUP, this data will have a fixed default threshold.
3838
%
3939
% See also ComparisonCON_BUT, RandomComparisonCON_BUT, AnalysisCON_BUT.
4040

4141
m = m@MeasurementCON_WU(id, label, notes, atlas, measure_code, group, varargin{:});
42-
42+
4343
threshold = get_from_varargin(0, 'threshold', varargin{:});
4444
m.setThreshold(threshold)
4545
end
@@ -48,9 +48,9 @@
4848
function setThreshold(m, threshold)
4949
% SETTHRESHOLD sets the measure value of the group
5050
%
51-
% SETTHRESHOLD(M, THRESHOLD) sets the measure value of
51+
% SETTHRESHOLD(M, THRESHOLD) sets the measure value of
5252
% the group.
53-
%
53+
%
5454
% See also getThreshold.
5555

5656
m.threshold = threshold;
@@ -71,7 +71,7 @@ function setThreshold(m, threshold)
7171
function class = getClass()
7272
% GETCLASS returns the class of connectivity measurement BUT
7373
%
74-
% ANALYSIS_CLASS = GETCLASS(ANALYSIS) returns the class of
74+
% ANALYSIS_CLASS = GETCLASS(ANALYSIS) returns the class of
7575
% measurement. In this case 'MeasurementCON_BUT'.
7676
%
7777
% See also getList, getName, getDescription.
@@ -102,17 +102,17 @@ function setThreshold(m, threshold)
102102
];
103103
end
104104
function analysis_class = getAnalysisClass()
105-
% GETANALYSISCLASS returns the class of the analsysis
105+
% GETANALYSISCLASS returns the class of the analsysis
106106
%
107107
% ANALYSIS_CLASS = GETANALYSISCLASS() returns the class of the
108108
% analysis the measurement is part of, 'AnalysisCON_BUT'.
109109
%
110110
% See also getClass, getName, getDescription.
111111

112112
analysis_class = 'AnalysisCON_BUT';
113-
end
113+
end
114114
end
115-
methods (Static) % Plot functions
115+
methods (Static) % Plot functions
116116
function handle = getMeasurementSettingsPanel(analysis, uiparent) %#ok<INUSL>
117117
% GETCHILDPANEL returns a dynamic UIPanel
118118
%
@@ -179,4 +179,4 @@ function cb_measurement_max(src, ~)
179179
str2double(get(ui_threshold_max_edit, 'String')))
180180
end
181181
end
182-
end
182+
end

0 commit comments

Comments
 (0)