How to use the refinem.plots.cov_perc_plots.CovPercPlots function in refinem

To help you get started, we’ve selected a few refinem examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dparks1134 / RefineM / refinem / outliers.py View on Github external
# TD plot
                td_plots = TdPlots(plot_options)
                td_plots.plot(genome_scaffold_stats, 
                                highlight_scaffolds_ids, 
                                link_scaffold_ids, 
                                gs.mean_signature, 
                                td_dist, 
                                [plot_options.td_perc])

                output_plot = os.path.join(output_dir, genome_id + '.td_plots.' + plot_options.image_type)
                td_plots.save_plot(output_plot, dpi=plot_options.dpi)
                td_plots.save_html(os.path.join(output_dir, genome_id + '.td_plots.html'))

                # mean absolute deviation of coverage profiles
                if len(gs.mean_coverage) >= 1:
                    cov_perc_plots = CovPercPlots(plot_options)
                    cov_perc_plots.plot(genome_scaffold_stats, 
                                            highlight_scaffolds_ids, 
                                            link_scaffold_ids, 
                                            gs.mean_coverage, 
                                            [plot_options.cov_perc])

                    output_plot = os.path.join(output_dir, genome_id + '.cov_perc.' + plot_options.image_type)
                    cov_perc_plots.save_plot(output_plot, dpi=plot_options.dpi)
                    cov_perc_plots.save_html(os.path.join(output_dir, genome_id + '.cov_perc.html'))

                # coverage correlation plots
                if len(gs.mean_coverage) > 1:
                    cov_corr_plots = CovCorrPlots(plot_options)
                    cov_corr_plots.plot(genome_scaffold_stats, 
                                            highlight_scaffolds_ids, 
                                            gs.mean_coverage,
github dparks1134 / RefineM / refinem / plots / combined_plots.py View on Github external
True)
                                                                                                     
        td_plots = TdPlots(self.options)
        _scatter, td, _, _ = td_plots.plot_on_axes(self.fig,
                                                    genome_scaffold_stats,
                                                    highlight_scaffold_ids,
                                                    link_scaffold_ids,
                                                    genome_stats.mean_signature,
                                                    td_dist,
                                                    [td_perc],
                                                    None,
                                                    axes_tetra_dist,
                                                    True)
                                
        if len(genome_stats.mean_coverage) >= 1:
            cov_per_plots = CovPercPlots(self.options)
            cov_per_plots.plot_on_axes(self.fig,
                                        genome_scaffold_stats,
                                        highlight_scaffold_ids,
                                        link_scaffold_ids,
                                        genome_stats.mean_coverage,
                                        [cov_perc],
                                        None,
                                        axes_coverage_dist,
                                        True)
                             
        if len(genome_stats.mean_coverage) >= 1:
            gc_cov_plot = GcCovPlot(self.options)
            _, gc, cov, _ = gc_cov_plot.plot_on_axes(self.fig,
                                                                     genome_scaffold_stats,
                                                                     highlight_scaffold_ids,
                                                                     link_scaffold_ids,
github dparks1134 / RefineM / refinem / plots / distribution_plots.py View on Github external
True)

        td_plots = TdPlots(self.options)
        td_plots.plot_on_axes(self.fig,
                                genome_scaffold_stats,
                                highlight_scaffold_ids,
                                link_scaffold_ids,
                                genome_stats.mean_signature,
                                td_dist,
                                [td_perc],
                                axes_hist_TD,
                                axes_scatter_TD,
                                True)

        if len(genome_stats.mean_coverage) >= 1:
            cov_per_plots = CovPercPlots(self.options)
            cov_per_plots.plot_on_axes(self.fig,
                                    genome_scaffold_stats,
                                    highlight_scaffold_ids,
                                    link_scaffold_ids,
                                    genome_stats.mean_coverage,
                                    [cov_perc],
                                    axes_hist_cov_perc,
                                    axes_scatter_cov_perc,
                                    True)

        mpld3.plugins.connect(self.fig, LinkedBrush(scatter))

        self.fig.tight_layout(pad=1.0, w_pad=0.1, h_pad=0.1)
        self.draw()