From 7f451a7c3188a83ef2eb653873f64494b2a5d931 Mon Sep 17 00:00:00 2001 From: Lucille Delisle Date: Thu, 26 Mar 2020 17:21:08 +0100 Subject: [PATCH 1/3] add default values in the help of each argument --- pygenometracks/plotTracks.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pygenometracks/plotTracks.py b/pygenometracks/plotTracks.py index f29669b0..68cc7050 100644 --- a/pygenometracks/plotTracks.py +++ b/pygenometracks/plotTracks.py @@ -189,7 +189,7 @@ def parse_arguments(args=None): ) parser.add_argument('--width', - help='figure width in centimeters', + help='figure width in centimeters (default is {})'.format(DEFAULT_FIGURE_WIDTH), type=float, default=DEFAULT_FIGURE_WIDTH) @@ -209,13 +209,12 @@ def parse_arguments(args=None): required=True) parser.add_argument('--fontSize', - help='Font size for the labels of the plot', - type=float, - ) + help='Font size for the labels of the plot (default is 0.3 * figure width)', + type=float) parser.add_argument('--dpi', help='Resolution for the image in case the' - ' ouput is a raster graphics image (e.g png, jpg)', + ' ouput is a raster graphics image (e.g png, jpg) (default is 72)', type=int, default=72 ) From 7a92d8af82fb37be09d37bcc541b8696d2a1c6d0 Mon Sep 17 00:00:00 2001 From: Lucille Delisle Date: Thu, 26 Mar 2020 17:21:37 +0100 Subject: [PATCH 2/3] remove unused constants --- pygenometracks/plotTracks.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pygenometracks/plotTracks.py b/pygenometracks/plotTracks.py index 68cc7050..0c076eff 100644 --- a/pygenometracks/plotTracks.py +++ b/pygenometracks/plotTracks.py @@ -150,15 +150,7 @@ from pygenometracks._version import __version__ from .utilities import InputError -DEFAULT_BED_COLOR = '#1f78b4' -DEFAULT_BIGWIG_COLOR = '#33a02c' -DEFAULT_BEDGRAPH_COLOR = '#a6cee3' -DEFAULT_MATRIX_COLORMAP = 'RdYlBu_r' -DEFAULT_TRACK_HEIGHT = 3 # in centimeters DEFAULT_FIGURE_WIDTH = 40 # in centimeters -# proportion of width dedicated to (figure, legends) -# DEFAULT_WIDTH_RATIOS = (0.95, 0.05) -DEFAULT_MARGINS = {'left': 0.04, 'right': 0.92, 'bottom': 0.12, 'top': 0.9} def parse_arguments(args=None): From ecdf80dc128490d212121b97f8f7def16fe28cc0 Mon Sep 17 00:00:00 2001 From: Lucille Delisle Date: Thu, 26 Mar 2020 17:22:47 +0100 Subject: [PATCH 3/3] update readme --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 92cfdb6e..397f6411 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ optional arguments: plot, in BED format, can be given. If this is the case, multiple files will be created using a prefix the value of --outFileName - --width WIDTH figure width in centimeters + --width WIDTH figure width in centimeters (default is 40) --height HEIGHT Figure height in centimeters. If not given, the figure height is computed based on the heights of the tracks. If given, the track height are proportionally scaled @@ -100,9 +100,10 @@ optional arguments: --outFileName OUTFILENAME, -out OUTFILENAME File name to save the image, file prefix in case multiple images are stored - --fontSize FONTSIZE Font size for the labels of the plot + --fontSize FONTSIZE Font size for the labels of the plot (default is 0.3 * + figure width) --dpi DPI Resolution for the image in case the ouput is a raster - graphics image (e.g png, jpg) + graphics image (e.g png, jpg) (default is 72) --trackLabelFraction TRACKLABELFRACTION By default the space dedicated to the track labels is 0.05 of the plot width. This fraction can be changed