Skip to content

Commit

Permalink
Restored initial version without data directory
Browse files Browse the repository at this point in the history
  • Loading branch information
CURTLab committed Mar 3, 2022
1 parent 4141953 commit 10f104e
Show file tree
Hide file tree
Showing 251 changed files with 303 additions and 1,210 deletions.
2 changes: 1 addition & 1 deletion source/A_control.m → A_control.m
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@

elseif task==18
clear('btn','button','task')
A_save_res_inter;
A_save_res;

elseif task==19
clear('btn','button','task')
Expand Down
File renamed without changes.
File renamed without changes.
27 changes: 27 additions & 0 deletions A_load_result.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
close all
clear
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
try
[pathname,dirname] = uigetfile('Res-*.mat');
fullpath = fullfile(dirname,pathname);
dirnamen=dirname;
load(fullpath);
testname=pathname;
dirname1=dirnamen;
dirname2=dirnamen;
exnameo1= strrep(exname1,'-','_');
exnameo2= strrep(exname2,'-','_');
fullpath1=[dirname1,exnameo1];
fullpath2=[dirname2,exnameo2];


msgbox('Current results are successfully loaded')
A_plot_data_label;
clear('fullpath','pathname','dirnamen','dirname')
clear('che','tekst')
clear('exnameo1','exnameo2')
catch
clc
msgbox('Fullpath is not correct. Please load new data')
A_start
end
4 changes: 2 additions & 2 deletions source/A_menu.m → A_menu.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
'IMPORT DATA from Excel',...
'EXIT'}; %task 20


clc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
options.Interpreter = 'latex';
options.Interpreter = 'tex';
figure(2000)
whitebg([0,0,50]/255) % background color
close figure 2000
Expand Down
13 changes: 4 additions & 9 deletions source/A_plot_data_label.m → A_plot_data_label.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@
A_start;
end

if exist('para_nr','var')==1
tt=num2str(para_nr);
else
tt='new pair';
end




if exist('dat2','var')==1
Expand All @@ -32,12 +29,10 @@
'Colormap' ,[], ...
'MenuBar' ,'none',...
'ToolBar' ,'none', ...
'Position',[scrsz(3)/5 scrsz(4)/1.25 scrsz(4)/0.8 scrsz(4)/7.25]);
'Position',[scrsz(3)/5 scrsz(4)/1.18 scrsz(4)/0.8 scrsz(4)/10.25]);
whitebg(get(gcf,'color'));
text(0.01,0.75,['Sample 1: ',exname1,': ',num2str(N1),' points'],'Fontsize',12,'Fontweight','bold')
text(0.01,0.45,['Sample 2: ',exname2,': ',num2str(N2),' points'],'Fontsize',12,'Fontweight','bold')
text(0.01,0.18,['Number of pair : ',tt],'Fontsize',12,'Fontweight','bold')

text(0.01,0.35,['Sample 2: ',exname2,': ',num2str(N2),' points'],'Fontsize',12,'Fontweight','bold')
ax = gca;


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions source/A_random_generator_neu.m → A_random_generator_neu.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

sigma_factor=3.0;
poiss_factor=1.0;
stop_random_noise;
min_element=15;
poiss_met=1;
norm_pdf1=0;

Expand Down Expand Up @@ -164,12 +164,12 @@
UK=UK-KL;

if UK>0
stop_random_noise;
urr=[];
for kk=1:UK
if noi==1
urr(kk,:) = mddd+deltaddd.*rand(1,3);
elseif noi==0

urr(kk,:) = mddd+deltaddd.*0;
end
end
Expand Down Expand Up @@ -228,6 +228,7 @@




