Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Micro-Manager support #16

Merged
merged 9 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified POLCAM-SR/POLCAM-SR.mlappinstall
Binary file not shown.
12 changes: 6 additions & 6 deletions POLCAM-SR/POLCAM-SR.prj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<deployment-project plugin="plugin.apptool" plugin-version="1.0">
<configuration build-checksum="4047185125" file="/Users/ezrabruggeman/Documents/GitHub/POLCAM-SR/POLCAM-SR/POLCAM-SR.prj" location="/Users/ezrabruggeman/Documents/GitHub/POLCAM-SR/POLCAM-SR" name="POLCAM-SR" target="target.mlapps" target-name="Package App">
<configuration build-checksum="593887742" file="/Users/ezrabruggeman/Documents/GitHub/POLCAM-SR/POLCAM-SR/POLCAM-SR.prj" location="/Users/ezrabruggeman/Documents/GitHub/POLCAM-SR/POLCAM-SR" name="POLCAM-SR" target="target.mlapps" target-name="Package App">
<param.appname>POLCAM-SR</param.appname>
<param.authnamewatermark>Ezra Bruggeman</param.authnamewatermark>
<param.email>eb758@cam.ac.uk</param.email>
Expand All @@ -11,9 +11,9 @@
<file>${PROJECT_ROOT}/POLCAM-SR_resources/icon_16.png</file>
</param.icons>
<param.summary>Application to process single-molecule and diffraction-limited polarisation camera image data</param.summary>
<param.description />
<param.screenshot>/private/var/folders/6j/9pmd1ms95nn1t7d0_vmbff240000gn/T/tpf8aa7ce1_c2fb_44b5_a603_61d43a037f70.png</param.screenshot>
<param.version>1.2</param.version>
<param.description>Process single-molecule and diffraction-limited polarisation camera data</param.description>
<param.screenshot>/private/var/folders/6j/9pmd1ms95nn1t7d0_vmbff240000gn/T/tp5fcb071b_fce0_4f70_936f_97e7dfa348c7.png</param.screenshot>
<param.version>1.1.1</param.version>
<param.products.name />
<param.products.id />
<param.products.version />
Expand All @@ -24,7 +24,6 @@
<param.authnamewatermark />
<param.email />
<param.company />
<param.description />
<param.products.name />
<param.products.id />
<param.products.version />
Expand Down Expand Up @@ -56,7 +55,8 @@
<file>${PROJECT_ROOT}/lib/+Utils/getAverageIntensityProjectionFromPath.m</file>
<file>${PROJECT_ROOT}/lib/+Utils/getMaximumIntensityProjectionFromPath.m</file>
<file>${PROJECT_ROOT}/lib/+Utils/getMinimumIntensityProjectionFromPath.m</file>
<file>${PROJECT_ROOT}/lib/+Utils/getOrderedImageFilelist.m</file>
<file>${PROJECT_ROOT}/lib/+Utils/getOrderedImageFilelist_MicroManager.m</file>
<file>${PROJECT_ROOT}/lib/+Utils/getOrderedImageFilelist_ThorCam.m</file>
<file>${PROJECT_ROOT}/lib/+Utils/getSumIntensityProjectionFromPath.m</file>
<file>${PROJECT_ROOT}/lib/+Utils/readJsonFile.m</file>
<file>${PROJECT_ROOT}/lib/+Utils/readTiffStack.m</file>
Expand Down
Binary file modified POLCAM-SR/POLCAM_SR.mlapp
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"pathLastImg": "/Users/ezrabruggeman/Documents/GitHub/POLCAM-SR/POLCAM-SR/docs/samples/fibrils/",
"pathLastImg": "/Users/ezrabruggeman/Desktop/test TC",
"pathLastLocs": "/Users/ezrabruggeman/Documents/GitHub/POLCAM-SR/POLCAM-SR/docs/samples/fibrils/"
}
12,470 changes: 0 additions & 12,470 deletions POLCAM-SR/docs/samples/fibrils/fibrils_NileRed_50ms_4_results_localisations.txt

This file was deleted.

29 changes: 0 additions & 29 deletions POLCAM-SR/lib/+Utils/getOrderedImageFilelist.m

This file was deleted.

35 changes: 35 additions & 0 deletions POLCAM-SR/lib/+Utils/getOrderedImageFilelist_MicroManager.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
function filelist = getOrderedImageFilelist_MicroManager(directory)

% get list of all files with tif extension
filelist_tif = dir(fullfile(directory,'*_MMStack_Default.ome.tif'));

% remove files that start with '.' (sometimes there are hidden files on mac)
filelist_tif = filelist_tif(~startsWith({filelist_tif.name},'.'));

if isempty(filelist_tif)
filelist = 0;
else
% sort files in ascending order
filelist_tif = struct2table(filelist_tif);
filelist_tif = sortrows(filelist_tif,'name','ascend');

