diff --git a/GUI_AllData_CDX2Commitment/AllDataMatrixDAPInorm_1stPlate.mat b/GUI_AllData_CDX2Commitment/AllDataMatrixDAPInorm_1stPlate.mat new file mode 100644 index 0000000..d7efc4a Binary files /dev/null and b/GUI_AllData_CDX2Commitment/AllDataMatrixDAPInorm_1stPlate.mat differ diff --git a/GUI_AllData_CDX2Commitment/AllDataMatrixDAPInorm_25.mat b/GUI_AllData_CDX2Commitment/AllDataMatrixDAPInorm_25.mat new file mode 100644 index 0000000..7da3d82 Binary files /dev/null and b/GUI_AllData_CDX2Commitment/AllDataMatrixDAPInorm_25.mat differ diff --git a/GUI_AllData_CDX2Commitment/AllDataMatrixDAPInorm_Plate1.mat b/GUI_AllData_CDX2Commitment/AllDataMatrixDAPInorm_Plate1.mat new file mode 100644 index 0000000..49f365e Binary files /dev/null and b/GUI_AllData_CDX2Commitment/AllDataMatrixDAPInorm_Plate1.mat differ diff --git a/GUI_AllData_CDX2Commitment/AllDataMatrixDAPInorm_Plate2.mat b/GUI_AllData_CDX2Commitment/AllDataMatrixDAPInorm_Plate2.mat new file mode 100644 index 0000000..1c9b62c Binary files /dev/null and b/GUI_AllData_CDX2Commitment/AllDataMatrixDAPInorm_Plate2.mat differ diff --git a/GUI_AllData_CDX2Commitment/AllDataMatrixDAPInorm_Plate3.mat b/GUI_AllData_CDX2Commitment/AllDataMatrixDAPInorm_Plate3.mat new file mode 100644 index 0000000..01662f2 Binary files /dev/null and b/GUI_AllData_CDX2Commitment/AllDataMatrixDAPInorm_Plate3.mat differ diff --git a/GUI_AllData_CDX2Commitment/ComparisonData3D.m b/GUI_AllData_CDX2Commitment/ComparisonData3D.m new file mode 100644 index 0000000..1d6c9be --- /dev/null +++ b/GUI_AllData_CDX2Commitment/ComparisonData3D.m @@ -0,0 +1,91 @@ +function ComparisonData3D(Sample1,Cond1,Sample2,Cond2,viewpoint) + +colourclusters = {colorconvertorRGB([11,93,174]),colorconvertorRGB([206,61,21]),colorconvertorRGB([105,26,123]),colorconvertorRGB([230,165,26]),colorconvertorRGB([101,160,37])}; + + +if Sample1 == 1 + +load('AllDataMatrixDAPInorm_Plate1.mat') +NamesConditions1 = {'BMP 1ng/ml 0-8h','BMP 1ng/ml 0-16h','BMP 1ng/ml 0-28h','BMP 1ng/ml 0-48h','BMP 10ng/ml 0-48h','BMP 10ng/ml 0-28h','BMP 10ng/ml 0-16h','BMP 10ng/ml 0-8h'}; + +elseif Sample1 == 2 + +load('AllDataMatrixDAPInorm_Plate2.mat') +NamesConditions1 = {'BMP 1ng/ml 0-8h','BMP 1ng/ml 0-16h','BMP 1ng/ml 0-28h','BMP 1ng/ml 0-48h','BMP 10ng/ml 0-48h','BMP 10ng/ml 0-28h','BMP 10ng/ml 0-16h','BMP 10ng/ml 0-8h'}; + +elseif Sample1 == 3 + +load('AllDataMatrixDAPInorm_Plate3.mat') +NamesConditions1 = {'Control','BMP 1ng/ml 0-28h + SB','BMP 1ng/ml 0-38h + SB','BMP 1ng/ml 0-48h + SB','BMP 10ng/ml 0-48h + SB','BMP 10ng/ml 0-38h + SB','BMP 10ng/ml 0-28h + SB','SB'}; + +elseif Sample1 == 4 + +load('AllDataMatrixDAPInorm_25.mat'); +NamesConditions1 = {'Control','BMP 10ng/ml 0-4h','BMP 10ng/ml 0-8h','BMP 10ng/ml 0-16h','BMP 10ng/ml 0-24h','BMP 10ng/ml 0-32h','BMP 10ng/ml 0-40h','BMP 10ng/ml 0-48h'}; + +elseif Sample1 == 5 + +load('AllDataMatrixDAPInorm_1stPlate.mat') +NamesConditions1 = {'Control','BMP 10ng/ml 0-24h','BMP 10ng/ml 0-8h','BMP 10ng/ml 0-24h','BMP 10ng/ml 0-24h','BMP 10ng/ml 0-28h','BMP 10ng/ml 0-32h','BMP 10ng/ml 0-40h'}; + +end + +DataSample1 = AllDataMatrixDAPInorm{Cond1}; + +if Sample2 == 1 + +load('AllDataMatrixDAPInorm_Plate1.mat') +NamesConditions2 = {'BMP 1ng/ml 0-8h','BMP 1ng/ml 0-16h','BMP 1ng/ml 0-28h','BMP 1ng/ml 0-48h','BMP 10ng/ml 0-48h','BMP 10ng/ml 0-28h','BMP 10ng/ml 0-16h','BMP 10ng/ml 0-8h'}; + +elseif Sample2 == 2 + +load('AllDataMatrixDAPInorm_Plate2.mat') +NamesConditions2 = {'BMP 1ng/ml 0-8h','BMP 1ng/ml 0-16h','BMP 1ng/ml 0-28h','BMP 1ng/ml 0-48h','BMP 10ng/ml 0-48h','BMP 10ng/ml 0-28h','BMP 10ng/ml 0-16h','BMP 10ng/ml 0-8h'}; + +elseif Sample2 == 3 + +load('AllDataMatrixDAPInorm_Plate3.mat') +NamesConditions2 = {'Control','BMP 1ng/ml 0-28h + SB','BMP 1ng/ml 0-38h + SB','BMP 1ng/ml 0-48h + SB','BMP 10ng/ml 0-48h + SB','BMP 10ng/ml 0-38h + SB','BMP 10ng/ml 0-28h + SB','SB'}; + +elseif Sample2 == 4 + +load('AllDataMatrixDAPInorm_25.mat'); +NamesConditions2 = {'Control','BMP 10ng/ml 0-4h','BMP 10ng/ml 0-8h','BMP 10ng/ml 0-16h','BMP 10ng/ml 0-24h','BMP 10ng/ml 0-32h','BMP 10ng/ml 0-40h','BMP 10ng/ml 0-48h'}; + +elseif Sample2 == 5 + +load('AllDataMatrixDAPInorm_1stPlate.mat') +NamesConditions2 = {'Control','BMP 10ng/ml 0-24h','BMP 10ng/ml 0-8h','BMP 10ng/ml 0-24h','BMP 10ng/ml 0-24h','BMP 10ng/ml 0-28h','BMP 10ng/ml 0-32h','BMP 10ng/ml 0-40h'}; + +end + +DataSample2 = AllDataMatrixDAPInorm{Cond2}; + +scatter3(DataSample1(:,4),DataSample1(:,5),DataSample1(:,6),'filled','SizeData',30,'MarkerFaceColor',colourclusters{1},'MarkerFaceAlpha',0.5) +hold on +scatter3(DataSample2(:,4),DataSample2(:,5),DataSample2(:,6),'filled','SizeData',30,'MarkerFaceColor',colourclusters{2},'MarkerFaceAlpha',0.5) + +minv = min([DataSample1;DataSample2]); +maxv = max([DataSample1;DataSample2]); + +legend(NamesConditions1{Cond1},NamesConditions2{Cond2}) + +xlabel('CDX2') +ylabel('SOX2') +zlabel('BRA') +set(gca, 'LineWidth', 1); +fs = 11; +set(gca,'FontSize', fs) +set(gca,'FontWeight', 'bold') +set(gca,'TickLabelInterpreter','latex') + +xlim([minv(4),maxv(4)]) +ylim([minv(5),maxv(5)]) +zlim([minv(6),maxv(6)]) + +if isempty(viewpoint) + view(3) +else + view(viewpoint) +end +hold off diff --git a/GUI_AllData_CDX2Commitment/ComparisonSamples_GUI.fig b/GUI_AllData_CDX2Commitment/ComparisonSamples_GUI.fig new file mode 100644 index 0000000..a3e6d9f Binary files /dev/null and b/GUI_AllData_CDX2Commitment/ComparisonSamples_GUI.fig differ diff --git a/GUI_AllData_CDX2Commitment/ComparisonSamples_GUI.m b/GUI_AllData_CDX2Commitment/ComparisonSamples_GUI.m new file mode 100644 index 0000000..2b345e5 --- /dev/null +++ b/GUI_AllData_CDX2Commitment/ComparisonSamples_GUI.m @@ -0,0 +1,310 @@ +function varargout = ComparisonSamples_GUI(varargin) +% COMPARISONSAMPLES_GUI MATLAB code for ComparisonSamples_GUI.fig +% COMPARISONSAMPLES_GUI, by itself, creates a new COMPARISONSAMPLES_GUI or raises the existing +% singleton*. +% +% H = COMPARISONSAMPLES_GUI returns the handle to a new COMPARISONSAMPLES_GUI or the handle to +% the existing singleton*. +% +% COMPARISONSAMPLES_GUI('CALLBACK',hObject,eventData,handles,...) calls the local +% function named CALLBACK in COMPARISONSAMPLES_GUI.M with the given input arguments. +% +% COMPARISONSAMPLES_GUI('Property','Value',...) creates a new COMPARISONSAMPLES_GUI or raises the +% existing singleton*. Starting from the left, property value pairs are +% applied to the GUI before ComparisonSamples_GUI_OpeningFcn gets called. An +% unrecognized property name or invalid value makes property application +% stop. All inputs are passed to ComparisonSamples_GUI_OpeningFcn via varargin. +% +% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one +% instance to run (singleton)". +% +% See also: GUIDE, GUIDATA, GUIHANDLES + +% Edit the above text to modify the response to help ComparisonSamples_GUI + +% Last Modified by GUIDE v2.5 07-Jun-2018 12:52:30 + +% Begin initialization code - DO NOT EDIT +gui_Singleton = 1; +gui_State = struct('gui_Name', mfilename, ... + 'gui_Singleton', gui_Singleton, ... + 'gui_OpeningFcn', @ComparisonSamples_GUI_OpeningFcn, ... + 'gui_OutputFcn', @ComparisonSamples_GUI_OutputFcn, ... + 'gui_LayoutFcn', [] , ... + 'gui_Callback', []); +if nargin && ischar(varargin{1}) + gui_State.gui_Callback = str2func(varargin{1}); +end + +if nargout + [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); +else + gui_mainfcn(gui_State, varargin{:}); +end +% End initialization code - DO NOT EDIT + + +% --- Executes just before ComparisonSamples_GUI is made visible. +function ComparisonSamples_GUI_OpeningFcn(hObject, eventdata, handles, varargin) +% This function has no output args, see OutputFcn. +% hObject handle to figure +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) +% varargin command line arguments to ComparisonSamples_GUI (see VARARGIN) + +% Choose default command line output for ComparisonSamples_GUI +handles.output = hObject; + +% Choose data set 1 +data = struct('valDataSet1',1); +set(handles.popupmenu1_Sample1,'UserData',data); + +% Choose data set 2 +data = struct('valDataSet2',1); +set(handles.popupmenu2_Sample2,'UserData',data); + + +% Choose Experimental Condition 1 +data = struct('valCond1',1); +set(handles.listbox1_Sample1,'UserData',data); %Save the user data +set(handles.listbox1_Sample1,'Value',1); %Show that the user data is that value + set(handles.listbox1_Sample1,'String',{'BMP 1ng/ml 0-8h';'BMP 1ng/ml 0-16h';'BMP 1ng/ml 0-28h';'BMP 1ng/ml 0-48h';'BMP 10ng/ml 0-48h';'BMP 10ng/ml 0-28h';'BMP 10ng/ml 0-16h';'BMP 10ng/ml 0-8h'}); + + % Choose Experimental Condition 1 +data = struct('valCond2',2); +set(handles.listbox2_Sample2,'UserData',data); %Save the user data +set(handles.listbox2_Sample2,'Value',2); %Show that the user data is that value + set(handles.listbox2_Sample2,'String',{'BMP 1ng/ml 0-8h';'BMP 1ng/ml 0-16h';'BMP 1ng/ml 0-28h';'BMP 1ng/ml 0-48h';'BMP 10ng/ml 0-48h';'BMP 10ng/ml 0-28h';'BMP 10ng/ml 0-16h';'BMP 10ng/ml 0-8h'}); + +ComparisonData3D(1,1,1,2,[]) + +% Update handles structure +guidata(hObject, handles); + +% UIWAIT makes ComparisonSamples_GUI wait for user response (see UIRESUME) +% uiwait(handles.figure1); + + +% --- Outputs from this function are returned to the command line. +function varargout = ComparisonSamples_GUI_OutputFcn(hObject, eventdata, handles) +% varargout cell array for returning output args (see VARARGOUT); +% hObject handle to figure +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) + +% Get default command line output from handles structure +varargout{1} = handles.output; + + +% --- Executes on selection change in popupmenu1_Sample1. +function popupmenu1_Sample1_Callback(hObject, eventdata, handles) +% hObject handle to popupmenu1_Sample1 (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) +sval = get(hObject,'Value'); +data = get(hObject,'UserData'); +data.valDataSet1 = sval; + + + +if sval == 1 + set(handles.listbox1_Sample1,'String',{'BMP 1ng/ml 0-8h';'BMP 1ng/ml 0-16h';'BMP 1ng/ml 0-28h';'BMP 1ng/ml 0-48h';'BMP 10ng/ml 0-48h';'BMP 10ng/ml 0-28h';'BMP 10ng/ml 0-16h';'BMP 10ng/ml 0-8h'}); + set(handles.listbox1_Sample1,'Value',1); + datacondition = struct('valCond1',1); + set(handles.listbox1_Sample1,'UserData',datacondition); + + +elseif sval == 2 + set(handles.listbox1_Sample1,'String',{'BMP 1ng/ml 0-8h';'BMP 1ng/ml 0-16h';'BMP 1ng/ml 0-28h';'BMP 1ng/ml 0-48h';'BMP 10ng/ml 0-48h';'BMP 10ng/ml 0-28h';'BMP 10ng/ml 0-16h';'BMP 10ng/ml 0-8h'}); + set(handles.listbox1_Sample1,'Value',1); + datacondition = struct('valCond1',1); + set(handles.listbox1_Sample1,'UserData',datacondition); + + +elseif sval == 3 + set(handles.listbox1_Sample1,'String',{'Control';'BMP 1ng/ml 0-28h + SB';'BMP 1ng/ml 0-38h + SB';'BMP 1ng/ml 0-48h + SB';'BMP 10ng/ml 0-48h + SB';'BMP 10ng/ml 0-38h + SB';'BMP 10ng/ml 0-28h + SB';'SB'}); + set(handles.listbox1_Sample1,'Value',1); + datacondition = struct('valCond1',1); + set(handles.listbox1_Sample1,'UserData',datacondition); + + +elseif sval == 4 + set(handles.listbox1_Sample1,'String',{'Control';'BMP 10ng/ml 0-24h';'BMP 10ng/ml 0-8h';'BMP 10ng/ml 0-24h';'BMP 10ng/ml 0-24h';'BMP 10ng/ml 0-28h';'BMP 10ng/ml 0-32h';'BMP 10ng/ml 0-40h'}); + set(handles.listbox1_Sample1,'Value',1); + datacondition = struct('valCond1',1); + set(handles.listbox1_Sample1,'UserData',datacondition); + + +elseif sval == 5 + set(handles.listbox1_Sample1,'String',{'Control';'BMP 10ng/ml 0-4h';'BMP 10ng/ml 0-8h';'BMP 10ng/ml 0-16h';'BMP 10ng/ml 0-24h';'BMP 10ng/ml 0-32h';'BMP 10ng/ml 0-40h';'BMP 10ng/ml 0-48h'}); + set(handles.listbox1_Sample1,'Value',1); + datacondition = struct('valCond1',1); + set(handles.listbox1_Sample1,'UserData',datacondition); + + +end + +% Store data in UserData of slider +set(hObject,'UserData',data); + +% Hints: contents = cellstr(get(hObject,'String')) returns popupmenu1_Sample1 contents as cell array +% contents{get(hObject,'Value')} returns selected item from popupmenu1_Sample1 + + +% --- Executes during object creation, after setting all properties. +function popupmenu1_Sample1_CreateFcn(hObject, eventdata, handles) +% hObject handle to popupmenu1_Sample1 (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles empty - handles not created until after all CreateFcns called + +% Hint: popupmenu controls usually have a white background on Windows. +% See ISPC and COMPUTER. +if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) + set(hObject,'BackgroundColor','white'); +end + + +% --- Executes on selection change in popupmenu2_Sample2. +function popupmenu2_Sample2_Callback(hObject, eventdata, handles) +% hObject handle to popupmenu2_Sample2 (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) +sval = get(hObject,'Value'); +data = get(hObject,'UserData'); +data.valDataSet2 = sval; + + + +if sval == 1 + set(handles.listbox2_Sample2,'String',{'BMP 1ng/ml 0-8h';'BMP 1ng/ml 0-16h';'BMP 1ng/ml 0-28h';'BMP 1ng/ml 0-48h';'BMP 10ng/ml 0-48h';'BMP 10ng/ml 0-28h';'BMP 10ng/ml 0-16h';'BMP 10ng/ml 0-8h'}); + set(handles.listbox2_Sample2,'Value',1); + datacondition = struct('valCond2',1); + set(handles.listbox2_Sample2,'UserData',datacondition); + + +elseif sval == 2 + set(handles.listbox2_Sample2,'String',{'BMP 1ng/ml 0-8h';'BMP 1ng/ml 0-16h';'BMP 1ng/ml 0-28h';'BMP 1ng/ml 0-48h';'BMP 10ng/ml 0-48h';'BMP 10ng/ml 0-28h';'BMP 10ng/ml 0-16h';'BMP 10ng/ml 0-8h'}); + set(handles.listbox2_Sample2,'Value',1); + datacondition = struct('valCond2',1); + set(handles.listbox2_Sample2,'UserData',datacondition); + + +elseif sval == 3 + set(handles.listbox2_Sample2,'String',{'Control';'BMP 1ng/ml 0-28h + SB';'BMP 1ng/ml 0-38h + SB';'BMP 1ng/ml 0-48h + SB';'BMP 10ng/ml 0-48h + SB';'BMP 10ng/ml 0-38h + SB';'BMP 10ng/ml 0-28h + SB';'SB'}); + set(handles.listbox2_Sample2,'Value',1); + datacondition = struct('valCond2',1); + set(handles.listbox2_Sample2,'UserData',datacondition); + + +elseif sval == 4 + set(handles.listbox2_Sample2,'String',{'Control';'BMP 0-24h';'BMP 0-8h';'BMP 0-24h';'BMP 0-24h';'BMP 0-28h';'BMP 0-32h';'BMP 0-40h'}); + set(handles.listbox2_Sample2,'Value',1); + datacondition = struct('valCond2',1); + set(handles.listbox2_Sample2,'UserData',datacondition); + + +elseif sval == 5 + set(handles.listbox2_Sample2,'String',{'Control';'BMP 0-4h';'BMP 0-8h';'BMP 0-16h';'BMP 0-24h';'BMP 0-32h';'BMP 0-40h';'BMP 0-48h'}); + set(handles.listbox2_Sample2,'Value',1); + datacondition = struct('valCond2',1); + set(handles.listbox2_Sample2,'UserData',datacondition); + + +end + +% Store data in UserData of slider +set(hObject,'UserData',data); + +% Hints: contents = cellstr(get(hObject,'String')) returns popupmenu2_Sample2 contents as cell array +% contents{get(hObject,'Value')} returns selected item from popupmenu2_Sample2 + + +% --- Executes during object creation, after setting all properties. +function popupmenu2_Sample2_CreateFcn(hObject, eventdata, handles) +% hObject handle to popupmenu2_Sample2 (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles empty - handles not created until after all CreateFcns called + +% Hint: popupmenu controls usually have a white background on Windows. +% See ISPC and COMPUTER. +if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) + set(hObject,'BackgroundColor','white'); +end + + +% --- Executes on selection change in listbox1_Sample1. +function listbox1_Sample1_Callback(hObject, eventdata, handles) +% hObject handle to listbox1_Sample1 (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) +sval = get(hObject,'Value'); +data = get(hObject,'UserData'); +data.valCond1 = sval; +% Store data in UserData of slider +set(hObject,'UserData',data); +% Hints: contents = cellstr(get(hObject,'String')) returns listbox1_Sample1 contents as cell array +% contents{get(hObject,'Value')} returns selected item from listbox1_Sample1 + + +% --- Executes during object creation, after setting all properties. +function listbox1_Sample1_CreateFcn(hObject, eventdata, handles) +% hObject handle to listbox1_Sample1 (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles empty - handles not created until after all CreateFcns called + +% Hint: listbox controls usually have a white background on Windows. +% See ISPC and COMPUTER. +if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) + set(hObject,'BackgroundColor','white'); +end + + +% --- Executes on selection change in listbox2_Sample2. +function listbox2_Sample2_Callback(hObject, eventdata, handles) +% hObject handle to listbox2_Sample2 (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) +sval = get(hObject,'Value'); +data = get(hObject,'UserData'); +data.valCond2 = sval; + +% Store data in UserData of slider +set(hObject,'UserData',data); +% Hints: contents = cellstr(get(hObject,'String')) returns listbox2_Sample2 contents as cell array +% contents{get(hObject,'Value')} returns selected item from listbox2_Sample2 + + +% --- Executes during object creation, after setting all properties. +function listbox2_Sample2_CreateFcn(hObject, eventdata, handles) +% hObject handle to listbox2_Sample2 (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles empty - handles not created until after all CreateFcns called + +% Hint: listbox controls usually have a white background on Windows. +% See ISPC and COMPUTER. +if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) + set(hObject,'BackgroundColor','white'); +end + + +% --- Executes on button press in pushbutton_CreatePlot. +function pushbutton_CreatePlot_Callback(hObject, eventdata, handles) + +data = get(handles.popupmenu1_Sample1,'UserData'); +currentvalSample1 = data.valDataSet1; + +data = get(handles.popupmenu2_Sample2,'UserData'); +currentvalSample2 = data.valDataSet2; + +data = get(handles.listbox1_Sample1,'UserData'); +currentvalCond1 = data.valCond1; + +data = get(handles.listbox2_Sample2,'UserData'); +currentvalCond2 = data.valCond2; + +[az,el] = view; + +ComparisonData3D(currentvalSample1,currentvalCond1,currentvalSample2,currentvalCond2,[az,el]) +% hObject handle to pushbutton_CreatePlot (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) diff --git a/GUI_AllData_CDX2Commitment/ConditionsPlot_GUI.fig b/GUI_AllData_CDX2Commitment/ConditionsPlot_GUI.fig new file mode 100644 index 0000000..40f2dd6 Binary files /dev/null and b/GUI_AllData_CDX2Commitment/ConditionsPlot_GUI.fig differ diff --git a/GUI_AllData_CDX2Commitment/ConditionsPlot_GUI.m b/GUI_AllData_CDX2Commitment/ConditionsPlot_GUI.m new file mode 100644 index 0000000..7402a9f --- /dev/null +++ b/GUI_AllData_CDX2Commitment/ConditionsPlot_GUI.m @@ -0,0 +1,203 @@ +function varargout = ConditionsPlot_GUI(varargin) +% CONDITIONSPLOT_GUI MATLAB code for ConditionsPlot_GUI.fig +% CONDITIONSPLOT_GUI, by itself, creates a new CONDITIONSPLOT_GUI or raises the existing +% singleton*. +% +% H = CONDITIONSPLOT_GUI returns the handle to a new CONDITIONSPLOT_GUI or the handle to +% the existing singleton*. +% +% CONDITIONSPLOT_GUI('CALLBACK',hObject,eventData,handles,...) calls the local +% function named CALLBACK in CONDITIONSPLOT_GUI.M with the given input arguments. +% +% CONDITIONSPLOT_GUI('Property','Value',...) creates a new CONDITIONSPLOT_GUI or raises the +% existing singleton*. Starting from the left, property value pairs are +% applied to the GUI before ConditionsPlot_GUI_OpeningFcn gets called. An +% unrecognized property name or invalid value makes property application +% stop. All inputs are passed to ConditionsPlot_GUI_OpeningFcn via varargin. +% +% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one +% instance to run (singleton)". +% +% See also: GUIDE, GUIDATA, GUIHANDLES + +% Edit the above text to modify the response to help ConditionsPlot_GUI + +% Last Modified by GUIDE v2.5 06-Jun-2018 15:11:19 + +% Begin initialization code - DO NOT EDIT +gui_Singleton = 1; +gui_State = struct('gui_Name', mfilename, ... + 'gui_Singleton', gui_Singleton, ... + 'gui_OpeningFcn', @ConditionsPlot_GUI_OpeningFcn, ... + 'gui_OutputFcn', @ConditionsPlot_GUI_OutputFcn, ... + 'gui_LayoutFcn', [] , ... + 'gui_Callback', []); +if nargin && ischar(varargin{1}) + gui_State.gui_Callback = str2func(varargin{1}); +end + +if nargout + [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); +else + gui_mainfcn(gui_State, varargin{:}); +end +% End initialization code - DO NOT EDIT + + +% --- Executes just before ConditionsPlot_GUI is made visible. +function ConditionsPlot_GUI_OpeningFcn(hObject, eventdata, handles, varargin) +% This function has no output args, see OutputFcn. +% hObject handle to figure +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) +% varargin command line arguments to ConditionsPlot_GUI (see VARARGIN) + +% Choose default command line output for ConditionsPlot_GUI +handles.output = hObject; + +% Choose data set +data = struct('valDataSet',1); +set(handles.popupmenu1,'UserData',data); + +% Choose Experimental Condition +data = struct('valCond',1); +set(handles.listbox_Conditions,'UserData',data); %Save the user data +set(handles.listbox_Conditions,'Value',1); %Show that the user data is that value + set(handles.listbox_Conditions,'String',{'BMP 1ng/ml 0-8h';'BMP 1ng/ml 0-16h';'BMP 1ng/ml 0-28h';'BMP 1ng/ml 0-48h';'BMP 10ng/ml 0-48h';'BMP 10ng/ml 0-28h';'BMP 10ng/ml 0-16h';'BMP 10ng/ml 0-8h'}); + +DataWellsPlot3D(1,1,[]) + +% Update handles structure +guidata(hObject, handles); + +% UIWAIT makes ConditionsPlot_GUI wait for user response (see UIRESUME) +% uiwait(handles.figure1); + + +% --- Outputs from this function are returned to the command line. +function varargout = ConditionsPlot_GUI_OutputFcn(hObject, eventdata, handles) +% varargout cell array for returning output args (see VARARGOUT); +% hObject handle to figure +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) + +% Get default command line output from handles structure +varargout{1} = handles.output; + + +% --- Executes on selection change in listbox_Conditions. +function listbox_Conditions_Callback(hObject, eventdata, handles) +% hObject handle to listbox_Conditions (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) +sval2 = get(hObject,'Value'); +data = get(hObject,'UserData'); +data.valCond = sval2; + +currentvaldataset = get(handles.popupmenu1,'Value'); + +[az,el] = view; +DataWellsPlot3D(currentvaldataset,sval2,[az,el]) + +% Hints: contents = cellstr(get(hObject,'String')) returns listbox_Conditions contents as cell array +% contents{get(hObject,'Value')} returns selected item from listbox_Conditions + + +% --- Executes during object creation, after setting all properties. +function listbox_Conditions_CreateFcn(hObject, eventdata, handles) +% hObject handle to listbox_Conditions (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles empty - handles not created until after all CreateFcns called + +% Hint: listbox controls usually have a white background on Windows. +% See ISPC and COMPUTER. +if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) + set(hObject,'BackgroundColor','white'); +end + + +% --- Executes on button press in pushbutton1_CreatePlot. +function pushbutton1_CreatePlot_Callback(hObject, eventdata, handles) +% hObject handle to pushbutton1_CreatePlot (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) + + +% -------------------------------------------------------------------- +function Untitled_1_Callback(hObject, eventdata, handles) +% hObject handle to Untitled_1 (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) + + +% --- Executes on selection change in popupmenu1. +function popupmenu1_Callback(hObject, eventdata, handles) +% hObject handle to popupmenu1 (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) +sval = get(hObject,'Value'); +data = get(hObject,'UserData'); +data.valDataSet = sval; + + +if sval == 1 + set(handles.listbox_Conditions,'String',{'BMP 1ng/ml 0-8h';'BMP 1ng/ml 0-16h';'BMP 1ng/ml 0-28h';'BMP 1ng/ml 0-48h';'BMP 10ng/ml 0-48h';'BMP 10ng/ml 0-28h';'BMP 10ng/ml 0-16h';'BMP 10ng/ml 0-8h'}); + set(handles.listbox_Conditions,'Value',1); + datacondition = struct('valCond',1); + set(handles.listbox_Conditions,'UserData',datacondition); + + [az,el] = view; + DataWellsPlot3D(sval,1,[az,el]) + +elseif sval == 2 + set(handles.listbox_Conditions,'String',{'BMP 1ng/ml 0-8h';'BMP 1ng/ml 0-16h';'BMP 1ng/ml 0-28h';'BMP 1ng/ml 0-48h';'BMP 10ng/ml 0-48h';'BMP 10ng/ml 0-28h';'BMP 10ng/ml 0-16h';'BMP 10ng/ml 0-8h'}); + set(handles.listbox_Conditions,'Value',1); + datacondition = struct('valCond',1); + set(handles.listbox_Conditions,'UserData',datacondition); + + [az,el] = view; + DataWellsPlot3D(sval,1,[az,el]) + +elseif sval == 3 + set(handles.listbox_Conditions,'String',{'Control';'BMP 1ng/ml 0-28h + SB';'BMP 1ng/ml 0-38h + SB';'BMP 1ng/ml 0-48h + SB';'BMP 10ng/ml 0-48h + SB';'BMP 10ng/ml 0-38h + SB';'BMP 10ng/ml 0-28h + SB';'SB'}); + set(handles.listbox_Conditions,'Value',1); + datacondition = struct('valCond',1); + set(handles.listbox_Conditions,'UserData',datacondition); + + [az,el] = view; + DataWellsPlot3D(sval,1,[az,el]) + +elseif sval == 4 + set(handles.listbox_Conditions,'String',{'Control';'BMP 0-24h';'BMP 0-8h';'BMP 0-24h';'BMP 0-24h';'BMP 0-28h';'BMP 0-32h';'BMP 0-40h'}); + set(handles.listbox_Conditions,'Value',1); + datacondition = struct('valCond',1); + set(handles.listbox_Conditions,'UserData',datacondition); + + [az,el] = view; + DataWellsPlot3D(sval,1,[az,el]) + +elseif sval == 5 + set(handles.listbox_Conditions,'String',{'Control';'BMP 0-4h';'BMP 0-8h';'BMP 0-16h';'BMP 0-24h';'BMP 0-32h';'BMP 0-40h';'BMP 0-48h'}); + set(handles.listbox_Conditions,'Value',1); + datacondition = struct('valCond',1); + set(handles.listbox_Conditions,'UserData',datacondition); + + [az,el] = view; + DataWellsPlot3D(sval,1,[az,el]) + +end +% Hints: contents = cellstr(get(hObject,'String')) returns popupmenu1 contents as cell array +% contents{get(hObject,'Value')} returns selected item from popupmenu1 + + +% --- Executes during object creation, after setting all properties. +function popupmenu1_CreateFcn(hObject, eventdata, handles) +% hObject handle to popupmenu1 (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles empty - handles not created until after all CreateFcns called + +% Hint: popupmenu controls usually have a white background on Windows. +% See ISPC and COMPUTER. +if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) + set(hObject,'BackgroundColor','white'); +end diff --git a/GUI_AllData_CDX2Commitment/DataWellsPlot3D.m b/GUI_AllData_CDX2Commitment/DataWellsPlot3D.m new file mode 100644 index 0000000..5cc5a7f --- /dev/null +++ b/GUI_AllData_CDX2Commitment/DataWellsPlot3D.m @@ -0,0 +1,71 @@ +function DataWellsPlot3D(PlateNumber,wellnumber,viewpoint) + +if PlateNumber == 1 + +load('AllDataMatrixDAPInorm_Plate1.mat') +NamesConditions = {'BMP 1ng/ml 0-8h','BMP 1ng/ml 0-16h','BMP 1ng/ml 0-28h','BMP 1ng/ml 0-48h','BMP 10ng/ml 0-48h','BMP 10ng/ml 0-28h','BMP 10ng/ml 0-16h','BMP 10ng/ml 0-8h'}; +colourclusters = {colorconvertorRGB([11,93,174]),colorconvertorRGB([206,61,21]),colorconvertorRGB([105,26,123]),colorconvertorRGB([230,165,26]),colorconvertorRGB([101,160,37])}; + +elseif PlateNumber == 2 + +load('AllDataMatrixDAPInorm_Plate2.mat') +NamesConditions = {'BMP 1ng/ml 0-8h','BMP 1ng/ml 0-16h','BMP 1ng/ml 0-28h','BMP 1ng/ml 0-48h','BMP 10ng/ml 0-48h','BMP 10ng/ml 0-28h','BMP 10ng/ml 0-16h','BMP 10ng/ml 0-8h'}; +colourclusters = {colorconvertorRGB([11,93,174]),colorconvertorRGB([206,61,21]),colorconvertorRGB([105,26,123]),colorconvertorRGB([230,165,26]),colorconvertorRGB([101,160,37])}; + +elseif PlateNumber == 3 + +load('AllDataMatrixDAPInorm_Plate3.mat') +NamesConditions = {'Control','BMP 1ng/ml 0-28h + SB','BMP 1ng/ml 0-38h + SB','BMP 1ng/ml 0-48h + SB','BMP 10ng/ml 0-48h + SB','BMP 10ng/ml 0-38h + SB','BMP 10ng/ml 0-28h + SB','SB'}; +colourclusters = {colorconvertorRGB([11,93,174]),colorconvertorRGB([206,61,21]),colorconvertorRGB([105,26,123]),colorconvertorRGB([230,165,26]),colorconvertorRGB([101,160,37])}; + +elseif PlateNumber == 4 + +load('AllDataMatrixDAPInorm_25.mat'); +NamesConditions = {'Control','BMP 0-4h','BMP 0-8h','BMP 0-16h','BMP 0-24h','BMP 0-32h','BMP 0-40h','BMP 0-48h'}; +colourclusters = {colorconvertorRGB([11,93,174]),colorconvertorRGB([206,61,21]),colorconvertorRGB([105,26,123]),colorconvertorRGB([230,165,26]),colorconvertorRGB([101,160,37])}; + +elseif PlateNumber == 5 + +load('AllDataMatrixDAPInorm_1stPlate.mat') +NamesConditions = {'Control','BMP 0-24h','BMP 0-8h','BMP 0-24h','BMP 0-24h','BMP 0-28h','BMP 0-32h','BMP 0-40h'}; +colourclusters = {colorconvertorRGB([11,93,174]),colorconvertorRGB([206,61,21]),colorconvertorRGB([105,26,123]),colorconvertorRGB([230,165,26]),colorconvertorRGB([101,160,37])}; + +end + +alphas = 0.05*ones(1,size(AllDataMatrixDAPInorm,2)); +alphas(wellnumber) = 0.5; + + +for wellnplot = 1:size(AllDataMatrixDAPInorm,2) + if wellnplot ~= wellnumber + scatter3(AllDataMatrixDAPInorm{wellnplot}(:,4),AllDataMatrixDAPInorm{wellnplot}(:,5),AllDataMatrixDAPInorm{wellnplot}(:,6),'filled','SizeData',30,'MarkerFaceColor',colourclusters{1},'MarkerFaceAlpha',0.05) + hold on + end +end +scatter3(AllDataMatrixDAPInorm{wellnumber}(:,4),AllDataMatrixDAPInorm{wellnumber}(:,5),AllDataMatrixDAPInorm{wellnumber}(:,6),'filled','SizeData',30,'MarkerFaceColor',colourclusters{2},'MarkerFaceAlpha',1) + +% corrcoef(AllDataMatrixDAPInorm{wellnumber}(:,4),AllDataMatrixDAPInorm{wellnumber}(:,6)) + +xlabel('CDX2') +ylabel('SOX2') +zlabel('BRA') +set(gca, 'LineWidth', 1); +fs = 11; +set(gca,'FontSize', fs) +set(gca,'FontWeight', 'bold') +set(gca,'TickLabelInterpreter','latex') +title(NamesConditions{wellnumber}) +% xlim([minnormValues(2),maxnormValues(2)]) +% ylim([minnormValues(3),maxnormValues(3)]) +% zlim([minnormValues(4),1]) + +xlim([0,2.5]) +ylim([0,3]) +zlim([0,1]) + +if isempty(viewpoint) + view(3) +else + view(viewpoint) +end +hold off diff --git a/GUI_AllData_CDX2Commitment/colorconvertorRGB.m b/GUI_AllData_CDX2Commitment/colorconvertorRGB.m new file mode 100644 index 0000000..7ae594d --- /dev/null +++ b/GUI_AllData_CDX2Commitment/colorconvertorRGB.m @@ -0,0 +1,3 @@ +function colormatlab=colorconvertorRGB(RGB) + +colormatlab=RGB./255;