Skip to content

Commit

Permalink
allow output file name to be specified
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaibao committed Aug 9, 2024
1 parent ea3ed85 commit fc2f2a6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions jcvi/graphics/landscape.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)


Expand Down

0 comments on commit fc2f2a6

Please sign in to comment.