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.

fsearch_callback
function fsearch_callback
%Version 4/3/09. Displays a summary of the settings before launching the search with
% fsearch2_callback.

global CFPtagname dirsep cfptype yfptype primary strainname YFPtagname
global initialdone culldone inspectdone finaldone limit1
global initialfile initials culls inspects finals
global intensitylimit fontpics separation context toobright
global homedirectory inputdirectory outputdirectory
global string1 string2 string3 string4 string5 string6 string7 string8 string9
global YFPFWHM FRETFWHM CFPFWHM YFPmono FRETmono CFPmono YFPs2b FRETs2b CFPs2b
lightgreen = [.9 .95 .9];
count = 0;
if primary == 1
    primarys = 'YFP';
elseif primary == 2
    primarys = 'FRET';
elseif primary == 3
    primarys = 'CFP';
end
if limit1 == 1
    string13 = sprintf('Search limits on %s channel.\n',primarys);
else
    string13 = sprintf('Search limits on all channels.\n');
end
if(strcmp(inputdirectory, homedirectory) == 1)
    fgetinput;
    count = count +1;
end;
if(strcmp(strainname, 'unassigned') == 1)
    fgetstrain;
    count = count +1;
end;
if(strcmp(CFPtagname, 'CFP_Tagged_Protein') == 1)
    fgetCFPtag;
    count = count + 1;
end;
if(strcmp(YFPtagname,'YFP_Tagged_Protein') == 1)
    fgetYFPtag;
    count = count +1;
