This is a static copy of a profile reportHome
extract_radius_ratio_old (1 call, 2.513 sec)
Generated 05-Nov-2014 07:52:31 using cpu time.
function in file /usr0/home/jenkins/workspace/cellorganizer-demo3D11-glnx64/utilities/3D/vesicles/3D/extract_radius_ratio_old.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
45 | load(fname) | 201 | 1.722 s | 68.5% |  |
84 | save('./temp/cell_shape_eigen/... | 1 | 0.210 s | 8.4% |  |
58 | curr_nuc = interp1(h,curr_nuc,... | 108 | 0.100 s | 4.0% |  |
43 | if exist(fname,'file') | 201 | 0.090 s | 3.6% |  |
61 | curr_cell = interp1(h,curr_cel... | 108 | 0.060 s | 2.4% |  |
All other lines | | | 0.330 s | 13.1% |  |
Totals | | | 2.513 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
interp1 | function | 216 | 0.150 s | 6.0% |  |
ml_dir | function | 1 | 0.020 s | 0.8% |  |
filesep | function | 202 | 0.010 s | 0.4% |  |
Self time (built-ins, overhead, etc.) | | | 2.333 s | 92.8% |  |
Totals | | | 2.513 s | 100% | |
Code Analyzer results
Line number | Message |
1 | Function name 'extract_radius_ratio' is known to MATLAB by its file name: 'extract_radius_ratio_old'. |
33 | The value assigned to variable 'n' might be unused. |
46 | The value assigned to variable 'baseplane' might be unused. |
46 | The variable 'baseplane' appears to change size on every loop iteration. Consider preallocating for speed. |
49 | The value assigned to variable 'stack' might be unused. |
50 | Variable 'cellcodes' is used, but might be unset. |
57 | The variable 'curr_nuc' appears to change size on every loop iteration. Consider preallocating for speed. |
60 | The variable 'curr_cell' appears to change size on every loop iteration. Consider preallocating for speed. |
64 | The variable 'nucdist' appears to change size on every loop iteration. Consider preallocating for speed. |
65 | The variable 'nucelldist' appears to change size on every loop iteration. Consider preallocating for speed. |
68 | The variable 'r' appears to change size on every loop iteration. Consider preallocating for speed. |
70 | The variable 'r' appears to change size on every loop iteration. Consider preallocating for speed. |
75 | The variable 'distratio' appears to change size on every loop iteration. Consider preallocating for speed. |
76 | The variable 'cellnucratios' appears to change size on every loop iteration. Consider preallocating for speed. |
77 | The variable 'nucbottomslices' appears to change size on every loop iteration. Consider preallocating for speed. |
85 | Best practice is for CATCH to be followed by an identifier that gets the error information. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 86 |
Non-code lines (comments, blank lines) | 44 |
Code lines (lines that can run) | 42 |
Code lines that did run | 42 |
Code lines that did not run | 0 |
Coverage (did run/can run) | 100.00 % |
Function listing
time calls line
1 function [rad_ratio,cellnucratios,nucbottomslices] = extract_radius_ratio(cellcodepath)
2 % From the cellcodes, extract the radius ratio of nuclear radius over cell
3 % radius under cylindrical systerm
4
5 % Author: Tao Peng
6 % Edited: Ivan E. Cao-Berg
7 %
8 % Copyright (C) 2011 Murphy Lab
9 % Lane Center for Computational Biology
10 % School of Computer Science
11 % Carnegie Mellon University
12 %
13 % This program is free software; you can redistribute it and/or modify
14 % it under the terms of the GNU General Public License as published
15 % by the Free Software Foundation; either version 2 of the License,
16 % or (at your option) any later version.
17 %
18 % This program is distributed in the hope that it will be useful, but
19 % WITHOUT ANY WARRANTY; without even the implied warranty of
20 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 % General Public License for more details.
22 %
23 % You should have received a copy of the GNU General Public License
24 % along with this program; if not, write to the Free Software
25 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26 % 02110-1301, USA.
27 %
28 % For additional information visit http://murphylab.web.cmu.edu or
29 % send email to murphy@cmu.edu
30
31 % Constants
32 %protype = {'DNA','LAM','Nuc','Gia','Gpp','Mit','TfR'};
1 33 n = 360;
1 34 H = -pi:(2*pi/360):pi;
1 35 k = 0;
36
37 % Calculate radius ratios and combining them
1 38 distratio = []; cellnucratios = []; nucbottomslices = [];
0.02 1 39 celllist = ml_dir([cellcodepath filesep 'cellcodes_*']);
40
0.01 1 41 for i = 1:length(celllist)
0.02 201 42 fname = [cellcodepath filesep celllist{i}];
0.09 201 43 if exist(fname,'file')
0.01 201 44 k = k + 1;
1.72 201 45 load(fname)
201 46 baseplane(k) = equatorZ;
201 47 nucdist = [];
201 48 nucelldist = [];
201 49 stack = [];
201 50 for s = 1:length(cellcodes)
51 % disp(['s:' num2str(s)]);
0.04 3015 52 if ~isempty(cellcodes{s})
0.01 3015 53 curr_nuc = cellcodes{s}.nucdist;
0.02 3015 54 curr_cell = cellcodes{s}.nucelldist;
0.03 3015 55 if length(curr_nuc) ~= 360
108 56 h = -pi:(2*pi/length(curr_nuc)):pi;
108 57 curr_nuc(end+1) = curr_nuc(1);
0.10 108 58 curr_nuc = interp1(h,curr_nuc,H);
108 59 curr_nuc(end) = [];
108 60 curr_cell(end+1) = curr_cell(1);
0.06 108 61 curr_cell = interp1(h,curr_cell,H);
108 62 curr_cell(end) = [];
108 63 end
0.05 3015 64 nucdist = [nucdist;curr_nuc];
0.04 3015 65 nucelldist = [nucelldist;curr_cell];
3015 66 end
0.03 3015 67 end
0.02 201 68 r{i} = nucdist ./ nucelldist;
69
201 70 r{i}(isinf(r{i}(:))) = max(r{i}(~isinf(r{i}(:))));
71
72 % if any()
73 % 1;
74 % end
0.02 201 75 distratio = [distratio,r{i}(:)];
201 76 cellnucratios = [cellnucratios;cellnucheightratio];
201 77 nucbottomslices = [nucbottomslices;nucbottomslice];
201 78 end
201 79 end
80
0.01 1 81 rad_ratio = distratio';
82
1 83 try
0.21 1 84 save('./temp/cell_shape_eigen/radius_ratio.mat','rad_ratio','cellnucratios','nucbottomslices')
85 catch
1 86 end