Skip to content

Commit

Permalink
Merge branch '_TMP_RELEASE_BRANCH_' into niak-cog
Browse files Browse the repository at this point in the history
  • Loading branch information
poquirion committed May 10, 2017
2 parents d088b25 + e8a12d3 commit c5e7d38
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion commands/misc/niak_gb_vars.m
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% NIAK version
GB_NIAK.version = 'v1.0.0';
GB_NIAK.version = 'v1.0.1';

%% Target for tests
GB_NIAK.target_test = 'ah';
Expand Down
26 changes: 20 additions & 6 deletions reports/connectome/niak_brick_report_connectome.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
% IN.NETWORK (string) a .mat file with the quantization data for the
% network overlay.
%
% OUT (string) the name of the rmap.html report.
% OUT.RMAP (string) the name of the rmap.html report.
% OUT.NETWORK (string) the name of the javascript data for the networks.
%
% OPT.LABEL_NETWORK (cell of strings) string labels for each network.
% OPT.LABEL_SUBJECT (cell of strings) string labels for each network.
Expand Down Expand Up @@ -43,9 +44,8 @@

%% Defaults
in = psom_struct_defaults ( in , { 'individual' , 'average' , 'network'} , { 'gb_niak_omitted' , 'gb_niak_omitted' , 'gb_niak_omitted' });
if ~ischar(out)
error('FILES_OUT should be a string')
end
out = psom_struct_defaults ( out , { 'rmap' , 'network' } , { NaN , NaN });


if nargin < 3
opt = struct;
Expand Down Expand Up @@ -94,9 +94,23 @@
str_rmap = strrep(str_rmap,'$SUBJECT',list_subject{1});

%% Write report
[hf,msg] = fopen(out,'w');
[hf,msg] = fopen(out.rmap,'w');
if hf == -1
error(msg)
end
fprintf(hf,'%s',str_rmap);
fclose(hf);
fclose(hf);

%% save a json/javascript list of networks
text_network = sprintf('var listNetwork = [\n');
for ss = 1:(length(list_network)-1)
text_network = [text_network sprintf('{id: %i, text: ''%s'' },\n',ss,list_network{ss})];
end
text_network = sprintf('%s{id: %i, text: ''%s'' }\n];\n',text_network,length(list_network),list_network{end});

[hf,msg] = fopen(out.network,'w');
if hf == -1
error(msg)
end
fprintf(hf,'%s',text_network);
fclose(hf);
3 changes: 2 additions & 1 deletion reports/connectome/niak_report_connectome.m
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@
jin.individual = ind_quantization;
jin.average = avg_quantization;
jin.network = net_quantization;
jout = [opt.folder_out 'rmap.html'];
jout.rmap = [opt.folder_out 'rmap.html'];
jout.network = [opt.folder_out 'summary' filesep 'listNetwork.js'];
jopt.label_network = list_seed;
jopt.label_subject = list_subject;
pipeline = psom_add_job(pipeline,'rmap_report','niak_brick_report_connectome',jin,jout,jopt);
Expand Down

0 comments on commit c5e7d38

Please sign in to comment.