diff --git a/antrax/cli.py b/antrax/cli.py index 99c24ef..98b9d91 100755 --- a/antrax/cli.py +++ b/antrax/cli.py @@ -268,9 +268,13 @@ def solve(explist, *, glist: parse_movlist=None, movlist: parse_movlist=None, cl for e in explist: eglist = glist if glist is not None else e.glist + emlist = [e.ggroups[g - 1] for g in eglist] emlist = [m for grp in emlist for m in grp] + if movlist is not None: + emlist = [m for m in emlist if m in movlist] + hpc_options['dry'] = dry hpc_options['classifier'] = classifier hpc_options['missing'] = missing @@ -282,19 +286,25 @@ def solve(explist, *, glist: parse_movlist=None, movlist: parse_movlist=None, cl for c in eclist: hpc_options['c'] = c hpc_options['waitfor'] = None + if step == 0 or step == 1: + jid = antrax_hpc_job(e, 'solve', opts=hpc_options, solve_step=1) + hpc_options['waitfor'] = jid + if step == 0 or step == 2: + jid = antrax_hpc_job(e, 'solve', opts=hpc_options, solve_step=2) + hpc_options['waitfor'] = jid + if step == 0 or step == 3: + jid = antrax_hpc_job(e, 'solve', opts=hpc_options, solve_step=3) + else: + hpc_options['c'] = None + hpc_options['waitfor'] = None + if step == 0 or step == 1: jid = antrax_hpc_job(e, 'solve', opts=hpc_options, solve_step=1) hpc_options['waitfor'] = jid + if step == 0 or step == 2: jid = antrax_hpc_job(e, 'solve', opts=hpc_options, solve_step=2) hpc_options['waitfor'] = jid + if step == 0 or step == 3: jid = antrax_hpc_job(e, 'solve', opts=hpc_options, solve_step=3) - else: - hpc_options['c'] = None - hpc_options['waitfor'] = None - jid = antrax_hpc_job(e, 'solve', opts=hpc_options, solve_step=1) - hpc_options['waitfor'] = jid - jid = antrax_hpc_job(e, 'solve', opts=hpc_options, solve_step=2) - hpc_options['waitfor'] = jid - jid = antrax_hpc_job(e, 'solve', opts=hpc_options, solve_step=3) else: diff --git a/antrax/hpc.py b/antrax/hpc.py index 8d18a40..09b1fbb 100644 --- a/antrax/hpc.py +++ b/antrax/hpc.py @@ -259,6 +259,7 @@ def antrax_hpc_job(ex, step, opts, solve_step=None): print('Job number ' + str(jid) + ' was submitted') print('') else: + jid = 0 print('Dry run, no job submitted.') print('') diff --git a/bin/antrax_glnxa64_mcr_interface b/bin/antrax_glnxa64_mcr_interface index 3245e68..aa06866 100755 Binary files a/bin/antrax_glnxa64_mcr_interface and b/bin/antrax_glnxa64_mcr_interface differ diff --git a/bin/antrax_maci64_mcr_interface.app/Contents/MacOS/antrax_maci64_mcr_interface b/bin/antrax_maci64_mcr_interface.app/Contents/MacOS/antrax_maci64_mcr_interface index 1eab893..505da53 100755 Binary files a/bin/antrax_maci64_mcr_interface.app/Contents/MacOS/antrax_maci64_mcr_interface and b/bin/antrax_maci64_mcr_interface.app/Contents/MacOS/antrax_maci64_mcr_interface differ diff --git a/matlab/@tracklet/tracklet.m b/matlab/@tracklet/tracklet.m index b054149..c77ce31 100644 --- a/matlab/@tracklet/tracklet.m +++ b/matlab/@tracklet/tracklet.m @@ -741,8 +741,19 @@ function load_ids(trjs) if ~isfile(f) continue end + T = readtable(f); + % patch to a weird case when sometimes matlab doesnt + % understand the csv structure (GitHub issue #20) + if ~ismember('tracklet', T.Properties.VariableNames) + T = readtable(f,'Delimiter',','); + end + + if isempty(T) + return + end + ix = ismember(T.tracklet,mtrjnames); T = T(ix,:); diff --git a/matlab/@trgraph/solve.m b/matlab/@trgraph/solve.m index f14c6d8..a215686 100644 --- a/matlab/@trgraph/solve.m +++ b/matlab/@trgraph/solve.m @@ -519,7 +519,15 @@ function eliminate_cc(G,cc,id) for i=1:length(assigned_nodes) idix = find(G.assigned_ids(assigned_nodes(i),:)); for j=1:length(idix) - score = G.assignment_scores(assigned_nodes(i),idix(j)); + %try + score = G.assignment_scores(assigned_nodes(i),idix(j)); + %catch ME + % report('E','error in propagate_all') + % report('I',['node is ',num2str(assigned_nodes(i))]) + % report('I',['size of assignment scores is ',num2str(size(G.assignment_scores))]) + % report('I',['size of assignment ids is ',num2str(size(G.assigned_ids))]) + % rethrow(ME) + %end nij = propagate(G,assigned_nodes(i),idix(j),score); n = n + nij; end @@ -533,6 +541,8 @@ function eliminate_cc(G,cc,id) nnp=nn; report('I','Biconnected components condition (positive)') + +if ~isempty(G.pairs) G.pairs = G.pairs(argsort(G.pairs(:,3)),:); while true n=0; @@ -569,6 +579,7 @@ function eliminate_cc(G,cc,id) break end end +end if nn==nnp return diff --git a/matlab/@trgraph/trgraph.m b/matlab/@trgraph/trgraph.m index 2fd9271..53ff3ac 100644 --- a/matlab/@trgraph/trgraph.m +++ b/matlab/@trgraph/trgraph.m @@ -484,6 +484,7 @@ function filter_impossible_jumps(G) report('I','done distance mat'); sset = find(din>1 & ~ignore); + pairs = {}; for six=1:length(sset)%,G.NumWorkers) @@ -528,7 +529,9 @@ function filter_impossible_jumps(G) named_pairs(i).dist = pairs(i,3); end - pairs = pairs(argsort(pairs(:,3)),:); + if ~isempty(pairs) + pairs = pairs(argsort(pairs(:,3)),:); + end G.pairs = pairs; @@ -744,6 +747,7 @@ function set_data(G) if ~isempty(G.assigned_ids) GS(i).assigned_ids = G.assigned_ids(ix,:); GS(i).possible_ids = G.possible_ids(ix,:); + GS(i).assignment_scores = G.assignment_scores(ix,:); GS(i).finalized = G.finalized(ix,:); end GS(i).isopen = false;