end;
if count == 0
    if(isempty(strainname) == 0  || isempty(CFPtagname) == 0 || isempty(YFPtagname == 0))
        x = .15; y = .35; w = .7; h = .5; spacing = .07;
        if( cfptype == 1 )
            if( primary == 3 )
                experimenttype = 'CFP spillover measurement, primary CFP';
            else
                experimenttype = 'CFP spillover measurement, primary FRET';
            end;
        elseif( yfptype == 1 )
            if( primary == 1 )
                experimenttype = 'YFP spillover measurement, primary YFP';
            else
                experimenttype = 'YFP spillover measurement, primary FRET';
            end;
        else
            if( primary == 1 )
                experimenttype = 'FRET measurement, primary YFP';
            elseif( primary == 2 )
                experimenttype = 'FRET measurement, primary FRET';
            else
                experimenttype = 'FRET measurement, primary CFP';
            end;
        end;
        string0 = sprintf( 'Experiment type is:  %s\n', experimenttype );
        string1 = sprintf( 'Strain name is:  %s\n', strainname );
        string2 = sprintf( 'YFP tagged protein is:  %s\n', YFPtagname );
        string3 = sprintf( 'CFP tagged protein is:  %s\n', CFPtagname );%        string4 = sprintf( 'Lower intensity limit is:  %5.2f\n', intensitylimit );
        string5 = sprintf( 'Input directory is:  %s\n', inputdirectory );
        string6 = sprintf( 'Output directory is:  %s%s%s\n', inputdirectory, dirsep, outputdirectory );
        string7 = sprintf( 'Initial results file is:  %s\n', initialfile );
        string9 = sprintf( 'YFP  limits are: sig2back,%5.2f; monotonicity deviance, %5.2f; FWHM, %5.2f;\n', YFPs2b,  YFPmono,YFPFWHM );
        string10 = sprintf( 'FRET limits are: sig2back,%5.2f; monotonicity deviance, %5.2f; FWHM, %5.2f\n', FRETs2b, FRETmono, FRETFWHM );
        string11 = sprintf( 'CFP  limits are: sig2back,%5.2f; monotonicity deviance, %5.2f; FWHM, %5.2f;\n', CFPs2b, CFPmono, CFPFWHM );
        string8 = sprintf( 'Separation between AOI(in pixels) is:  %d\n', separation );
        string12 = sprintf( 'Context is:  %d; Maximum pixel setting: %5.2f; Lower intensity limit is:  %5.2f   \n', context,toobright,intensitylimit );
        h_compute = figure('Color', lightgreen, 'units', 'normalized', 'menubar', 'none','name','Search Parameters', 'ToolBar', 'none', ...
            'NumberTitle', 'off', 'position', [ x y w h ], 'resize', 'off' );
        h_compute_stext = uicontrol( h_compute, 'units', 'normalized', 'style', 'text', ...
            'string', string0, 'position', [ 0 1-1*spacing   1 spacing ],'background',lightgreen, 'fontsize', fontpics );
        h_compute_stext = uicontrol( h_compute, 'units', 'normalized', 'style', 'text', ...
            'string', string1, 'position', [ 0 1-2*spacing   1 spacing ], 'background',lightgreen, 'fontsize', fontpics );
        h_compute_stext = uicontrol( h_compute, 'units', 'normalized', 'style', 'text', ...
            'string', string2, 'position', [ 0 1-3*spacing   1 spacing ], 'background',lightgreen, 'fontsize', fontpics );
        h_compute_stext = uicontrol( h_compute, 'units', 'normalized', 'style', 'text', ...
            'string', string3, 'position', [ 0 1-4*spacing   1 spacing ], 'background',lightgreen, 'fontsize', fontpics );
        h_compute_stext = uicontrol( h_compute, 'units', 'normalized', 'style', 'text', ...
            'string', string5, 'position', [ 0 1-5*spacing   1 spacing ], 'background',lightgreen, 'fontsize', fontpics );
        h_compute_stext = uicontrol( h_compute, 'units', 'normalized', 'style', 'text', ...
            'string', string6, 'position', [ 0 1-6*spacing   1 spacing ], 'background',lightgreen, 'fontsize', fontpics );
        h_compute_stext = uicontrol( h_compute, 'units', 'normalized', 'style', 'text', ...
            'string', string7, 'position', [ 0 1-7*spacing   1 spacing ], 'background',lightgreen, 'fontsize', fontpics );
        h_compute_stext = uicontrol( h_compute, 'units', 'normalized', 'style', 'text', ...
            'string', string9, 'position', [ 0 1-8*spacing   1 spacing ], 'background',lightgreen, 'fontsize', fontpics );
        h_compute_stext = uicontrol( h_compute, 'units', 'normalized', 'style', 'text', ...
            'string', string10, 'position', [ 0 1-9*spacing   1 spacing ], 'background',lightgreen, 'fontsize', fontpics );
        h_compute_stext = uicontrol( h_compute, 'units', 'normalized', 'style', 'text', ...
            'string', string11, 'position', [ 0 1-10*spacing   1 spacing ], 'background',lightgreen, 'fontsize', fontpics );
        h_compute_stext = uicontrol( h_compute, 'units', 'normalized', 'style', 'text', ...
            'string', string8, 'position', [ 0 1-11*spacing   1 spacing ], 'background',lightgreen, 'fontsize', fontpics );
        h_compute_stext = uicontrol( h_compute, 'units', 'normalized', 'style', 'text', ...
            'string', string12, 'position', [ 0 1-12*spacing   1 spacing ], 'background',lightgreen, 'fontsize', fontpics );
        h_compute_stext = uicontrol( h_compute, 'units', 'normalized', 'style', 'text', ...
            'string', string13, 'position', [ 0 1-13*spacing   1 spacing ], 'background',lightgreen, 'fontsize', fontpics );
        
        uicontrol( h_compute, 'style','pushbutton', 'units', 'normalized', 'string','Start finding AOIs',...
            'position',[ .1 1-14*spacing .3 spacing ], 'callback','close(gcf);pause(.2);fsearch2_callback', 'fontsize', fontpics );%close(gcf);fupdate
        uicontrol( h_compute, 'style','pushbutton', 'units', 'normalized', 'string','Cancel',...
            'position',[ .6 1-14*spacing .3 spacing ], 'callback', 'close(gcf)', 'fontsize', fontpics );
    end
end

Contact us