Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
9273f3d
ND2 ->Brock Code->Baxter
BrockFletcher Dec 31, 2021
280a168
3D Flow-Cytometry Like Plot
BrockFletcher Jan 2, 2022
7db564d
Analyze Data
BrockFletcher Jan 5, 2022
4015205
Big Mess of Changes
BrockFletcher Jan 19, 2022
6415c8c
Write Test Run Changes
BrockFletcher Jan 25, 2022
e57c9fd
Merge branch 'klasma:master' into Brock_Import
BrockFletcher Jan 30, 2022
9426dd2
Update m_Bronk_2022_01_06_for11_15_assay.m
mikeydubs153 Jan 30, 2022
c1e5540
Add files via upload
VascoSingh Feb 1, 2022
3f3b545
2022-02-04
BrockFletcher Feb 4, 2022
62943ae
2022-02-04
BrockFletcher Feb 5, 2022
877f1fe
Fixed to actually run
BrockFletcher Feb 9, 2022
712d2e6
Slightly debugged version of main analysis code and unfinished GUI
sarahreilly Feb 9, 2022
6354871
Major Improvements based on DataScientists Conversation
BrockFletcher Feb 9, 2022
ee33907
Gal8 Simplification
BrockFletcher Feb 9, 2022
cf08475
Working Towards Universalization
BrockFletcher Feb 9, 2022
424c3f7
Ready for GUI!
BrockFletcher Feb 10, 2022
05c9816
Tuned Nuc and Gal Values
BrockFletcher Feb 10, 2022
172f165
Started Adding More Features
BrockFletcher Feb 12, 2022
861c8a3
Use Cyt to correct Nuc
BrockFletcher Feb 15, 2022
4b920ae
Cell-Level Data
BrockFletcher Feb 15, 2022
296ce83
Mask Only
BrockFletcher Feb 15, 2022
b8c89e6
Update1
BrockFletcher Feb 15, 2022
9bddb62
BaxPrepStrategy
BrockFletcher Feb 16, 2022
3e1e793
Par and Running for Baxter Import
BrockFletcher Feb 16, 2022
e5f4e76
ParameterSetting for Analysis
BrockFletcher Feb 17, 2022
4d3c183
Create m_BF_DBAnalysis copy.m
sarahreilly Mar 1, 2022
cd1f3e5
Almost Working GUI
sarahreilly Mar 1, 2022
784ce02
Create BronkOpeningWindow.mlapp
sarahreilly Mar 1, 2022
915064f
Preparations for GUI-Par andStructNaming
BrockFletcher Mar 2, 2022
866fd2b
Added a table to the GUI for selecting functions to run and correspon…
sarahreilly Mar 15, 2022
7b1774f
Random STuff
BrockFletcher Mar 15, 2022
d1c204c
Almost working GUI
sarahreilly Mar 29, 2022
9b20b23
Delete RunLog\backup_2022-03-22-03-23-35.m
BrockFletcher Mar 29, 2022
bece088
Delete RunLog\backup_2022-03-22-11-19-22.m
BrockFletcher Mar 29, 2022
49942de
Delete RunLog\backup_2022-03-22-11-19-23.m
BrockFletcher Mar 29, 2022
242f1f4
Merge branch 'SingleParticleIdea' of https://github.com/BrockFletcher…
BrockFletcher Mar 29, 2022
f3da86c
Updated GUI
sarahreilly Apr 5, 2022
cceb809
Code for histology experiment analysis and updated GUI
sarahreilly Apr 19, 2022
ef7792a
Code for Research for Credit Analysis Project
sarahreilly Apr 24, 2022
5f9b7fe
Update Sarah_Michael_Analysis_4_22_2022.m
sarahreilly Apr 24, 2022
945871e
Test
BrockFletcher Apr 24, 2022
3763906
Merging
BrockFletcher Apr 24, 2022
77f1aac
a
BrockFletcher Apr 24, 2022
6f70c28
Ready to Run
BrockFletcher Apr 25, 2022
98af2be
Version 0.9 Completed
BrockFletcher Apr 25, 2022
cbadbfe
V0.9 Slight Bug Fixes
BrockFletcher Apr 25, 2022
7b62b89
Parameters
BrockFletcher Apr 25, 2022
fbb64b8
V0.9.1
BrockFletcher Apr 27, 2022
ccf7a93
V0.9.1.0.1
BrockFletcher Apr 27, 2022
09290c4
V0.9.1.0.2
BrockFletcher Apr 27, 2022
94e17be
MinorBug Fix
BrockFletcher May 4, 2022
a1ebb5c
Create BF22_05_04_Gal8_IBKDoseResponseReanalysis.m
BrockFletcher May 16, 2022
e574ec3
Added Single-Region Level Analysis
BrockFletcher May 18, 2022
b331b66
TestingForIsomData
BrockFletcher May 23, 2022
e183acb
update .gitignore
BrockFletcher May 23, 2022
2822458
Cleanup
BrockFletcher May 23, 2022
caadbc0
Start of VS_Functions
VascoSingh Jun 13, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ variables.mat

