Skip to content

Commit 82381a5

Browse files
authored
[NET-214] Error plotting Chi-squared and Hypergeometric within network pair (#58)
added check for tests without single sample
1 parent 9d3130b commit 82381a5

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

+nla/+net/+result/NetworkResultPlotParameter.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,10 @@ function brainFigureButtonCallback(network1, network2)
166166

167167
function statistic = getStatsFromMethodAndName(obj, test_method, plot_statistic)
168168
% combining the method and stat name to get the data. With a fail safe for forgetting 'single_sample'
169-
if test_method == "within_network_pair" && ~startsWith(plot_statistic, "single_sample")
170-
plot_statistic = strcat("single_sample_", plot_statistic);
169+
if isequal(test_method, "within_network_pair")...
170+
&& ~startsWith(plot_statistic, "single_sample")...
171+
&& ~any(ismember(obj.noncorrelation_input_tests, obj.network_test_results.test_name))
172+
plot_statistic = strcat("single_sample_", plot_statistic);
171173
end
172174
statistic = obj.network_test_results.(test_method).(plot_statistic);
173175
end

0 commit comments

Comments
 (0)