Home > cellorganizer > utilities > set_temp_result_folders.m

set_temp_result_folders

PURPOSE ^

SET_TEMP_RESULT_FOLDERS checks the param struct for user defined temp directories, if not

SYNOPSIS ^

function param = set_temp_result_folders(param)

DESCRIPTION ^

SET_TEMP_RESULT_FOLDERS checks the param struct for user defined temp directories, if not
specified defaults them 

Author: Devin Sullivan 6/13/13

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published
 by the Free Software Foundation; either version 2 of the License,
 or (at your option) any later version.

 This program is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 02110-1301, USA.

 For additional information visit http://murphylab.web.cmu.edu/ or
 send email to murphy@cmu.edu

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function param = set_temp_result_folders(param)
0002 %SET_TEMP_RESULT_FOLDERS checks the param struct for user defined temp directories, if not
0003 %specified defaults them
0004 %
0005 %Author: Devin Sullivan 6/13/13
0006 %
0007 % This program is free software; you can redistribute it and/or modify
0008 % it under the terms of the GNU General Public License as published
0009 % by the Free Software Foundation; either version 2 of the License,
0010 % or (at your option) any later version.
0011 %
0012 % This program is distributed in the hope that it will be useful, but
0013 % WITHOUT ANY WARRANTY; without even the implied warranty of
0014 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015 % General Public License for more details.
0016 %
0017 % You should have received a copy of the GNU General Public License
0018 % along with this program; if not, write to the Free Software
0019 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
0020 % 02110-1301, USA.
0021 %
0022 % For additional information visit http://murphylab.web.cmu.edu/ or
0023 % send email to murphy@cmu.edu
0024 
0025 
0026 if ~isfield(param,'tempparent')
0027     param.tempparent = [pwd filesep 'temp'];
0028 end
0029 if ~exist( param.tempparent,'dir' )
0030     mkdir( param.tempparent );
0031 end
0032 
0033 
0034 %Preprocessed results (segmented cells and nuclei)
0035 if ~isfield(param,'preprocessingFolder')
0036     param.preprocessingFolder = [ param.tempparent filesep 'preprocessing' ];
0037 end
0038 if ~exist( param.preprocessingFolder,'dir' )
0039     mkdir( param.preprocessingFolder );
0040 end
0041 
0042 %Per-cell nuclear features
0043 if ~isfield(param,'nuctemppath')
0044     param.nuctemppath = [param.tempparent filesep 'nuclearfeats'];
0045 end
0046 
0047 %Per-cell cell features
0048 if ~isfield(param,'celltemppath')
0049     param.celltemppath = [param.tempparent filesep 'cell_shape_eigen'];
0050 end
0051 if ~exist(param.celltemppath,'dir')
0052     mkdir(param.celltemppath)
0053 end
0054 
0055 %Per-cell protein features
0056 %default parent directory
0057 temporaryProtFolder = [ param.tempparent filesep 'protein_objects_gaussian' ];
0058 
0059 %preprocessed objects
0060 if ~isfield(param,'objtemppath')
0061     param.objtemppath = [ temporaryProtFolder filesep 'original_objects'];
0062 end
0063 
0064 %fit objects
0065 if ~isfield(param,'savefitdir')
0066     param.savefitdir = [ temporaryProtFolder filesep 'object_gaussians'];
0067 end
0068 if ~exist(param.savefitdir,'dir')
0069     mkdir(param.savefitdir);
0070 end
0071 
0072 %object stats
0073 if ~isfield(param,'objstatsdir')
0074     param.objstatsdir = [temporaryProtFolder filesep 'object_stats' filesep];
0075 end
0076 
0077 %object sizes
0078 if ~isfield(param,'objsizedir')
0079     param.objsizedir = [temporaryProtFolder filesep 'object_sizes' filesep];
0080 end
0081 
0082 %object positions
0083 if ~isfield(param,'objposdir')
0084     param.objposdir = [temporaryProtFolder filesep 'object_positions' filesep];
0085 end
0086 
0087 if ~isfield(param,'compartmentdir')
0088     param.compartmentdir = [ param.tempparent filesep 'compartment_stats' filesep];
0089 end
0090 if ~exist(param.compartmentdir,'dir')
0091     mkdir(param.compartmentdir);
0092 end
0093

Generated on Sun 29-Sep-2013 18:44:06 by m2html © 2005