Added source Matlab code for reference
This commit is contained in:
parent
b8af977117
commit
b5d99903d2
186 changed files with 61405 additions and 1 deletions
61
matlab/graph/viewUnrooted.m
Normal file
61
matlab/graph/viewUnrooted.m
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
function viewUnrooted(action)
|
||||
% VIEWUNROOTED function to called by VIEWNJ to draw unrooted
|
||||
% neighbor-joining trees
|
||||
|
||||
handle = gcf;
|
||||
h0 = findobj(handle,'Tag','attr_menu');
|
||||
g = get(h0,'Userdata');
|
||||
g.visualtype = action;
|
||||
set(h0,'Userdata',g); % store in the attribute menu
|
||||
cla reset
|
||||
axis off
|
||||
% close(g.handle);
|
||||
% h0 = figure('NumberTitle','off');
|
||||
% g.handle = h0;
|
||||
% set(h0,'menubar','none','toolbar','figure');
|
||||
% set(h0,'Tag','nj_plot');
|
||||
% set(h0,'Name',['Neighbor-Joining tree - ' g.filename]);;
|
||||
|
||||
if strcmp(g.type,'NJ')
|
||||
t = seqNeighJoin(g.D, 'equivar', g.varnames);
|
||||
else
|
||||
t = seqlinkage(g.D, 'average', g.varnames);
|
||||
end
|
||||
|
||||
switch action
|
||||
case 'radial'
|
||||
% plotNJ(g.D, 1, char(g.varnames));
|
||||
Plot(t,'type','radial');
|
||||
case 'phylogram'
|
||||
% plotNJ(g.D, 0, char(g.varnames));
|
||||
plotPhytree(t);
|
||||
end
|
||||
|
||||
% h1 = uimenu('Parent',handle, ...
|
||||
% 'Label','Attributes', ...
|
||||
% 'Tag','attr_menu');
|
||||
% h2 = uimenu('Parent',h1, ...
|
||||
% 'Label','Rename clusters', ...
|
||||
% 'callback', 'plotflow rename', ...
|
||||
% 'Tag','clustername_menu');
|
||||
% h2 = uimenu('Parent',h1, ...
|
||||
% 'Label','Visual type', ...
|
||||
% 'Tag','visualtype_menu');
|
||||
% h3 = uimenu('Parent',h2, ...
|
||||
% 'Label','Square', ...
|
||||
% 'callback', 'viewDendrogram(''square'')', ...
|
||||
% 'Tag','viewsquare_menu');
|
||||
% h3 = uimenu('Parent',h2, ...
|
||||
% 'Label','Angular', ...
|
||||
% 'callback', 'viewDendrogram(''angular'')', ...
|
||||
% 'Tag','viewangular_menu');
|
||||
% h3 = uimenu('Parent',h2, ...
|
||||
% 'Label','Radial', ...
|
||||
% 'callback', 'viewUnrooted(''radial'')', ...
|
||||
% 'Tag','viewradial_menu');
|
||||
% h3 = uimenu('Parent',h2, ...
|
||||
% 'Label','Phylogram', ...
|
||||
% 'callback', 'viewUnrooted(''phylogram'')', ...
|
||||
% 'Tag','viewphylogram_menu');
|
||||
% set(h1,'Userdata',g); % store in the attribute menu
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue