Skip to content

Commit c5e7d38

Browse files
committed
Merge branch '_TMP_RELEASE_BRANCH_' into niak-cog
2 parents d088b25 + e8a12d3 commit c5e7d38

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

commands/misc/niak_gb_vars.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
144144

145145
%% NIAK version
146-
GB_NIAK.version = 'v1.0.0';
146+
GB_NIAK.version = 'v1.0.1';
147147

148148
%% Target for tests
149149
GB_NIAK.target_test = 'ah';

reports/connectome/niak_brick_report_connectome.m

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
% IN.NETWORK (string) a .mat file with the quantization data for the
1111
% network overlay.
1212
%
13-
% OUT (string) the name of the rmap.html report.
13+
% OUT.RMAP (string) the name of the rmap.html report.
14+
% OUT.NETWORK (string) the name of the javascript data for the networks.
1415
%
1516
% OPT.LABEL_NETWORK (cell of strings) string labels for each network.
1617
% OPT.LABEL_SUBJECT (cell of strings) string labels for each network.
@@ -43,9 +44,8 @@
4344

4445
%% Defaults
4546
in = psom_struct_defaults ( in , { 'individual' , 'average' , 'network'} , { 'gb_niak_omitted' , 'gb_niak_omitted' , 'gb_niak_omitted' });
46-
if ~ischar(out)
47-
error('FILES_OUT should be a string')
48-
end
47+
out = psom_struct_defaults ( out , { 'rmap' , 'network' } , { NaN , NaN });
48+
4949

5050
if nargin < 3
5151
opt = struct;
@@ -94,9 +94,23 @@
9494
str_rmap = strrep(str_rmap,'$SUBJECT',list_subject{1});
9595

9696
%% Write report
97-
[hf,msg] = fopen(out,'w');
97+
[hf,msg] = fopen(out.rmap,'w');
9898
if hf == -1
9999
error(msg)
100100
end
101101
fprintf(hf,'%s',str_rmap);
102-
fclose(hf);
102+
fclose(hf);
103+
104+
%% save a json/javascript list of networks
105+
text_network = sprintf('var listNetwork = [\n');
106+
for ss = 1:(length(list_network)-1)
107+
text_network = [text_network sprintf('{id: %i, text: ''%s'' },\n',ss,list_network{ss})];
108+
end
109+
text_network = sprintf('%s{id: %i, text: ''%s'' }\n];\n',text_network,length(list_network),list_network{end});
110+
111+
[hf,msg] = fopen(out.network,'w');
112+
if hf == -1
113+
error(msg)
114+
end
115+
fprintf(hf,'%s',text_network);
116+
fclose(hf);

reports/connectome/niak_report_connectome.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@
195195
jin.individual = ind_quantization;
196196
jin.average = avg_quantization;
197197
jin.network = net_quantization;
198-
jout = [opt.folder_out 'rmap.html'];
198+
jout.rmap = [opt.folder_out 'rmap.html'];
199+
jout.network = [opt.folder_out 'summary' filesep 'listNetwork.js'];
199200
jopt.label_network = list_seed;
200201
jopt.label_subject = list_subject;
201202
pipeline = psom_add_job(pipeline,'rmap_report','niak_brick_report_connectome',jin,jout,jopt);

0 commit comments

Comments
 (0)