This is a static copy of a profile reportHome
extract_radius_ratio (201 calls, 6.649 sec)
Generated 05-Nov-2014 07:53:25 using cpu time.
function in file /usr0/home/jenkins/workspace/cellorganizer-demo3D11-glnx64/utilities/3D/vesicles/3D/extract_radius_ratio.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 |
87 | save(cellcodepath,'rad_ratio',... | 201 | 4.456 s | 67.0% |  |
50 | load(fname) | 201 | 1.612 s | 24.2% |  |
63 | curr_nuc = interp1(h,curr_nuc,... | 108 | 0.120 s | 1.8% |  |
48 | if exist(fname,'file') | 201 | 0.090 s | 1.4% |  |
70 | nucelldist = [nucelldist;curr_... | 3015 | 0.060 s | 0.9% |  |
All other lines | | | 0.310 s | 4.7% |  |
Totals | | | 6.649 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
interp1 | function | 216 | 0.150 s | 2.3% |  |
Self time (built-ins, overhead, etc.) | | | 6.499 s | 97.7% |  |
Totals | | | 6.649 s | 100% | |
Code Analyzer results
Line number | Message |
37 | The value assigned to variable 'n' might be unused. |
42 | The value assigned to variable 'distratio' might be unused. |
47 | Use of brackets [] is unnecessary. Use parentheses to group, if needed. |
51 | The value assigned to variable 'baseplane' might be unused. |
54 | The value assigned to variable 'stack' might be unused. |
55 | Variable 'cellcodes' is used, but might be unset. |
62 | The variable 'curr_nuc' appears to change size on every loop iteration. Consider preallocating for speed. |
65 | The variable 'curr_cell' appears to change size on every loop iteration. Consider preallocating for speed. |
69 | The variable 'nucdist' appears to change size on every loop iteration. Consider preallocating for speed. |
70 | The variable 'nucelldist' appears to change size on every loop iteration. Consider preallocating for speed. |
89 | 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 | 90 |
Non-code lines (comments, blank lines) | 52 |
Code lines (lines that can run) | 38 |
Code lines that did run | 35 |
Code lines that did not run | 3 |
Coverage (did run/can run) | 92.11 % |
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 % June 10 2013 D. Sullivan This method now precomputes radius ratio
9 % statistics per-cell
10 % extract_radius_ratiomodel compiles the model
11 %
12 % Copyright (C) 2011 Murphy Lab
13 % Lane Center for Computational Biology
14 % School of Computer Science
15 % Carnegie Mellon University
16 %
17 % This program is free software; you can redistribute it and/or modify
18 % it under the terms of the GNU General Public License as published
19 % by the Free Software Foundation; either version 2 of the License,
20 % or (at your option) any later version.
21 %
22 % This program is distributed in the hope that it will be useful, but
23 % WITHOUT ANY WARRANTY; without even the implied warranty of
24 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 % General Public License for more details.
26 %
27 % You should have received a copy of the GNU General Public License
28 % along with this program; if not, write to the Free Software
29 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
30 % 02110-1301, USA.
31 %
32 % For additional information visit http://murphylab.web.cmu.edu or
33 % send email to murphy@cmu.edu
34
35 % Constants
36 %protype = {'DNA','LAM','Nuc','Gia','Gpp','Mit','TfR'};
201 37 n = 360;
0.02 201 38 H = -pi:(2*pi/360):pi;
201 39 k = 0;
40
41 % Calculate radius ratios and combining them
201 42 distratio = []; cellnucratios = []; nucbottomslices = [];
43 % celllist = ml_dir([cellcodepath filesep 'cellcodes_*']);
44
45 % for i = 1:length(celllist)
46 % fname = [cellcodepath filesep celllist{i}];
201 47 fname = [cellcodepath];
0.09 201 48 if exist(fname,'file')
0.01 201 49 k = k + 1;
1.61 201 50 load(fname)
201 51 baseplane(k) = equatorZ;
201 52 nucdist = [];
201 53 nucelldist = [];
0.01 201 54 stack = [];
201 55 for s = 1:length(cellcodes)
56 % disp(['s:' num2str(s)]);
0.04 3015 57 if ~isempty(cellcodes{s})
0.05 3015 58 curr_nuc = cellcodes{s}.nucdist;
0.02 3015 59 curr_cell = cellcodes{s}.nucelldist;
0.02 3015 60 if length(curr_nuc) ~= 360
108 61 h = -pi:(2*pi/length(curr_nuc)):pi;
108 62 curr_nuc(end+1) = curr_nuc(1);
0.12 108 63 curr_nuc = interp1(h,curr_nuc,H);
108 64 curr_nuc(end) = [];
108 65 curr_cell(end+1) = curr_cell(1);
0.03 108 66 curr_cell = interp1(h,curr_cell,H);
108 67 curr_cell(end) = [];
108 68 end
0.06 3015 69 nucdist = [nucdist;curr_nuc];
0.06 3015 70 nucelldist = [nucelldist;curr_cell];
3015 71 end
0.01 3015 72 end
0.02 201 73 r = nucdist ./ nucelldist;
201 74 distratio = r(:);
201 75 rad_ratio = distratio';
76 % cellnucratios = [cellnucratios;cellnucheightratio];
77 % nucbottomslices = [nucbottomslices;nucbottomslice];
78 else
79 error([cellcodepath ' does not exist, cannot compute radius ratio.']);
80 end
81 % end
82
83
84
201 85 try
86 % save('./temp/cell_shape_eigen/radius_ratio.mat','rad_ratio','cellnucratios','nucbottomslices')
4.46 201 87 save(cellcodepath,'rad_ratio','nucdist','nucelldist','cellnucheightratio','nucbottomslice','cellcodes','equatorZ')
88
89 catch
201 90 end