From 41e115ba2e46d7ca676898b7f754ba463f982c9b Mon Sep 17 00:00:00 2001
From: ac_fx <arc334@drexel.edu>
Date: Sun, 10 Dec 2023 10:25:22 -0500
Subject: [PATCH] draw_ssf_ncd with new csf_spatial

---
 matlab/+SSF/draw_ssf_ncd.m | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/matlab/+SSF/draw_ssf_ncd.m b/matlab/+SSF/draw_ssf_ncd.m
index b58fff82..788c609b 100644
--- a/matlab/+SSF/draw_ssf_ncd.m
+++ b/matlab/+SSF/draw_ssf_ncd.m
@@ -1,4 +1,4 @@
-function [csf_mean,csf_std] = draw_ssf_ncd(ROOT,classList,A,K)
+function [csf_mean,csf_std,csf] = draw_ssf_ncd(ROOT,classList,A,K)
 
 flist = dir(fullfile(ROOT,'*.LEVER'));
 [classUnique,ia,ic]= unique(classList);
@@ -6,7 +6,7 @@ idxTrue = ic;
 
 [idx,Y] = Cluster.SpectralCluster(A,K);
 
-[csf_mean, csf_std] = CSF.csf_spatial(Y,idxTrue);
+csf = CSF.csf_spatial(Y,idxTrue);
 
 % Y = tsne(Y,'Algorithm','exact','NumDimensions',3);
 clf;hold off;
@@ -43,6 +43,7 @@ if ~isempty(idxWT)
     classUnique{idxWT} = 'WILD TYPE';
 end
 legend(hx(find(hx)),classUnique(find(hx)),'interpreter','none');
-tstr = ['CSF^6_{Erk} = ' jsonencode(round([csf_mean,csf_std],2,'significant'))]; 
+tstr = ['CSF^6_{Erk} = ' jsonencode(round([mean(csf),std(csf)],2,'significant'))]; 
 title(tstr)
 
+4;
-- 
GitLab