From 06c12b0193a6d707aea185d8f0a6b48776bbb136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gordon=20J=2E=20K=C3=B6hn?= Date: Fri, 13 Sep 2024 14:23:28 +0200 Subject: [PATCH] logging for make_median_cov_hist --- scripts/amplicon_covs_click.py | 44 ++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/scripts/amplicon_covs_click.py b/scripts/amplicon_covs_click.py index e5fbba2..2d44ea9 100644 --- a/scripts/amplicon_covs_click.py +++ b/scripts/amplicon_covs_click.py @@ -336,18 +336,38 @@ def main( make_cov_heatmap(all_covs, os.path.join(outdir, "cov_heatmap.pdf")) - make_median_cov_hist(all_covs, os.path.join(outdir, "median_cov_hist.pdf")) - # make_median_coverage_barplot( - # all_covs, os.path.join(outdir, "median_coverage_barplot.pdf") - # ) - - # make_cov_heatmap(all_covs_frac, os.path.join(outdir, "cov_heatmap_norm.pdf")) - # make_median_cov_hist( - # all_covs_frac, os.path.join(outdir, "median_cov_hist_norm.pdf") - # ) - # make_median_coverage_barplot( - # all_covs_frac, os.path.join(outdir, "median_coverage_barplot_norm.pdf") - # ) + try: + make_median_cov_hist(all_covs, os.path.join(outdir, "median_cov_hist.pdf")) + except Exception as e: + click.echo(f"Error generating median_cov_hist plot: {str(e)}") + + try: + make_median_coverage_barplot( + all_covs, os.path.join(outdir, "median_coverage_barplot.pdf") + ) + except Exception as e: + click.echo(f"Error generating median_coverage_barplot plot: {str(e)}") + + try: + make_cov_heatmap( + all_covs_frac, os.path.join(outdir, "cov_heatmap_norm.pdf") + ) + except Exception as e: + click.echo(f"Error generating cov_heatmap_norm plot: {str(e)}") + + try: + make_median_cov_hist( + all_covs_frac, os.path.join(outdir, "median_cov_hist_norm.pdf") + ) + except Exception as e: + click.echo(f"Error generating median_cov_hist_norm plot: {str(e)}") + + try: + make_median_coverage_barplot( + all_covs_frac, os.path.join(outdir, "median_coverage_barplot_norm.pdf") + ) + except Exception as e: + click.echo(f"Error generating median_coverage_barplot_norm plot: {str(e)}") if __name__ == "__main__":