% format for POLCAM-SR
filelist = struct;
for i=1:height(filelist_tif)
[~,baseName_img,~] = fileparts(filelist_tif.name(i));
filelist(i).filepath = char(fullfile(directory,filelist_tif.name(i)));
filelist(i).baseName = extractBefore(baseName_img,'_MMStack_Default.ome');

% find position of underscores '_' in filename
indeces_underscore = strfind(filelist(i).baseName,'_');
% get the index of the last underscore
index_last_underscore = indeces_underscore(end);
% extract the number after the last underscore
filelist(i).id = str2double(filelist(i).baseName(index_last_underscore+1:end));
end
% sort filenames based on suffix to get correct frame numbers
[~,idx] = sort([filelist.id]);
filelist = filelist(idx);
end

end
29 changes: 29 additions & 0 deletions POLCAM-SR/lib/+Utils/getOrderedImageFilelist_ThorCam.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
function filelist = getOrderedImageFilelist_ThorCam(directory)

% get list of all files with tif extension
filelist_tif = dir(fullfile(directory,'*.tif'));

% remove files that start with '.' (sometimes there are hidden files on mac)
filelist_tif = filelist_tif(~startsWith({filelist_tif.name},'.'));

if isempty(filelist_tif)
filelist = 0;
else
filelist = struct;
for i=1:length(filelist_tif)
[~,baseName_img,~] = fileparts(filelist_tif(i).name);
filelist(i).filepath = fullfile(directory,filelist_tif(i).name);
filelist(i).baseName = baseName_img;

% find position of underscores '_' in filename
indeces_underscore = strfind(filelist(i).baseName,'_');
% get the index of the last underscore
index_last_underscore = indeces_underscore(end);
filelist(i).id = str2double(filelist(i).baseName(index_last_underscore+1:end));
end
% sort filenames based on suffix to get correct frame numbers
[~,idx] = sort([filelist.id]);
filelist = filelist(idx);
end

end
45 changes: 45 additions & 0 deletions POLCAM-SR/lib/dev/test_uManager_ordered_filelist.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

close all
clear all
clc

directory = '/Users/ezrabruggeman/Desktop/test MM';


%%

% get list of all files with tif extension
filelist_tif = dir(fullfile(directory,'*_MMStack_Default.ome.tif'));

% remove files that start with '.' (sometimes there are hidden files on mac)
filelist_tif = filelist_tif(~startsWith({filelist_tif.name},'.'));

if isempty(filelist_tif)
filelist = 0;
else
% sort files in ascending order
filelist_tif = struct2table(filelist_tif);
filelist_tif = sortrows(filelist_tif,'name','ascend');

% format for POLCAM-SR
filelist = struct;
for i=1:height(filelist_tif)
[~,baseName_img,~] = fileparts(filelist_tif.name(i));
filelist(i).filepath = char(fullfile(directory,filelist_tif.name(i)));
filelist(i).baseName = extractBefore(baseName_img,'_MMStack_Default.ome');
end

% sort filenames based on suffix to get correct frame numbers (ASSUMES THORCAM INDEXING)
for i=1:length(filelist)
% find position of underscores '_' in filename
indeces_underscore = strfind(filelist(i).baseName,'_');
% get the index of the last underscore
index_last_underscore = indeces_underscore(end);
% extract the number after the last underscore
filelist(i).id = str2double(filelist(i).baseName(index_last_underscore+1:end));
end
[~,idx] = sort([filelist.id]);
filelist = filelist(idx);
end


Binary file not shown.
Binary file modified POLCAM-SR/plugins/Plugin_batchProcessing.mlapp
Binary file not shown.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Software for processing single-molecule and diffraction limited polarisation camera image data.

The POLCAM-SR software is described in our [bioRxiv preprint](https://doi.org/10.1101/2023.02.07.527479). Documentation can be found on the [POLCAM website](https://theleelab.github.io/POLCAM-site/software_polcam_sr).

## Requirements

Expand All @@ -21,3 +22,13 @@ You can install `POLCAM-SR` as a MATLAB plugin. [Click here](https://github.com/
## Issues

If you encounter any problems, please [file an issue](https://github.com/ezrabru/POLCAM-SR/issues) along with a detailed description.
Please also do not hesitate to contact us at eb758@cam.ac.uk with any questions about the installation and/or use of the software.

## Citing POLCAM-SR

If you use POLCAM-SR in your research, please cite our preprint describing the software.

E. Bruggeman, O. Zhang, L-M. Needham, M. Körbel, S. Daly, M. Cheetham, R. Peters, T. Wu, A.S. Klymchenko, S.J. Davis , E.K. Paluch , D. Klenerman , M.D. Lew , K. O’Holleran and S.F. Lee <br>
POLCAM: Instant molecular orientation microscopy for the life sciences <br>
bioRxiv (2023). https://doi.org/10.1101/2023.02.07.527479