How to use the refinem.plots.td_plots.TdPlots 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
if individual_plots:
                # GC plot
                gc_plots = GcPlots(plot_options)
                gc_plots.plot(genome_scaffold_stats, 
                                highlight_scaffolds_ids, 
                                link_scaffold_ids, 
                                gs.mean_gc, 
                                gc_dist, 
                                [plot_options.gc_perc])

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

                # 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,
github dparks1134 / RefineM / refinem / plots / distribution_plots.py View on Github external
axes_hist_TD = self.fig.add_subplot(223)
            axes_scatter_TD = self.fig.add_subplot(224)

        gc_plots = GcPlots(self.options)
        scatter, _, _, _ = gc_plots.plot_on_axes(self.fig,
                                                    genome_scaffold_stats,
                                                    highlight_scaffold_ids,
                                                    link_scaffold_ids,
                                                    genome_stats.mean_gc,
                                                    gc_dist,
                                                    [gc_perc],
                                                    axes_hist_GC,
                                                    axes_scatter_GC,
                                                    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,
github dparks1134 / RefineM / refinem / plots / combined_plots.py View on Github external
axes_tetra_pc1_pc3 = self.fig.add_subplot(236)

        # create plots
        gc_plots = GcPlots(self.options)
        scatter, delta_gc, seq_len, label_plot_order = gc_plots.plot_on_axes(self.fig,
                                                                    genome_scaffold_stats,
                                                                    highlight_scaffold_ids,
                                                                    link_scaffold_ids,
                                                                    genome_stats.mean_gc,
                                                                    gc_dist,
                                                                    [gc_perc],
                                                                    None,
                                                                    axes_gc_dist,
                                                                    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,