Skip to content

Commit 3144ea1

Browse files
committed
better plot html, hopefully avoid paircluster crash
1 parent 124d5eb commit 3144ea1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

bin/compare-plotdirs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def compare_directories(args, plotdirlist, outdir):
5858
hlist = [allhists[dname].get(varname, Hist(1, 0, 1, title='null')) for dname in allhists]
5959
plot_single_variable(args, varname, hlist, outdir, pathnameclues=plotdirlist[0])
6060

61-
plotting.make_html(outdir, n_columns=4)
61+
plotting.make_html(outdir, n_columns=4, new_table_each_row=True)
6262

6363
# ----------------------------------------------------------------------------------------
6464
def plot_single_variable(args, varname, hlist, outdir, pathnameclues):
@@ -295,4 +295,4 @@ class MultiplyInheritedFormatter(argparse.RawTextHelpFormatter, argparse.Argumen
295295

296296
if args.make_parent_html: # didn't really test this very well
297297
fnoutstr, _ = utils.simplerun('find %s -type f -name *.svg' % args.outdir, return_out_err=True)
298-
plotting.make_html(args.outdir, fnames=[fnoutstr.strip().split('\n')])
298+
plotting.make_html(args.outdir, fnames=[fnoutstr.strip().split('\n')], new_table_each_row=True)

partis/paircluster.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,9 @@ def getpids(line): # return uids of all seqs paired with any seq in <line>
398398
n_skipped = {k : 0 for k in required_keys + ['zero-len-paired-uids', 'too-small']}
399399
unpaired_l_clusts = [c for c in l_part]
400400
for h_clust in h_part:
401+
if ':'.join(h_clust) not in h_atn_dict: # note sure if this really avoids it, and i wish i knew how it could be missing, but don't have time right now to track it down
402+
print(' %s cluster %s missing from h_atn_dict, skipping' % (utils.wrnstr(), ':'.join(h_clust)))
403+
continue
401404
h_atn = h_atn_dict[':'.join(h_clust)]
402405
h_pids = getpids(h_atn)
403406

0 commit comments

Comments
 (0)