From fc2f2a6978c187addde4a2a7389d194c71b2cd62 Mon Sep 17 00:00:00 2001 From: Haibao Tang Date: Fri, 9 Aug 2024 16:37:16 -0700 Subject: [PATCH] allow output file name to be specified --- jcvi/graphics/landscape.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/jcvi/graphics/landscape.py b/jcvi/graphics/landscape.py index 9d49a50e..8b39063f 100644 --- a/jcvi/graphics/landscape.py +++ b/jcvi/graphics/landscape.py @@ -560,6 +560,7 @@ def depth(args): action="store_true", help="Calculate genome coverage", ) + p.set_outfile("depth.pdf") opts, args, iopts = p.set_image_options(args, style="dark", figsize="14x4") if len(args) < 1: @@ -594,10 +595,7 @@ def depth(args): calculate_coverage=opts.calculate_coverage, ) - if npanels > 1: - pf = op.commonprefix(bedfiles) - pf = pf or "depth" - image_name = pf + "." + iopts.format + image_name = opts.outfile savefig(image_name, dpi=iopts.dpi, iopts=iopts)