Home > SuperSegger > frameLink > createNewCell.m

createNewCell

PURPOSE ^

createNewCell : starts a new cell line with cell id : cell_count + 1.

SYNOPSIS ^

function [data_c,cell_count] = createNewCell (data_c, regNum, time, cell_count)

DESCRIPTION ^

 createNewCell : starts a new cell line with cell id : cell_count + 1.
 The cell assigned this id is the one with region id : regNum in data_c.

 INPUT :
       data_c : data file (err/seg file) in current frame
       regNumC : region number in current frame
       time : current time frame
       cell_count : last cell id used

 OUTPUT :
       data_c : updated data file (err/seg file).
       cell_count : last cell id used.

 Copyright (C) 2016 Wiggins Lab
 Written by Stella Stylianidou, Paul Wiggins.
 University of Washington, 2016
 This file is part of SuperSegger.

 SuperSegger 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 3 of the License, or
 (at your option) any later version.

 SuperSegger 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.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [data_c,cell_count] = createNewCell (data_c, regNum, time, cell_count)
0002 % createNewCell : starts a new cell line with cell id : cell_count + 1.
0003 % The cell assigned this id is the one with region id : regNum in data_c.
0004 %
0005 % INPUT :
0006 %       data_c : data file (err/seg file) in current frame
0007 %       regNumC : region number in current frame
0008 %       time : current time frame
0009 %       cell_count : last cell id used
0010 %
0011 % OUTPUT :
0012 %       data_c : updated data file (err/seg file).
0013 %       cell_count : last cell id used.
0014 %
0015 % Copyright (C) 2016 Wiggins Lab
0016 % Written by Stella Stylianidou, Paul Wiggins.
0017 % University of Washington, 2016
0018 % This file is part of SuperSegger.
0019 %
0020 % SuperSegger is free software: you can redistribute it and/or modify
0021 % it under the terms of the GNU General Public License as published by
0022 % the Free Software Foundation, either version 3 of the License, or
0023 % (at your option) any later version.
0024 %
0025 % SuperSegger is distributed in the hope that it will be useful,
0026 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0027 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0028 % GNU General Public License for more details.
0029 
0030 
0031 
0032 cell_count = cell_count+1;
0033 
0034 % set the death/deathF to current time. They are reset when cell is
0035 % visited again.
0036 data_c.regs.death(regNum) = time; % Death/divide time
0037 data_c.regs.deathF(regNum) = 1;    % Divides in this frame
0038 data_c.regs.birth(regNum) = time; % Birth T: either division or appearance
0039 data_c.regs.birthF(regNum) = 1;    % Divide in this frame
0040 data_c.regs.age(regNum) = 1;    % cell age. starts at 1.
0041 data_c.regs.divide(regNum) = 0;    % succesful divide in this this frame.
0042 data_c.regs.ehist(regNum) = 0;    % 1 if cell had unresolved error before this time.
0043 data_c.regs.stat0(regNum) = 0;    % Results from a successful division.
0044 data_c.regs.sisterID(regNum) = 0; % sister cell ID
0045 data_c.regs.motherID(regNum) = 0; % mother cell ID
0046 data_c.regs.daughterID{regNum} = []; % daughter cell ID
0047 data_c.regs.ID(regNum) = cell_count; % cell ID number
0048 data_c.regs.ID_{regNum} = cell_count; % cell ID_ can hold a vector - can be resolved later
0049 
0050 if isfield( data_c.regs, 'lyse' )
0051     data_c.regs.lyse.errorColor1Cum(regNum) = time*double(logical(data_c.regs.lyse.errorColor1(regNum)));
0052     data_c.regs.lyse.errorColor2Cum(regNum) = time*double(logical(data_c.regs.lyse.errorColor2(regNum)));
0053     data_c.regs.lyse.errorColor1bCum(regNum) = time*double(logical(data_c.regs.lyse.errorColor1b(regNum)));
0054     data_c.regs.lyse.errorColor2bCum(regNum) = time*double(logical(data_c.regs.lyse.errorColor2b(regNum)));
0055     data_c.regs.lyse.errorShapeCum(regNum)  = time*double(logical(data_c.regs.lyse.errorShape(regNum)));
0056 end
0057 
0058 
0059 end

Generated on Thu 19-Jan-2017 13:55:21 by m2html © 2005