Skip to content
Snippets Groups Projects
Commit af28cef4 authored by ac's avatar ac
Browse files

SSF.drawSubsets -- hard coded for DHB

parent 9847da0f
No related branches found
No related tags found
No related merge requests found
% andy and layton. jul 3 2023. very preliminary.
kROOT = '/g/leverjs/Olivier/Agne/2022-06-03_48h-depr-transcr-drugs/kymo_combined_downsize_steady_state';
flist = dir(fullfile(kROOT,'*.LEVER'));
transcr_class = readtable('expDescr-2022-06-03.xlsx');
steady_state_class = load('../agne_20x_classMap.mat');
className = {};
for ff = 1:length(flist)
cn = regexp(flist(ff).name,'(\d+-\d+-\d+)_.*(\d\d)_ori*','tokens');
if isempty(cn)
re = regexp(flist(ff).name,'^(\d+)_.*(\d).LEVER','tokens');
idx = str2double(re{1}{1});
part = str2double(re{1}{2});
if part == 1
className{ff} = ['pre_' transcr_class.Cell_Type{idx}];
else
className{ff} = ['post_' transcr_class.Cell_Type{idx}];
end
else
cn = [cn{1}{1} '_' cn{1}{2}];
className{ff} = steady_state_class.classMap(cn);
end
end
ssClassList = unique(steady_state_class.classMap.values);
idx = contains(ssClassList,'E17K');
ssClassList(idx) = [];
idx = contains(ssClassList,'E545K');
ssClassList(idx) = [];
ssClassList(end+1) = {'pre_ErbB2_overexpr'};
idx = cellfun(@(x) any(contains(ssClassList,x)),className,'UniformOutput',false);
idx = find([idx{:}]);
d2 = d(idx,idx);
className = className(idx);
A = d2;
K=3;
[idx,Y] = Cluster.SpectralCluster(A,K);
% Y = tsne(Y,'Algorithm','exact','NumDimensions',3);
clf;hold off;
% if size(Y,2) == 3
% plot3(Y(:,1),Y(:,2),Y(:,3),'.')
% else
% plot(Y(:,1),Y(:,2),'.')
% end
sym = {'ko','cv','m^','r*','gx','<k','b>','gs','bd'};
classList = unique(className);
hx = zeros(size(classList));
hold on
for ff=1:size(Y,1)
idxSym = find(strcmp(classList,className{ff}));
if K==3
h1 = plot3(Y(ff,1),Y(ff,2),Y(ff,3),sym{idxSym});
else
h1 = plot(Y(ff,1),Y(ff,2),sym{idxSym},'UserData',ff);
end
if ~hx(idxSym)
hx(idxSym) = h1;
end
% if size(Y,2) == 3
% text(Y(i,1),Y(i,2),Y(i,3),num2str(i),'FontSize',12)
%
% else
% text(Y(i,1),Y(i,2),num2str(i),'FontSize',12)
% end
end
set(gcf,'color','w')
xlabel('u1');ylabel('u2'),zlabel('u3')
legend(hx(find(hx)),classList(find(hx)),'interpreter','none');
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment