From b73abe82f3980ba8962acbb54ac1fe069882fac0 Mon Sep 17 00:00:00 2001 From: alexsweeten Date: Tue, 11 Jun 2024 11:41:15 -0400 Subject: [PATCH 1/6] bugfix small sequence errors --- src/moddotplot/moddotplot.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/moddotplot/moddotplot.py b/src/moddotplot/moddotplot.py index 08a16b5..3d3ec5b 100644 --- a/src/moddotplot/moddotplot.py +++ b/src/moddotplot/moddotplot.py @@ -818,9 +818,12 @@ def main(): if win < args.modimizer: args.modimizer = win - """raise ValueError( - "Window size must be greater than or equal to the modimizer sketch size" - )""" + if win < 10: + print(f"Error: sequence too small for analysis.\n") + print( + f"ModDotPlot requires a minimum window size of 10. Sequences less than 10Kbp will not work with ModDotPlot under normal resolution. We recommend rerunning ModDotPlot with --r {math.ceil(seq_length / 10)}.\n" + ) + sys.exit(0) seq_sparsity = round(win / args.modimizer) if seq_sparsity <= args.modimizer: @@ -1000,4 +1003,4 @@ def main(): if __name__ == "__main__": - main() + main() \ No newline at end of file From fbca37f80c8df0ac2416904563ba75ff8303c25e Mon Sep 17 00:00:00 2001 From: alexsweeten Date: Tue, 11 Jun 2024 14:10:20 -0400 Subject: [PATCH 2/6] Add features for axes ticks and limits --- README.md | 36 +++++++++------- src/moddotplot/estimate_identity.py | 32 +++++++------- src/moddotplot/moddotplot.py | 43 ++++++++++++------- src/moddotplot/static_plots.py | 65 ++++++++++++++++++++--------- 4 files changed, 114 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index b71e1f1..4c7be3e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ ![](images/logo.png) +- [Cite](#cite) - [About](#about) - [Installation](#installation) - [Usage](#usage) @@ -14,11 +15,20 @@ - [Sample run - comparing two sequences](#sample-run---comparing-two-sequences) - [Questions](#questions) - [Known Issues](#known-issues) -- [Cite](#cite) + + +## Cite + +Alexander P. Sweeten, Michael C. Schatz, Adam M. Phillippy, ModDotPlot - Rapid and interactive visualization of complex repeats +bioRxiv 2024.04.15.589623; doi: https://doi.org/10.1101/2024.04.15.589623 + +If you use ModDotPlot for your research, please cite our software! + +--- ## About -ModDotPlot is a novel dot plot visualization tool, similar to [StainedGlass](https://mrvollger.github.io/StainedGlass/). ModDotPlot utilizes modimizers to compute the [Containment Index](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-019-1841-x) between pairwise combinations of genomic intervals, and rapidly approximates their Average Nucleotide Identity. This significantly reduces the computational time required to produce these plots, enough to view multiple layers of resolution in real time! +ModDotPlot is a dot plot visualization tool meant for large sequences, and outputs a identity heatmap to [StainedGlass](https://mrvollger.github.io/StainedGlass/). ModDotPlot utilizes modimizers to compute the [Containment Index](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-019-1841-x) between pairwise combinations of genomic intervals, and rapidly approximates their Average Nucleotide Identity. This significantly reduces the computational time required to produce these plots, enough to view multiple layers of resolution in real time! ![](images/demo.gif) @@ -53,8 +63,6 @@ Finally, confirm that the installation was installed correctly by running `moddo | | | | (_) | (_| | | |__| | (_) | |_ | | | | (_) | |_ |_| |_|\___/ \__,_| |_____/ \___/ \__| |_| |_|\___/ \__| -v0.8.2 - usage: moddotplot [-h] {interactive,static} ... ModDotPlot: Visualization of Complex Repeat Structures @@ -79,7 +87,7 @@ ModDotPlot must be run either in `interactive` mode, or `static` mode: moddotplot interactive ``` -This will launch a [Dash application](https://plotly.com/dash/) on your machine's localhost. Open any web browser and go to `http://127.0.0.1:` to view the interactive plot. Running `Ctrl+C` on the command line will exit the Dash application. The default port number used by Dash is `8050`, but this can be customized using the `--port` command (see [interactive mode commands](#interactive-mode-commands) for further info). +This will launch a [Dash application](https://plotly.com/dash/) on your machine's localhost. Open any web browser and go to `http://127.0.0.1:` to view the interactive plot (this should happen automatically, but depending on your environment you might need to copy and paste this URL into your web browser). Running `Ctrl+C` on the command line will exit the Dash application. The default port number used by Dash is `8050`, but this can be customized using the `--port` command (see [interactive mode commands](#interactive-mode-commands) for further info). ### Static Mode @@ -217,6 +225,14 @@ List of custom colors in hexcode format can be entered sequentially, mapped from Add custom identity threshold breakpoints. Note that the number of breakpoints must be equal to the number of colors + 1. +`-t / --axes-ticks ` + +Custom tickmarks for x and y axis. Values outside of the axes-limits will not be shown. + +`-a / --axes-limits ` + +Change axis limits for x and y axis. Useful for comparing multiple plots, allowing them to stay in scale. + `--bin-freq ` By default, histograms are evenly spaced based on the number of colors and the identity threshold. Select this argument to bin based on the frequency of observed identity values. @@ -235,8 +251,6 @@ $ moddotplot interactive -f sequences/Chr1_cen.fa | | | | (_) | (_| | | |__| | (_) | |_ | | | | (_) | |_ |_| |_|\___/ \__,_| |_____/ \___/ \__| |_| |_|\___/ \__| -v0.8.2 - Running ModDotPlot in interactive mode Retrieving k-mers from Chr1:14000000-18000000.... @@ -362,7 +376,7 @@ Chr1_cen_plots/Chr1:14M-18M_TRI.png, Chr1_cen_plots/Chr1:14M-18M_TRI.pdf, Chr1_c ModDotPlot can produce an a vs. b style dotplot for each pairwise combination of input sequences. Use the `--compare` command line argument to include these plots. When running `--compare` in interactive mode, a dropdown menu will appear, allowing the user to switch between self-identity and pairwise plots. Note that a maximum of two sequences are allowed in interactive mode. If you want to skip the creation of self-identity plots, you can use `--compare-only`: ``` -moddotplot interactive -f sequences/chr14_segment.fa sequences/chr21_segment.fa --compare-only +moddotplot interactive -f sequences/chr15_segment.fa sequences/chr21_segment.fa --compare-only ``` --- @@ -385,9 +399,3 @@ For bug reports or general usage questions, please raise a GitHub issue, or emai --- - -## Cite - -Alexander P. Sweeten, Michael C. Schatz, Adam M. Phillippy, ModDotPlot - Rapid and interactive visualization of complex repeats -bioRxiv 2024.04.15.589623; doi: https://doi.org/10.1101/2024.04.15.589623 - diff --git a/src/moddotplot/estimate_identity.py b/src/moddotplot/estimate_identity.py index 0c38c62..293bd64 100644 --- a/src/moddotplot/estimate_identity.py +++ b/src/moddotplot/estimate_identity.py @@ -128,6 +128,7 @@ def partitionOverlaps( try: kmer_list.append(lst[delta_start_index:delta_end_index]) except Exception as e: + print("test") print(e) kmer_list.append(lst[delta_start_index:seq_len]) counter += win @@ -369,8 +370,7 @@ def pairwiseContainmentMatrix( Returns: np.ndarray: An identity matrix containing containment values. """ - # X is the larger, y is the smaller - n = len(mod_set_x) + n = max(len(mod_set_y), len(mod_set_x)) progress_thresholds = round(n / 77) if not supress_progress: @@ -382,20 +382,24 @@ def pairwiseContainmentMatrix( if w % progress_thresholds == 0: printProgressBar(w, n, prefix="Progress:", suffix="Complete", length=40) for q in range(n): - containment_matrix[w, q] = ( - binomial_distance( - containment_neighbors( - mod_set_x[q], - mod_set_y[w], - mod_set_x_neighbors[q], - mod_set_y_neighbors[w], - identity, + try: + containment_matrix[w, q] = ( + binomial_distance( + containment_neighbors( + mod_set_x[q], + mod_set_y[w], + mod_set_x_neighbors[q], + mod_set_y_neighbors[w], + identity, + k, + ), k, - ), - k, + ) + * 100.0 ) - * 100.0 - ) + # Bandaid solution for too sequences that are too small. + except IndexError as e: + pass if not supress_progress: printProgressBar( diff --git a/src/moddotplot/moddotplot.py b/src/moddotplot/moddotplot.py index 3d3ec5b..2344f04 100644 --- a/src/moddotplot/moddotplot.py +++ b/src/moddotplot/moddotplot.py @@ -276,14 +276,6 @@ def get_parser(): "--width", default=9, type=float, nargs="+", help="Plot width." ) - static_parser.add_argument( - "--xaxis", - default=None, - type=float, - nargs="+", - help="Change x axis for self identity plots. Default is length of the sequence, in mbp.", - ) - static_parser.add_argument("--dpi", default=600, type=int, help="Plot dpi.") # TODO: Create list of accepted colors. @@ -316,6 +308,22 @@ def get_parser(): help="Introduce custom color thresholds. Must be between identity threshold and 100.", ) + static_parser.add_argument( + "-a", + "--axes-limits", + default=None, + type=float, + help="Change x and y axis limits for self identity plots. Default is length of the sequence. Can't be shorter than length of sequence.", + ) + + static_parser.add_argument( + "-t", + "--axes-ticks", + default=None, + nargs="+", + help="Tick labels to include in x and y axis for custom plots.", + ) + static_parser.add_argument( "--bin-freq", action="store_true", @@ -402,13 +410,14 @@ def main(): args.no_plot = config.get("no_plot", args.no_plot) args.no_hist = config.get("no_hist", args.no_hist) args.width = config.get("width", args.width) - args.xaxis = config.get("xaxis", args.xaxis) + args.axes_limits = config.get("axes_limits", args.axes_limits) args.dpi = config.get("dpi", args.dpi) args.palette = config.get("palette", args.palette) args.palette_orientation = config.get( "palette_orientation", args.palette_orientation ) args.colors = config.get("color", args.colors) + args.axes_ticks = config.get("axes_ticks", args.axes_ticks) args.breakpoints = config.get("breakpoints", args.breakpoints) args.bin_freq = config.get("bin_freq", args.bin_freq) @@ -463,11 +472,12 @@ def main(): width=args.width, dpi=args.dpi, is_freq=args.bin_freq, - xlim=None, # TODO: Get xlim working + xlim=args.axes_limits, custom_colors=args.colors, custom_breakpoints=args.breakpoints, from_file=df, is_pairwise=False, + axes_labels=args.axes_ticks ) # Case 2: Pairwise bed file if len(pairwise_id_scores) > 1: @@ -482,11 +492,12 @@ def main(): width=args.width, dpi=args.dpi, is_freq=args.bin_freq, - xlim=None, # TODO: Get xlim working + xlim=args.axes_limits, # TODO: Get xlim working custom_colors=args.colors, custom_breakpoints=args.breakpoints, from_file=df, is_pairwise=True, + axes_labels=args.axes_ticks ) # Exit once all bed files have been iterated through sys.exit(0) @@ -833,11 +844,11 @@ def main(): expectation = round(win / seq_sparsity) xaxis = 0 width = 0 - if isinstance(args.xaxis, int) or args.xaxis == None: + '''if isinstance(args.xaxis, int) or args.xaxis == None: xaxis = args.xaxis else: assert len(args.xaxis) == len(sequences) - xaxis = args.xaxis[i] + xaxis = args.xaxis[i]''' if isinstance(args.width, int): width = args.width else: @@ -891,11 +902,12 @@ def main(): width=width, dpi=args.dpi, is_freq=args.bin_freq, - xlim=xaxis, + xlim=args.axes_limits, custom_colors=args.colors, custom_breakpoints=args.breakpoints, from_file=None, is_pairwise=False, + axes_labels=args.axes_ticks ) # -----------COMPUTE COMAPRATIVE PLOTS----------- @@ -994,11 +1006,12 @@ def main(): width=None, dpi=args.dpi, is_freq=args.bin_freq, - xlim=None, + xlim=args.axes_limits, custom_colors=args.colors, custom_breakpoints=args.breakpoints, from_file=None, is_pairwise=True, + axes_labels=args.axes_ticks ) diff --git a/src/moddotplot/static_plots.py b/src/moddotplot/static_plots.py index 67e84d0..61df485 100644 --- a/src/moddotplot/static_plots.py +++ b/src/moddotplot/static_plots.py @@ -46,12 +46,23 @@ def check_st_en_equality(df): def make_k(vals): - return format(vals / 1e3, ",") + return [number / 1000 for number in vals] +def make_m(vals): + return [number / 1e6 for number in vals] -def make_scale(vals: list) -> str: - scaled = [number / 1000000 for number in vals] - return scaled +def make_g(vals): + return [number / 1e9 for number in vals] + + +def make_scale(vals: list) -> list: + scaled = [number for number in vals] + if scaled[-1] < 100000: + return make_k(scaled) + elif scaled[-1] > 100000000: + return make_g(scaled) + else: + return make_m(scaled) def get_colors(sdf, ncolors, is_freq, custom_breakpoints): @@ -155,7 +166,15 @@ def read_df( return df -def make_dot(sdf, title_name, palette, palette_orientation, colors): +def make_dot(sdf, title_name, palette, palette_orientation, colors, breaks, xlim): + if not breaks: + breaks = True + else: + breaks = [float(number) for number in breaks] + if not xlim: + xlim = 0 + else: + breaks = [float(number) for number in breaks] hexcodes = [] new_hexcodes = [] if palette in DIVERGING_PALETTES: @@ -182,9 +201,9 @@ def make_dot(sdf, title_name, palette, palette_orientation, colors): new_hexcodes = hexcodes if colors: new_hexcodes = colors - max_val = max(sdf["q_en"].max(), sdf["r_en"].max()) + max_val = max(sdf["q_en"].max(), sdf["r_en"].max(), xlim) window = max(sdf["q_en"] - sdf["q_st"]) - print(window) + print(max_val) p = ( ggplot(sdf) + geom_tile( @@ -203,15 +222,15 @@ def make_dot(sdf, title_name, palette, palette_orientation, colors): panel_background=element_blank(), axis_line=element_line(color="black"), # Adjust axis line size axis_text=element_text( - family=["DejaVu Sans"] + family=["Dejavu Sans"] ), # Change axis text font and size axis_ticks_major=element_line(), title=element_text( - family=["DejaVu Sans"], # Change title font family + family=["Dejavu Sans"], # Change title font family ), ) - + scale_x_continuous(labels=make_scale, limits=[0, max_val]) - + scale_y_continuous(labels=make_scale, limits=[0, max_val]) + + scale_x_continuous(labels=make_scale, limits=[0, max_val], breaks=breaks) + + scale_y_continuous(labels=make_scale, limits=[0, max_val], breaks=breaks) + coord_fixed(ratio=1) + facet_grid("r ~ q") + labs(x="Genomic Position (Mbp)", y="", title=title_name) @@ -223,7 +242,13 @@ def make_dot(sdf, title_name, palette, palette_orientation, colors): return p -def make_tri(sdf, title_name, palette, palette_orientation, colors): +def make_tri(sdf, title_name, palette, palette_orientation, colors, breaks, xlim): + if not breaks: + breaks = True + else: + breaks = [float(number) for number in breaks] + if not xlim: + xlim = 0 hexcodes = [] new_hexcodes = [] if palette in DIVERGING_PALETTES: @@ -250,7 +275,7 @@ def make_tri(sdf, title_name, palette, palette_orientation, colors): new_hexcodes = hexcodes if colors: new_hexcodes = colors - max_val = max(sdf["q_en"].max(), sdf["r_en"].max()) + max_val = max(sdf["q_en"].max(), sdf["r_en"].max(), xlim) window = max(sdf["q_en"] - sdf["q_st"]) p = ( ggplot(sdf) @@ -277,8 +302,8 @@ def make_tri(sdf, title_name, palette, palette_orientation, colors): family=["DejaVu Sans"], # Change title font family ), ) - + scale_x_continuous(labels=make_scale, limits=[0, max_val]) - + scale_y_continuous(labels=make_scale, limits=[0, max_val]) + + scale_x_continuous(labels=make_scale, limits=[0, max_val], breaks=breaks) + + scale_y_continuous(labels=make_scale, limits=[0, max_val], breaks=breaks) + coord_fixed(ratio=1) + facet_grid("r ~ q") + labs(x="Genomic Position (Mbp)", y="", title=title_name) @@ -356,6 +381,7 @@ def create_plots( custom_breakpoints, from_file, is_pairwise, + axes_labels ): # TODO: Implement xlim df = read_df( @@ -376,10 +402,10 @@ def create_plots( sdf, palette, palette_orientation, custom_colors, custom_breakpoints ) + print(xlim) if is_pairwise: - print(width) heatmap = make_dot( - sdf, plot_filename, palette, palette_orientation, custom_colors + sdf, plot_filename, palette, palette_orientation, custom_colors, axes_labels, xlim ) print(f"Creating plots and saving to {plot_filename}...\n") ggsave( @@ -426,9 +452,8 @@ def create_plots( ) # Self-identity plots: Output _TRI, _FULL, and _HIST else: - print(width) tri_plot = make_tri( - sdf, plot_filename, palette, palette_orientation, custom_colors + sdf, plot_filename, palette, palette_orientation, custom_colors, axes_labels, xlim ) full_plot = make_dot( check_st_en_equality(sdf), @@ -436,6 +461,8 @@ def create_plots( palette, palette_orientation, custom_colors, + axes_labels, + xlim ) print(f"Creating plots and saving to {plot_filename}...\n") From 56db5a8bc1b8088ae9992034fc80d1a23651170a Mon Sep 17 00:00:00 2001 From: alexsweeten Date: Tue, 11 Jun 2024 14:12:03 -0400 Subject: [PATCH 3/6] bump version --- README.md | 5 ----- pyproject.toml | 2 +- src/moddotplot/const.py | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4c7be3e..cb35f38 100644 --- a/README.md +++ b/README.md @@ -337,8 +337,6 @@ $ moddotplot static -c config/config.json | | | | (_) | (_| | | |__| | (_) | |_ | | | | (_) | |_ |_| |_|\___/ \__,_| |_____/ \___/ \__| |_| |_|\___/ \__| -v0.8.2 - Running ModDotPlot in static mode Retrieving k-mers from Chr1:14M-18M.... @@ -396,6 +394,3 @@ For bug reports or general usage questions, please raise a GitHub issue, or emai - If you encounter an error with the following traceback: `rv = reductor(4) TypeError: cannot pickle 'generator' object`, ths means that you have a newer version of Plotnine that is incompatible with ModDotPlot. Please uninstall plotnine and reinstall version 0.12.4 `pip install plotnine==0.12.4`. - In interactive mode, comparing sequences of two sizes will lead to errors in zooming for the larger sequence. I plan to fix this in v0.9.0. - ---- - diff --git a/pyproject.toml b/pyproject.toml index 76d5100..193bc8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "ModDotPlot" -version = "0.8.2" +version = "0.8.3" requires-python = ">= 3.7" dependencies = [ "pysam", diff --git a/src/moddotplot/const.py b/src/moddotplot/const.py index d36002c..d918332 100644 --- a/src/moddotplot/const.py +++ b/src/moddotplot/const.py @@ -1,4 +1,4 @@ -VERSION = "0.8.2" +VERSION = "0.8.3" COLS = [ "#query_name", "query_start", From 14dde915af36a2e4628363053fe29e87135eefaa Mon Sep 17 00:00:00 2001 From: alexsweeten Date: Tue, 11 Jun 2024 14:16:51 -0400 Subject: [PATCH 4/6] update README about --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cb35f38..94d56e9 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ If you use ModDotPlot for your research, please cite our software! ## About -ModDotPlot is a dot plot visualization tool meant for large sequences, and outputs a identity heatmap to [StainedGlass](https://mrvollger.github.io/StainedGlass/). ModDotPlot utilizes modimizers to compute the [Containment Index](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-019-1841-x) between pairwise combinations of genomic intervals, and rapidly approximates their Average Nucleotide Identity. This significantly reduces the computational time required to produce these plots, enough to view multiple layers of resolution in real time! +ModDotPlot is a dot plot visualization tool designed for large sequences and whole genomes. ModDotPlot outputs an identity heatmap similar to [StainedGlass](https://mrvollger.github.io/StainedGlass/) by rapidly approximating the Average Nucleotide Identity between pairwise combinations of genomic intervals. This significantly reduces the computational time required to produce these plots, enough to view multiple layers of resolution in real time! ![](images/demo.gif) From 49d91de93ca5e23d8b6a78e672fa828682807ad9 Mon Sep 17 00:00:00 2001 From: alexsweeten Date: Tue, 11 Jun 2024 14:18:45 -0400 Subject: [PATCH 5/6] Reformat black --- src/moddotplot/moddotplot.py | 14 +++++++------- src/moddotplot/static_plots.py | 22 ++++++++++++++++++---- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/moddotplot/moddotplot.py b/src/moddotplot/moddotplot.py index 2344f04..91a9d11 100644 --- a/src/moddotplot/moddotplot.py +++ b/src/moddotplot/moddotplot.py @@ -477,7 +477,7 @@ def main(): custom_breakpoints=args.breakpoints, from_file=df, is_pairwise=False, - axes_labels=args.axes_ticks + axes_labels=args.axes_ticks, ) # Case 2: Pairwise bed file if len(pairwise_id_scores) > 1: @@ -497,7 +497,7 @@ def main(): custom_breakpoints=args.breakpoints, from_file=df, is_pairwise=True, - axes_labels=args.axes_ticks + axes_labels=args.axes_ticks, ) # Exit once all bed files have been iterated through sys.exit(0) @@ -844,11 +844,11 @@ def main(): expectation = round(win / seq_sparsity) xaxis = 0 width = 0 - '''if isinstance(args.xaxis, int) or args.xaxis == None: + """if isinstance(args.xaxis, int) or args.xaxis == None: xaxis = args.xaxis else: assert len(args.xaxis) == len(sequences) - xaxis = args.xaxis[i]''' + xaxis = args.xaxis[i]""" if isinstance(args.width, int): width = args.width else: @@ -907,7 +907,7 @@ def main(): custom_breakpoints=args.breakpoints, from_file=None, is_pairwise=False, - axes_labels=args.axes_ticks + axes_labels=args.axes_ticks, ) # -----------COMPUTE COMAPRATIVE PLOTS----------- @@ -1011,9 +1011,9 @@ def main(): custom_breakpoints=args.breakpoints, from_file=None, is_pairwise=True, - axes_labels=args.axes_ticks + axes_labels=args.axes_ticks, ) if __name__ == "__main__": - main() \ No newline at end of file + main() diff --git a/src/moddotplot/static_plots.py b/src/moddotplot/static_plots.py index 61df485..5ed5330 100644 --- a/src/moddotplot/static_plots.py +++ b/src/moddotplot/static_plots.py @@ -48,9 +48,11 @@ def check_st_en_equality(df): def make_k(vals): return [number / 1000 for number in vals] + def make_m(vals): return [number / 1e6 for number in vals] + def make_g(vals): return [number / 1e9 for number in vals] @@ -381,7 +383,7 @@ def create_plots( custom_breakpoints, from_file, is_pairwise, - axes_labels + axes_labels, ): # TODO: Implement xlim df = read_df( @@ -405,7 +407,13 @@ def create_plots( print(xlim) if is_pairwise: heatmap = make_dot( - sdf, plot_filename, palette, palette_orientation, custom_colors, axes_labels, xlim + sdf, + plot_filename, + palette, + palette_orientation, + custom_colors, + axes_labels, + xlim, ) print(f"Creating plots and saving to {plot_filename}...\n") ggsave( @@ -453,7 +461,13 @@ def create_plots( # Self-identity plots: Output _TRI, _FULL, and _HIST else: tri_plot = make_tri( - sdf, plot_filename, palette, palette_orientation, custom_colors, axes_labels, xlim + sdf, + plot_filename, + palette, + palette_orientation, + custom_colors, + axes_labels, + xlim, ) full_plot = make_dot( check_st_en_equality(sdf), @@ -462,7 +476,7 @@ def create_plots( palette_orientation, custom_colors, axes_labels, - xlim + xlim, ) print(f"Creating plots and saving to {plot_filename}...\n") From 32e9d64182700fea8846c76fe0d409cd4edeb429 Mon Sep 17 00:00:00 2001 From: alexsweeten Date: Tue, 11 Jun 2024 14:30:31 -0400 Subject: [PATCH 6/6] Remove print statement --- src/moddotplot/static_plots.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/moddotplot/static_plots.py b/src/moddotplot/static_plots.py index 5ed5330..55ab85a 100644 --- a/src/moddotplot/static_plots.py +++ b/src/moddotplot/static_plots.py @@ -205,7 +205,6 @@ def make_dot(sdf, title_name, palette, palette_orientation, colors, breaks, xlim new_hexcodes = colors max_val = max(sdf["q_en"].max(), sdf["r_en"].max(), xlim) window = max(sdf["q_en"] - sdf["q_st"]) - print(max_val) p = ( ggplot(sdf) + geom_tile(