# System files on Mac.
*.DS_Store
BF_Functions/2022-05-16-IBK-Gal8/matlab.mat
16 changes: 16 additions & 0 deletions Ai9DetermineCutoff.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Area=squeeze(Data(:,:,1,:));
Tomato=squeeze(Data(:,:,2,:));
TooLow=~(Tomato>0.1);
Area2=Area;
Tomato2=Tomato;
Area2(TooLow) =[NaN];
Tomato2(TooLow)=[NaN];
%
TotArea=sum(Area2,'omitnan');
AvTomato=(Tomato2);
figure, plot3(1:384,Area2,Tomato2,'o')
grid on
% % Area=sum(squeeze(Data(:,:,1,:)),'omitnan');
% % AvTomato=mean(squeeze(Data(:,:,2,:)),'omitnan');
% figure, plot3(1:384,Area,AvTomato,'o')
% grid on
2 changes: 2 additions & 0 deletions Analysis/CellAnalysis/Plot_Fluorescence.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ function Plot_Fluorescence(aCells, aAxes, aChannel, varargin)
fluor = c.regionProps.(['FluorMax' aChannel]);
case 'avg'
fluor = c.regionProps.(['FluorAvg' aChannel]);
case 'test'
fluor = c.regionProps.(['FluorAvg' aChannel]);
case 'tot'
fluor = c.regionProps.(['FluorTot' aChannel]);
if strcmpi(aYUnit, 'microns')
Expand Down
155 changes: 155 additions & 0 deletions Analysis/CellAnalysis/Plot_Fluorescence3D.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
function Plot_Fluorescence(aCells, aAxes, aChannel,aChannel2,Color, varargin)
% Plots the fluorescence intensity of cells over time.
%
% The function can be used to plot the maximum intensity, the average
% intensity or the integrated intensity. The function only works for cells
% that come from the same image sequence. The function can only be used on
% tracking results where there is a fluorescent channel. The function is
% meant to be called by CellAnalysisPlayer. The function will only show up
% in the CellAnalysisPlayer GUI if the dataset has one or more
% fluorescence channels. The function PrintStyle is called to make the
% plotting style consistent with other plots.
%
% Inputs:
% aCells - Cells for which the fluorescence will be plotted.
% aAxes - Axes object to plot the data in.
% aChannel - The name of the fluorescence channel to be plotted.
%
% Property/Value inputs:
% XUnit - The time unit used on the x-axis. The options are 'frames' and
% 'hours', and the default is 'hours'.
% YUnit - The length unit used to compute the integrated intensity. The
% options are 'pixels' and 'microns'. For 2D datasets, the
% resulting units on the y-axis are intensity * pixels and
% intensity * square microns respectively. For 3D datasets, the
% units are intensity * voxels or intensity * cubic microns. The
% default is 'microns'. Note that this input has an effect only if
% Metric is 'tot'.
% Metric - What parameter of the fluorescence to plot. The options are
% 'max', 'avg', and 'tot', and they correspond to the maximum,
% average, and the integrated fluorescence over the cell area. The
% default is 'max'.
%
% See also:
% CellAnalysisPlayer, Plot_AxisRatio, Plot_CellSize, Plot_LinageTree,
% Plot_TotalDistance, PrintStyle

% Get property/value inputs.
[aXUnit, aYUnit, aMetric1] = GetArgs(...
{'XUnit', 'YUnit', 'Metric'},...
{'hours', 'microns', 'max'},...
true, varargin);

% Clear the previous plot.
% cla(aAxes)
% hold(aAxes, 'off')

