|
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 | | - if isa(fdr_correction,'nla.net.mcc.HolmBonferroni') |
61 | | - %Holm Bonferroni does not have a single static p threshold, |
62 | | - %so use the custom label for this FDR that only includes |
63 | | - %the alpha (original p_max from input struct), and not any |
64 | | - %other p threshold |
65 | | - name_label = sprintf("%s %s\n%s", obj.network_test_results.test_display_name, plot_title,... |
| 61 | + name_label = sprintf("%s %s\n%s", obj.network_test_results.test_display_name, plot_title,... |
66 | 62 | p_value_breakdown_label); |
67 | | - else |
68 | | - |
69 | | - name_label = sprintf("%s %s\nP < %.2g (%s)", obj.network_test_results.test_display_name, plot_title,... |
70 | | - p_value_max, p_value_breakdown_label); |
71 | | - if p_value_max == 0 |
72 | | - name_label = sprintf("%s %s\nP = %.2g (%s)", obj.network_test_results.test_display_name, plot_title,... |
73 | | - p_value_max, p_value_breakdown_label); |
74 | | - end |
75 | | - end |
| 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 |
76 | 72 |
|
77 | 73 | % Filtering if there's a filter provided |
78 | 74 | significance_plot = TriMatrix(obj.number_of_networks, "logical", TriMatrixDiag.KEEP_DIAGONAL); |
79 | | - significance_plot.v = (statistic_input.v < p_value_max) & significance_filter.v; |
| 75 | + significance_plot.v = is_sig_vector & effect_size_filter.v; |
80 | 76 |
|
81 | 77 | % scale values very slightly for display so numbers just below |
82 | 78 | % the threshold don't show up white but marked significant |
|
0 commit comments