-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhighlight_in_correlation_plot.m
executable file
·45 lines (30 loc) · 1.26 KB
/
highlight_in_correlation_plot.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
function [Highlight_x,Highlight_y]=highlight_in_correlation_plot(QueryStrains_matrix,QueryStrains_MeanGeneticDistance,Highlighted_Strains)
%HIGHLIGHT_IN_CORRELATION_PLOT hightlights specific points in the data set
counter=1;
for iStrain=1:length(Highlighted_Strains)
for jStrain=iStrain+1:length(Highlighted_Strains)
Strain1=Highlighted_Strains{iStrain};
Strain2=Highlighted_Strains{jStrain};
Strain_names1={QueryStrains_matrix{:,1}};
Strain_names2={QueryStrains_matrix{:,2}};
idx1=strcmp(Strain_names1,Strain1);
idx2=strcmp(Strain_names2,Strain2);
PairStrains_idx=find(idx1&idx2);
if isempty(PairStrains_idx)
idx1=strcmp(Strain_names1,Strain2);
idx2=strcmp(Strain_names2,Strain1);
PairStrains_idx=find(idx1&idx2);
end
%%
if PairStrains_idx
try
Highlight_x(counter)=QueryStrains_matrix{PairStrains_idx,3};
Highlight_y(counter)=QueryStrains_MeanGeneticDistance(PairStrains_idx);
counter=counter+1;
catch
display('klajsdla')
end
end
end
end
end