Code covered by the BSD License  

Highlights from
FRETSCAL

image thumbnail

FRETSCAL

by

 

For the FRET analysis of images of yeast cells labeled with YFP and CFP.

fwritelast( step )
function fwritelast( step )
%Version 4/3/09
%When the user saves their preferences writes prefs.txt in home directory.
%When the user saves the final results writes flast as a record for the
%settings used for the results.
global strainname CFPspill CFPtagname YFPtagname YFPspill
global frettype cfptype yfptype primary fontpics context toobright
global initialfile culledfile inspectedfile finalfile limit1 limit2
global AOIshape intensitylimit maximumpeaks bringthick bringincr separation maxmovement
global startdirectory homedirectory inputdirectory outputdirectory  dirsep
global YFPFWHM FRETFWHM CFPFWHM YFPmono FRETmono CFPmono YFPs2b FRETs2b CFPs2b
global YFPFWHMcull FRETFWHMcull CFPFWHMcull YFPmonocull FRETmonocull CFPmonocull YFPs2bcull FRETs2bcull CFPs2bcull
global bitdepth Ysuffix Fsuffix Csuffix Dsuffix bpfilter patchpixel

if( step == 1 ) % steps determine where fwritelast is going to write the flast file settings. It is set to 1 in save new default user pref settings.
    settingsfile = sprintf( '%s%sprefs.txt', homedirectory, dirsep );
elseif(step == 3) % set to 3 from write final results for record of settings.
    settingsfile = sprintf( '%s%s%s%sflast.txt', inputdirectory, dirsep, outputdirectory, dirsep );
end;

fprintf( 1, 'Writing current settings to %s\n', settingsfile );
fset = fopen( settingsfile, 'w' );
if( fset ~= -1 )
    fprintf( fset, 'intensitylimit %f\n',   intensitylimit );
    fprintf( fset, 'CFPspill %f\n',         CFPspill );
    fprintf( fset, 'YFPspill %f\n',         YFPspill );
    fprintf( fset, 'PrimaryChannel %d\n',   primary);
    fprintf( fset, 'strainname %s\n',       strainname );
    fprintf( fset, 'CFPtagname %s\n',       CFPtagname );
    fprintf( fset, 'YFPtagname %s\n',       YFPtagname );
    fprintf( fset, 'inputdirectory %s\n',   inputdirectory );
    fprintf( fset, 'outputdirectory %s\n',  outputdirectory );
    fprintf( fset, 'startdirectory %s\n',   startdirectory );
    fprintf( fset, 'frettype %f\n',         frettype );
    fprintf( fset, 'cfptype %f\n',          cfptype );
    fprintf( fset, 'yfptype %f\n',          yfptype);
    fprintf( fset, 'YFPFWHM %f\n',         YFPFWHM );
    fprintf( fset, 'FRETFWHM %f\n',        FRETFWHM );
    fprintf( fset, 'CFPFWHM %f\n',         CFPFWHM );
    fprintf( fset, 'YFPmono %f\n',          YFPmono );
    fprintf( fset, 'FRETmono %f\n',         FRETmono );
    fprintf( fset, 'CFPmono %f\n',          CFPmono );
    fprintf( fset, 'YFPs2b %f\n',           YFPs2b );
    fprintf( fset, 'FRETs2b %f\n',          FRETs2b );
    fprintf( fset, 'CFPs2b %f\n',           CFPs2b);
    fprintf( fset, 'YFPFWHMcull %f\n',         YFPFWHMcull );
    fprintf( fset, 'FRETFWHMcull %f\n',        FRETFWHMcull );
    fprintf( fset, 'CFPFWHMcull %f\n',         CFPFWHMcull );
    fprintf( fset, 'YFPmonocull %f\n',          YFPmonocull );
    fprintf( fset, 'FRETmonocull %f\n',         FRETmonocull );
    fprintf( fset, 'CFPmonocull %f\n',          CFPmonocull );
    fprintf( fset, 'YFPs2bcull %f\n',           YFPs2bcull );
    fprintf( fset, 'FRETs2bcull %f\n',          FRETs2bcull );
    fprintf( fset, 'CFPs2bcull %f\n',           CFPs2bcull);
    fprintf( fset, 'initialfile %s\n',      initialfile );
    fprintf( fset, 'culledfile %s\n',       culledfile );
    fprintf( fset, 'inspectedfile %s\n',    inspectedfile );
    fprintf( fset, 'finalfile %s\n',        finalfile );
    fprintf( fset, 'AOIshape %d\n',         AOIshape );
    fprintf( fset, 'bringincr %d\n',        bringincr );
    fprintf( fset, 'bringthick %d\n',       bringthick );
    fprintf( fset, 'separation %d\n',       separation );
    fprintf( fset, 'maximumpeaks %d\n',     maximumpeaks );
    fprintf( fset, 'fontpics %d\n',         fontpics );
    fprintf( fset, 'context %d\n',          context );
    fprintf( fset, 'toobright %f\n',        toobright );
    fprintf( fset, 'bitdepth %d\n',         bitdepth );
    fprintf( fset, 'Ysuffix %s\n',          Ysuffix );
    fprintf( fset, 'Fsuffix %s\n',          Fsuffix );
    fprintf( fset, 'Csuffix %s\n',          Csuffix );
    fprintf( fset, 'Dsuffix %s\n',          Dsuffix );
    fprintf( fset, 'bpfilter %d\n',          bpfilter );
    fprintf( fset, 'patchpixel %d\n',          patchpixel );
    fprintf( fset, 'maxmovement %d\n',          maxmovement );
    fprintf( fset, 'searchlimited %d\n',          limit1 );
    fprintf( fset, 'culllimited %d\n',          limit2 );
    fclose( fset );
else
    fprintf( 'couldn''t open file %s for writing out fset\n', fset );
end;

Contact us