clear('Zori','cluster_main','SYR','Mddd','mddd', 'rrr','size_rys',...
'deltaddd', 'nnn', 'nn00', 'de', 'sss', 'dd00','ktrys','Nmaxor',...
'ep' ,'KL','wu', 'r00', 'muhat','sigmahat','UK', 'urr', 'kk', 'i', 'k', 'j','clind','ii','ktrys',...
Expand Down
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions source/A_save_res.m → A_save_res.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@
elseif contains(exname1,'blue')==1
te1=['blue',extractAfter(exname1,'blue')];
else
te1=exname1(1:3);
te1='';
end
if contains(exname2,'red')==1
te2=['red',extractAfter(exname2,'red')];
elseif contains(exname2,'blue')==1
te2=['blue',extractAfter(exname2,'blue')];
else
te2=exname2(1:3);
te2='';
end
answer_pair_nr;
if strcmp(te1,te2)==0
te = [num2str(para_nr),'-',te1,'-',te2] ;
else
Expand Down
18 changes: 9 additions & 9 deletions source/A_start.m → A_start.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


%CALM Version 4.2 (2-sample Comparative Analysis of 3D Localisation Microscopy data)
%CALM Version 2.1 (2-sample Comparative Analysis of 3D Localisation Microscopy data)
%is an analysis pipeline, which organizes localisation microscopy data into
%clusters of different dimensions and calculated the samples’ statistical parameters
%using various numerical methods.
Expand Down Expand Up @@ -45,26 +45,26 @@
% This code may be freely used and distributed, so long as it maintains this copyright line



clc
try
close(hh)
clear('hh')
catch
clear('hh')
end

%try
try
A_menu;
A_control
clear('task')
A_start;
%catch
%clc
% disp('The program was aborted by the user')
% pause(0.01)
% user_stops;
catch
clc
disp('The program was aborted by the user')
pause(0.01)
user_stops;

% end
end



Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 15 additions & 11 deletions CALM.m
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
%CALM Version 4.2 (2-sample Comparative Analysis of 3D Localisation Microscopy data)


%CALM Version 2.1 (2-sample Comparative Analysis of 3D Localisation Microscopy data)
%is an analysis pipeline, which organizes localisation microscopy data into
%clusters of different dimensions and calculated the samples’ statistical parameters
%using various numerical methods.
%
% CALM Version 4.2 is the prototype software platform that allows a comparative analysis of
% CALM Version 2.1 is the prototype software platform that allows a comparative analysis of
% 3D localisation microscopy data representing protein distributions in two biological samples.
% The platform contains published functions (see comments in the function)
% as well as many own functions and scripts (without comments).
Expand Down Expand Up @@ -37,21 +39,23 @@
% In the absence of these columns they will be automatically generated
% with default values typical for this type of nanoscopic samples.
%
% Copyright 2018 - 2021 Jaroslaw Jacak,
%
%
% Copyright 2018 Jaroslaw Jacak,
% Medical Engineering Dept. Upper Austria University od Applied Sciences, Linz, Austria
% This code may be freely used and distributed, so long as it maintains this copyright line

addpath('source')

Figure_start;
clear('scrsz','T')
try
A_start;
catch
clc

Figure_start;
clear('scrsz','T')
try
A_start;
catch
clc
disp('The program was aborted by the user')
%user_stops
end
end



Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 3 additions & 4 deletions source/DBSCAN_neu.m → DBSCAN_neu.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
%
% alpha coefficient for neighborhood radius(=1)
% NP number of neighbors (min 5)
% NPP neigbors number for neighbors (min 4)
% NPP neifgbors number for neighbors (min 4)
% pos, points in original order
% N Number of points

%%%%%%%%%%%%%%%%%%%%%%% data init %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Expand All @@ -22,15 +21,15 @@
%disp('Primary cluster generation. Please wait a few minutes')


NRAD=alpha*avg_min_dist ; %%% minimal raius of neighborhood
NRAD=alpha*avg_min_dist ; %%% minimal raius oh neighborhood
cl(1:N,1)=0; % cluster
al(1:N,1)=0; % analyse marker
C=0;
%tic

%%%%%%%%%%%%%%%%%%%% primary cluster finding %%%%%%%%%%%%%%%%%%%%%%%%%%%%

%kontr=round(0.1*N); % current cluster number
%kontr=3000; % current cluster number
%jab=1;

for i=1:N
Expand Down
6 changes: 2 additions & 4 deletions source/Data_Load_1.m → Data_Load_1.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@
close all
clear
%%%%%%%%%%%%%%%%%%%%%%%%% open file %%%%%%%%%%%%%%%%%%%%%%%%%%%
[pathname,dirname] = uigetfile('../*.mat');
[pathname,dirname] = uigetfile('*.mat');
fullpath = fullfile(dirname,pathname);
fullpath1=fullpath;
dirname1=dirname;
pathname1=pathname;

load(fullpath);
exname=pathname;

exname = strrep(exname,'_','-');
exname1 = strrep(exname,'.mat','');


clear('fullpath','datacell','dirname', 'pathname')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
data_test= exist('par','var');
Expand Down
File renamed without changes.
4 changes: 1 addition & 3 deletions source/Data_Load_2.m → Data_Load_2.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@


%%%%%%%%%%%%%%%%%%%%%%%%% open file %%%%%%%%%%%%%%%%%%%%%%%%%%%
[pathname,dirname] = uigetfile('../*.mat');
[pathname,dirname] = uigetfile('*.mat');
fullpath = fullfile(dirname,pathname);
fullpath2=fullpath;
dirname2=dirname;
pathname2=pathname;

load(fullpath);
exname=pathname;
exname = strrep(exname,'_','-');
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion source/E_read.m → E_read.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
clear
%%%%%%%%%%%%%%%%%%%%%%%%% open file %%%%%%%%%%%%%%%%%%%%%%%%%%%
try
[pathname,dirname] = uigetfile('..\*.x*');
[pathname,dirname] = uigetfile('*.x*');
fullpath = fullfile(dirname,pathname);
par= importdata(fullpath);
catch
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions source/Figure_start.m → Figure_start.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
figure ( 'WindowStyle', 'normal', ...
'Visible' ,'on', ...
'NumberTitle' ,'off', ...
'Name' ,'2CALM V4.1', ...
'Resize' ,'on', ...
'Name' ,'2CALM V2', ...
'Resize' ,'off', ...
'Colormap' ,[], ...
'MenuBar' ,'none',...
'ToolBar' ,'none',...
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
55 changes: 34 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,47 @@
# 2CALM

CALM Version 4.2 (2-sample Comparative Analysis of 3D Localisation Microscopy data) is an analysis pipeline, which organizes localisation microscopy data into clusters of different dimensions and calculated the samples’ statistical parameters using various numerical methods.

CALM Version 4.2 is the prototype software platform that allows a comparative analysis of 3D localisation microscopy data representing e.g. protein distributions in two biological samples. The CALM 4.2 system includes a collection of functions and scripts for handling individual menu items. The system should be unpacked together with the main CALM 4.2 directory and subdirectories (the subdirectories can be freely extended, e.g. for individual experiments).

The system starts in the Matlab (min Version R2018) with the `CALM.m` command.

In this prototype system, the input data structure is limited to specified matlab format. Data set must be of type structure array named `par`. The structure must contain the fields:
* `par.pkmatrix` – array of numerical data with row-measurements and columns- data coordinates.
* `par.pkdesc` - contains two cells par.pkdesc.desc, and par.pkdesc.units:
* `par.pkdesc.desc` - gives a description of the pkmatrix-columns line
* with at least the following string variables: `frame`; `x`; `y`; `z`; `pa`; `paz`; `intensity` where `pa` is the position accuracy of xy localization and `paz` is position accuracy of localization on z-axis. `frame` is frame number.
* par.pkdesc.units contains a description of the units of measure for each column in string format.
CALM Version 2.1 (2-sample Comparative Analysis of 3D Localisation Microscopy data)
is an analysis pipeline, which organizes localisation microscopy data into
clusters of different dimensions and calculated the samples’ statistical parameters
using various numerical methods.

CALM Version 2.1 is the prototype software platform that allows a comparative analysis of
3D localisation microscopy data representing protein distributions in two biological samples.
The platform contains published functions (see comments in the function)
as well as many own functions and scripts (without comments).

In this prototype system, the input data structure is limited to specified matlab format.
Data set must be of type structure array named "par". The structure must contain
the fields:
par.pkmatrix – array of numerical data with row-measurements and
columns- data coordinates.
par.pkdesc - contains two cells par.pkdesc.desc, and par.pkdesc.units:
par.pkdesc.desc - gives a description of the pkmatrix-columns line
with at least the following string variables:
"frame"; "x"; "y"; "z"; "pa"; "paz"; "intensity" where "pa" is the position accuracy
of xy localization and
"paz"
is position accuracy of localization on z-axis. "frame" is frame number.
par.pkdesc.units contains a description of the units of measure
for each column in string format.

## IMPORT DATA FROM EXCEL
IMPORT DATA FROM EXCEL
In order to enable analysis of data in another format, the system has an interface to Excel
that imports and transfers Excel data to the Matlab format described above.
Excel data spreadsheet must be column-oriented and must have at least 3 columns
(3D point localizations) with column headers `x`, `y`, `z`.
If possible, the following additional columns should contain:
* position accuracy (in nm) in xy with header `pa`
* position accuracy (in nm) along the axis z with header `paz`
* intensity of the point with the header `intensity`
* the frame number with the `frame` header
(3D point localizations) with column headers "x", "y", "z".
If possible, the following additional columns should contain :
- position accuracy (in nm) in xy with header "pa",
- position accuracy (in nm) along the axis z with header "paz",
- intensity of the point with the header "intensity",
- and the frame number with the "frame" header.

In the absence of these columns they will be automatically generated with default values typical for this type of nanoscopic samples.
In the absence of these columns they will be automatically generated
with default values typical for this type of nanoscopic samples.


# License
Copyright 2018 - 2021 Jaroslaw Jacak,
Copyright 2018 - 2020 Jaroslaw Jacak,
Medical Engineering Dept. Upper Austria University od Applied Sciences, Linz, Austria
This code may be freely used and distributed, so long as it maintains this copyright line

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 5 additions & 2 deletions source/RipleysK3D.m → RipleysK3D.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
genau=1;
% genau=0 volumen of sample as vol bounding box
% genau=1 volumen of sample as vol convexhull

if nargin<4
method=1;
end
Expand Down Expand Up @@ -68,9 +67,13 @@
else
lambda = N/((box(2)-box(1))*(box(4)-box(3))*(box(6)-box(5)));
end
lambda=1;
K = K/lambda;






end


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 10f104e

Please sign in to comment.