0001 function [data_c, data_r] = continueCellLine( data_c, regNumC, data_r,...
0002 regNumR, time, errorStat)
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038 if ~any (data_c.regs.ID == data_r.regs.ID(regNumR))
0039 data_c.regs.death(regNumC) = time;
0040 data_c.regs.deathF(regNumC) = 1;
0041 data_c.regs.birth(regNumC) = data_r.regs.birth(regNumR);
0042 data_c.regs.birthF(regNumC) = 0;
0043 data_c.regs.age(regNumC) = data_r.regs.age(regNumR)+1;
0044 data_c.regs.divide(regNumC) = 0;
0045 data_c.regs.contactHist(regNumC) = data_r.regs.contactHist(regNumR) || data_c.regs.contact(regNumC);
0046 data_c.regs.ehist(regNumC) = data_r.regs.ehist(regNumR) || errorStat;
0047
0048 data_c.regs.stat0(regNumC) = data_r.regs.stat0(regNumR);
0049 data_c.regs.sisterID(regNumC) = data_r.regs.sisterID(regNumR);
0050 data_c.regs.motherID(regNumC) = data_r.regs.motherID(regNumR);
0051 data_c.regs.daughterID{regNumC} = [];
0052 data_c.regs.ID(regNumC) = data_r.regs.ID(regNumR);
0053
0054
0055 data_r.regs.death(regNumR) = time;
0056 data_r.regs.deathF(regNumR) = 0;
0057 data_r.regs.divide(regNumR) = 0;
0058
0059 if isfield( data_c.regs, 'lyse' )
0060 if ~data_r.regs.lyse.errorColor1Cum(regNumR)
0061 data_c.regs.lyse.errorColor1Cum(regNumC) = ...
0062 time*double(logical(data_c.regs.lyse.errorColor1(regNumC)));
0063 else
0064 data_c.regs.lyse.errorColor1Cum(regNumC) = data_r.regs.lyse.errorColor1Cum(regNumR);
0065 end
0066
0067 if ~data_r.regs.lyse.errorColor2Cum(regNumR)
0068 data_c.regs.lyse.errorColor2Cum(regNumC) = ...
0069 time*double(logical(data_c.regs.lyse.errorColor2(regNumC)));
0070 else
0071 data_c.regs.lyse.errorColor2Cum(regNumC) = data_r.regs.lyse.errorColor2Cum(regNumR);
0072 end
0073
0074 if ~data_r.regs.lyse.errorColor1bCum(regNumR)
0075 data_c.regs.lyse.errorColor1bCum(regNumC) = ...
0076 time*double(logical(data_c.regs.lyse.errorColor1b(regNumC)));
0077 else
0078 data_c.regs.lyse.errorColor1bCum(regNumC) = data_r.regs.lyse.errorColor1bCum(regNumR);
0079 end
0080
0081 if ~data_r.regs.lyse.errorColor2bCum(regNumR)
0082 data_c.regs.lyse.errorColor2bCum(regNumC) = ...
0083 time*double(logical(data_c.regs.lyse.errorColor2b(regNumC)));
0084 else
0085 data_c.regs.lyse.errorColor2bCum(regNumC) = data_r.regs.lyse.errorColor2bCum(regNumR);
0086 end
0087
0088 if ~data_r.regs.lyse.errorShapeCum(regNumR)
0089 data_c.regs.lyse.errorShapeCum(regNumC) = ...
0090 time*double(logical(data_c.regs.lyse.errorShape(regNumC)));
0091 else
0092 data_c.regs.lyse.errorShapeCum(regNumC) = data_r.regs.lyse.errorShapeCum(regNumR);
0093 end
0094 end
0095
0096 else
0097 idThief = find(data_c.regs.ID == data_r.regs.ID(regNumR));
0098 thiefIsCurReg = numel(idThief) == 1 && (idThief==regNumC);
0099 if ~thiefIsCurReg && data_r.regs.ID(regNumR)~=0
0100 disp (['FRAME :', num2str(time),' ID PROBLEM WITH ',num2str(regNumC), ' ', num2str(data_r.regs.ID(regNumR))]);
0101
0102 end
0103 end
0104 end