|
27 | 27 | end |
28 | 28 |
|
29 | 29 | function result = plotProbabilityParameters(obj, edge_test_options, edge_test_result, test_method, plot_statistic,... |
30 | | - plot_title, fdr_correction, significance_filter, ranking_method) |
| 30 | + plot_title, fdr_correction, effect_size_filter, ranking_method) |
31 | 31 | % plot_title - this will be a string |
32 | 32 | % plot_statistic - this is the stat that will be plotted |
33 | 33 | % significance filter - this will be a boolean or some sort of object (like Cohen's D > D-value) |
|
36 | 36 |
|
37 | 37 | import nla.TriMatrix nla.TriMatrixDiag |
38 | 38 | % We're going to use a default filter here |
39 | | - if isequal(significance_filter, false) |
40 | | - significance_filter = TriMatrix(obj.number_of_networks, "logical", TriMatrixDiag.KEEP_DIAGONAL); |
41 | | - significance_filter.v = true(numel(significance_filter.v), 1); |
| 39 | + if isequal(effect_size_filter, false) |
| 40 | + effect_size_filter = TriMatrix(obj.number_of_networks, "logical", TriMatrixDiag.KEEP_DIAGONAL); |
| 41 | + effect_size_filter.v = true(numel(effect_size_filter.v), 1); |
42 | 42 | end |
43 | 43 |
|
44 | 44 | % Adding on to the plot title if it's a -log10 plot |
|
53 | 53 | if isstring(fdr_correction) || ischar(fdr_correction) |
54 | 54 | fdr_correction = nla.net.mcc.(erase(fdr_correction, "-"))(); |
55 | 55 | end |
56 | | - p_value_max = fdr_correction.correct(obj.network_atlas, obj.updated_test_options, statistic_input); |
| 56 | + |
| 57 | + [is_sig_vector, p_value_max] = fdr_correction.correct(obj.network_atlas, obj.updated_test_options, statistic_input); |
| 58 | + |
57 | 59 | p_value_breakdown_label = fdr_correction.createLabel(obj.network_atlas, obj.updated_test_options,... |
58 | 60 | statistic_input); |
59 | | - |
60 | | - name_label = sprintf("%s %s\nP < %.2g (%s)", obj.network_test_results.test_display_name, plot_title,... |
61 | | - p_value_max, p_value_breakdown_label); |
62 | | - if p_value_max == 0 |
63 | | - name_label = sprintf("%s %s\nP = %.2g (%s)", obj.network_test_results.test_display_name, plot_title,... |
64 | | - p_value_max, p_value_breakdown_label); |
65 | | - end |
| 61 | + name_label = sprintf("%s %s\n%s", obj.network_test_results.test_display_name, plot_title,... |
| 62 | + p_value_breakdown_label); |
| 63 | +% else |
| 64 | +% |
| 65 | +% name_label = sprintf("%s %s\nP < %.2g (%s)", obj.network_test_results.test_display_name, plot_title,... |
| 66 | +% p_value_max, p_value_breakdown_label); |
| 67 | +% if p_value_max == 0 |
| 68 | +% name_label = sprintf("%s %s\nP = %.2g (%s)", obj.network_test_results.test_display_name, plot_title,... |
| 69 | +% p_value_max, p_value_breakdown_label); |
| 70 | +% end |
| 71 | +% end |
66 | 72 |
|
67 | 73 | % Filtering if there's a filter provided |
68 | 74 | significance_plot = TriMatrix(obj.number_of_networks, "logical", TriMatrixDiag.KEEP_DIAGONAL); |
69 | | - significance_plot.v = (statistic_input.v < p_value_max) & significance_filter.v; |
| 75 | + significance_plot.v = is_sig_vector & effect_size_filter.v; |
70 | 76 |
|
71 | 77 | % scale values very slightly for display so numbers just below |
72 | 78 | % the threshold don't show up white but marked significant |
@@ -195,8 +201,8 @@ function brainFigureButtonCallback(network1, network2) |
195 | 201 | end |
196 | 202 |
|
197 | 203 | switch ranking_method |
198 | | - case "nla.RankingMethod.WINKLER" |
199 | | - ranking = "winkler_"; |
| 204 | + case "nla.RankingMethod.FREEDMAN_LANE" |
| 205 | + ranking = "freedman_lane_"; |
200 | 206 | case "nla.RankingMethod.WESTFALL_YOUNG" |
201 | 207 | ranking = "westfall_young_"; |
202 | 208 | otherwise |
|
0 commit comments