Commit f00c5710 authored by Andrew Cohen's avatar Andrew Cohen

patch -- don't reset on reseg. findFamily handle patches in tblFamilyr

parent 5d599f1c
......@@ -30,9 +30,14 @@ if (t1-time)<5
return
end
% make sure d1 is not already in family tree
cmd=['select cellID_parent from tblFamilies where cellID_child1=' num2str(d1CellID)...
' or cellID_child2=' num2str(d1CellID)];
q=fetch(conn,cmd);
if ~isempty(q)
return
end
% get parents
cmd=['select cellID,trackID,centroid from tblDistCC inner join tblCells on cellID_src=cellID where cellID_dst='...
num2str(d1CellID) ' and time=' num2str(time-1)];
......@@ -58,6 +63,17 @@ if costs(idx).ratioD1D2>25
end
mitosisNode.ratioD1D2=costs(idx).ratioD1D2;
% make sure daughter is not already in family tree. if density is high
% enough, daughter 2 could be claimed by another cell. for now, first come
% first server. better would be to build table for each time point, and
% select min cost when two are in conflict
cmd=['select cellID_parent from tblFamilies where cellID_child1=' num2str(costs(idx).parentDaughterCID(2))...
' or cellID_child2=' num2str(costs(idx).parentDaughterCID(2))];
q=fetch(conn,cmd);
if ~isempty(q)
return;
end
% make sure sibling stays alive for min_frames
cmd=['select max(time) from tblCells where trackID IN(' num2str(costs(idx).parentDaughterTID(2)), ',' num2str(costs(idx).parentDaughterCID(2)) ') '];
q=fetch(conn,cmd);
......
......@@ -20,7 +20,7 @@ if isempty(q)
return
end
newCells=cell2mat(q);
q=fetch(conn,'select * from tblFamilies');
q=fetch(conn,'select * from tblFamilies where cellID_child2 is not null');
if ~isempty(q)
lineageNodes=[q{:}];
else
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment