Skip to content

Commit

Permalink
Fix bug in formating error in validate command.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus1487 committed Oct 21, 2021
1 parent 5524a68 commit 305115c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions megalodon_extras/validate_compare_modified_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,16 @@ def compute_filt_mod_pct(
):
common_ctgs = set(samp1_cov).intersection(samp2_cov)
if len(common_ctgs) == 0:
samp1_ctg_str = ",".join(
[f"{chrm}:{strand}" for chrm, strand in sorted(samp1_cov)[:5]]
)
samp2_ctg_str = ",".join(
[f"{chrm}:{strand}" for chrm, strand in sorted(samp2_cov)[:5]]
)
LOGGER.error(
(
'No common contigs found between provided samples.\n\t"{}" '
+ 'first 5 contigs: {}\n\t"{}" first 5 contigs: {}'
).format(
samp_names[0],
",".join(sorted(list(samp1_cov.keys()))[:5]),
samp_names[1],
",".join(sorted(list(samp2_cov.keys()))[:5]),
)
"No common contigs found between provided samples.\n"
f'\t"{samp_names[0]}" first 5 contigs: {samp1_ctg_str}\n'
f'\t"{samp_names[1]}" first 5 contigs: {samp2_ctg_str}'
)
sys.exit(1)

Expand Down

0 comments on commit 305115c

Please sign in to comment.