if isempty(aCells)
return
end
imData = aCells(1).imageData;
% BronkBox=cell(length(cells2),max([cells2.stopT]));
for i = 1:length(aCells)
c = aCells(i);
% Time (x-coordinates of plot).
% switch aXUnit
% case 'hours'
% t = imData.FrameToT(c.firstFrame : c.lastFrame);
% case 'frames'
% t = c.firstFrame : c.lastFrame;
% end
t=1;
% Fluorescence (y-coordinates of plot).
aMetric1= 'avg';
switch lower(aMetric1)
case 'max'
fluor = c.regionProps.(['FluorMax' aChannel]);
case 'avg'
fluor = c.regionProps.(['FluorAvg' aChannel]);
case 'test'
fluor = c.regionProps.(['FluorAvg' aChannel]);
case 'tot'
fluor = c.regionProps.(['FluorTot' aChannel]);
if strcmpi(aYUnit, 'microns')
if imData.GetDim() == 2
fluor = imData.Pixel2ToMicroM2(fluor);
else
fluor = imData.VoxelToMicroM3(fluor);
end
end
end
aMetric2= 'tot';
% Fluorescence (z-coordinates of plot).
switch lower(aMetric2)
case 'max'
fluor2 = c.regionProps.(['FluorMax' aChannel2]);
case 'avg'
fluor2 = c.regionProps.(['FluorAvg' aChannel2]);
case 'test'
fluor2 = c.regionProps.(['FluorAvg' aChannel2]);
case 'tot'
fluor2 = c.regionProps.(['FluorTot' aChannel2]);
if strcmpi(aYUnit, 'microns')
if imData.GetDim() == 2
fluor2 = imData.Pixel2ToMicroM2(fluor2);
else
fluor2 = imData.VoxelToMicroM3(fluor2);
end
end
end
% Plot the fluorescence over time for one cell.
Color=Color;
Color2=Color+0.4*((i-1)/length(aCells));
Color2(Color2>1)=1;
Color2(Color2<0)=1;
PlotWithNan3D(aAxes, t, fluor,fluor2,'color',Color2,...
'LineWidth', 2);
% alpha(.5);
hold(aAxes, 'on')
% testing=Color;
end

% Set the limits of the plot.
SetYLimits(aAxes)
xlim(aAxes, imData.GetTLim(aXUnit, 'Margins', [0.01 0.01]))

% x-label.
switch lower(aXUnit)
case 'frames'
xlabel(aAxes, 'Time (frames)')
case 'hours'
xlabel(aAxes, 'Time (hours)')
end

% y-label and title.
switch lower(aMetric1)
case 'max'
title(aAxes, sprintf('Maximum fluorescence (%s)',...
SpecChar(imData.GetSeqDir(), 'matlab')))
ylabel(aAxes, 'Fluorescence (relative to max)')
case 'avg'
title(aAxes, sprintf('Average fluorescence (%s)',...
SpecChar(imData.GetSeqDir(), 'matlab')))
ylabel(aAxes, 'Fluorescence (relative to max)')
case 'tot'
title(aAxes, sprintf('Integrated fluorescence (%s)',...
SpecChar(imData.GetSeqDir(), 'matlab')))
if imData.GetDim() == 2
switch aYUnit
case 'pixels'
ylabel(aAxes, 'Fluorescence (relative to max) * Area in pixels')
case 'microns'
ylabel(aAxes, 'Fluorescence (relative to max) * Area in \mum^2')
end
else
switch aYUnit
case 'pixels'
ylabel(aAxes, 'Fluorescence (relative to max) * Volume in voxels')
case 'microns'
ylabel(aAxes, 'Fluorescence (relative to max) * Volume in \mum^3')
end
end
end

PrintStyle(aAxes)
end
157 changes: 157 additions & 0 deletions Analysis/CellAnalysis/Plot_Fluorescence3D_2.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
function Plot_Fluorescence3D_2(aCells, aAxes, aChannel,aChannel2,Color,x_in, varargin)
% Plots the fluorescence intensity of cells over time.
%
% The function can be used to plot the maximum intensity, the average
% intensity or the integrated intensity. The function only works for cells
% that come from the same image sequence. The function can only be used on
% tracking results where there is a fluorescent channel. The function is
% meant to be called by CellAnalysisPlayer. The function will only show up
% in the CellAnalysisPlayer GUI if the dataset has one or more
% fluorescence channels. The function PrintStyle is called to make the
% plotting style consistent with other plots.
%
% Inputs:
% aCells - Cells for which the fluorescence will be plotted.
% aAxes - Axes object to plot the data in.
% aChannel - The name of the fluorescence channel to be plotted.
%
% Property/Value inputs:
% XUnit - The time unit used on the x-axis. The options are 'frames' and
% 'hours', and the default is 'hours'.
% YUnit - The length unit used to compute the integrated intensity. The
% options are 'pixels' and 'microns'. For 2D datasets, the
% resulting units on the y-axis are intensity * pixels and
% intensity * square microns respectively. For 3D datasets, the
% units are intensity * voxels or intensity * cubic microns. The
% default is 'microns'. Note that this input has an effect only if
% Metric is 'tot'.
% Metric - What parameter of the fluorescence to plot. The options are
% 'max', 'avg', and 'tot', and they correspond to the maximum,
% average, and the integrated fluorescence over the cell area. The
% default is 'max'.
%
% See also:
% CellAnalysisPlayer, Plot_AxisRatio, Plot_CellSize, Plot_LinageTree,
% Plot_TotalDistance, PrintStyle

