Code covered by the BSD License  

Highlights from
FRETSCAL

image thumbnail
from FRETSCAL by Eric Muller
For the FRET analysis of images of yeast cells labeled with YFP and CFP.

batch
function batch
%Version 4/3/09
timevector = clock;
t1 = num2str( timevector( 1 ), '%04d' ); % year
t2 = num2str( timevector( 2 ), '%02d' ); % month
t3 = num2str( timevector( 3 ), '%02d' ); % day
t4 = num2str( timevector( 4 ), '%02d' ); % hour
t5 = num2str( timevector( 5 ), '%02d' ); % minute
datetime = [t3,'/',t2,'/',t1,' Start time was ',t4,':',t5];

%Change the following path to where you want to put the error text on your
%computer.
batcherrors = strcat('C:\Users\Eric\Desktop',filesep,'eric.txt');
err = fopen(batcherrors, 'a+' );
fprintf( err,'\n\n%s',datetime);
fclose(err);

%One gets the input for sprintf from running fretscal and taking it from the
%command line. This example is for a Windows machine and the double \\ puts
%in one \ in the command string. Likewise with the double quotes.

command = sprintf('fret -f ''C:\\Users\\Eric\\Desktop\\FRETSCAL PAPER\\DHY208\\OneSetForPaper'' -Ys 0.10 -Cs  0.70 -dir out133109 -S DHY208 -D C:Spc29 -A N:Spc42 -bi 4 -bt 2 -p 5 -Yd  5.00 -Ym -0.05 -Yn  1.10 -Cd  9.00 -Cm  0.50 -Cn  1.00 -Fd  9.00 -Fm  0.50 -Fn  1.00 -s 10 -li  0.50 -dots 10 -P 1 -c 40 -T  0.90 -t 700.00 -bd 16 -Yx 500_545 -Fx 440_545 -Cx 440_480 -X 0_500 -bp 0 -bn 14000 -m 3 -E F -ls 1 -lc 1\n');
fprintf( '%s\n', command );
try
    eval( command );
catch oops
    y = oops.identifier;
    err = fopen(batcherrors, 'a+' );
    fprintf( err,'\nCommand was: %s     Error was: %s',command,y);
    fclose(err);
end;

%And duplicate lines 20-29 for the number of directories you are going to
%examine. Change path or other variables as necessary.

command = sprintf('fret -f ''C:\\Users\\Eric\\Desktop\\FRETSCAL PAPER\\DHY209'' -Ys 0.10 -Cs  0.70 -dir out133109 -S DHY208 -D C:Spc29 -A N:Spc42 -bi 4 -bt 2 -p 5 -Yd  5.00 -Ym -0.05 -Yn  1.10 -Cd  9.00 -Cm  0.50 -Cn  1.00 -Fd  9.00 -Fm  0.50 -Fn  1.00 -s 10 -li  0.50 -dots 10 -P 1 -c 40 -T  0.90 -t 700.00 -bd 16 -Yx 500_545 -Fx 440_545 -Cx 440_480 -X 0_500 -bp 0 -bn 14000 -m 3 -E F -ls 1 -lc 1\n');
fprintf( '%s\n', command );
try
    eval( command );
catch oops
    y = oops.identifier;
    err = fopen(batcherrors, 'a+' );
    fprintf( err,'\nCommand was: %s     Error was: %s',command,y);
    fclose(err);
end;

command = sprintf('fret -f ''C:\\Users\\Eric\\Desktop\\FRETSCAL PAPER\\DHY210'' -Ys 0.10 -Cs  0.70 -dir out133109 -S DHY208 -D C:Spc29 -A N:Spc42 -bi 4 -bt 2 -p 5 -Yd  5.00 -Ym -0.05 -Yn  1.10 -Cd  9.00 -Cm  0.50 -Cn  1.00 -Fd  9.00 -Fm  0.50 -Fn  1.00 -s 10 -li  0.50 -dots 10 -P 1 -c 40 -T  0.90 -t 700.00 -bd 16 -Yx 500_545 -Fx 440_545 -Cx 440_480 -X 0_500 -bp 0 -bn 14000 -m 3 -E F -ls 1 -lc 1\n');
fprintf( '%s\n', command );
try
    eval( command );
catch oops
    y = oops.identifier;
    err = fopen(batcherrors, 'a+' );
    fprintf( err,'\nCommand was: %s     Error was: %s',command,y);
    fclose(err);
end;

Contact us