% Get property/value inputs.
[aXUnit, aYUnit, aMetric] = GetArgs(...
{'XUnit', 'YUnit', 'Metric'},...
{'hours', 'microns', 'max'},...
true, varargin);

% Clear the previous plot.
% cla(aAxes)
% hold(aAxes, 'off')

if isempty(aCells)
return
end
imData = aCells(1).imageData;
% BronkBox=cell(length(cells2),max([cells2.stopT]));
for i = 1:length(aCells)
c = aCells(i);
% Time (x-coordinates of plot).
switch aXUnit
case 'hours'
t = imData.FrameToT(c.firstFrame : c.lastFrame);
case 'frames'
t = c.firstFrame : c.lastFrame;
end
t=x_in;
% Fluorescence (y-coordinates of plot).
aMetric= 'avg';
switch lower(aMetric)
case 'max'
fluor = c.regionProps.(['FluorMax' aChannel]);
case 'avg'
fluor = c.regionProps.(['FluorAvg' aChannel]);
case 'test'
fluor = c.regionProps.(['FluorAvg' aChannel]);
case 'tot'
fluor = c.regionProps.(['FluorTot' aChannel]);
if strcmpi(aYUnit, 'microns')
if imData.GetDim() == 2
fluor = imData.Pixel2ToMicroM2(fluor);
else
fluor = imData.VoxelToMicroM3(fluor);
end
end
end
aMetric2= 'tot';
% Fluorescence (z-coordinates of plot).
switch lower(aMetric2)
case 'max'
fluor2 = c.regionProps.(['FluorMax' aChannel2]);
case 'avg'
fluor2 = c.regionProps.(['FluorAvg' aChannel2]);
case 'test'
fluor2 = c.regionProps.(['FluorAvg' aChannel2]);
case 'tot'
fluor2 = c.regionProps.(['FluorTot' aChannel2]);
if strcmpi(aYUnit, 'microns')
if imData.GetDim() == 2
fluor2 = imData.Pixel2ToMicroM2(fluor2);
else
fluor2 = imData.VoxelToMicroM3(fluor2);
end
end
end
% Plot the fluorescence over time for one cell.
Color=Color;
Color2=Color+0.4*((i-1)/length(aCells));
Color2(Color2>1)=1;
Color2(Color2<0)=1;
% PlotWithNan3D(aAxes, t, fluor,fluor2,'color',Color2,...
% 'LineWidth', 2);
PlotWithNan3D(aAxes, t, fluor,fluor2,'color',Color2,...
'LineWidth', 2);
% alpha(.5);
% hold(aAxes, 'on')
% testing=Color;
end

% % Set the limits of the plot.
% % SetYLimits(aAxes)
% xlim(aAxes, imData.GetTLim(aXUnit, 'Margins', [0.01 0.01]))
%
% % x-label.
% switch lower(aXUnit)
% case 'frames'
% xlabel(aAxes, 'Time (frames)')
% case 'hours'
% xlabel(aAxes, 'Time (hours)')
% end
%
% % y-label and title.
% switch lower(aMetric1)
% case 'max'
% title(aAxes, sprintf('Maximum fluorescence (%s)',...
% SpecChar(imData.GetSeqDir(), 'matlab')))
% ylabel(aAxes, 'Fluorescence (relative to max)')
% case 'avg'
% title(aAxes, sprintf('Average fluorescence (%s)',...
% SpecChar(imData.GetSeqDir(), 'matlab')))
% ylabel(aAxes, 'Fluorescence (relative to max)')
% case 'tot'
% title(aAxes, sprintf('Integrated fluorescence (%s)',...
% SpecChar(imData.GetSeqDir(), 'matlab')))
% if imData.GetDim() == 2
% switch aYUnit
% case 'pixels'
% ylabel(aAxes, 'Fluorescence (relative to max) * Area in pixels')
% case 'microns'
% ylabel(aAxes, 'Fluorescence (relative to max) * Area in \mum^2')
% end
% else
% switch aYUnit
% case 'pixels'
% ylabel(aAxes, 'Fluorescence (relative to max) * Volume in voxels')
% case 'microns'
% ylabel(aAxes, 'Fluorescence (relative to max) * Volume in \mum^3')
% end
% end
% end

% PrintStyle(aAxes)
end
Loading