Example #1
0
def make_plot(args, names):
    plots = []
    if args.plot_type == 'compare-mean-boxplot':
        plots.append(compare_mean_boxplot(LOCUS, INTERVAL, args.intervals,
            args.loci, names, args.top))
    elif args.plot_type == 'compare-sum-barplot':
        plots.append(compare_sum_barplot(LOCUS, INTERVAL, args.intervals,
            args.loci, names, args.top))
    plotter = tapir.rfunctions.setup_plotter(args.output, tapir.get_output_type(args.output),
            args.width, args.height, "in", args.dpi)
    for plot in plots:
        plot.plot()
    plotter.dev_off()
Example #2
0
def make_plot(args):
    plots = []
    if args.plot_type == 'pi-locus' and args.loci is not None:
        for locus in args.loci:
            plots.append(single_locus_net_informativeness(LOCUS, PI, locus))
    elif args.plot_type == 'pi-facet' and \
            args.loci is not None:
        plots.append(multiple_locus_net_informativeness_facet(LOCUS, PI,
            args.loci))
    elif args.plot_type == 'pi-scatterplot' and \
            args.loci is not None:
        plots.append(multiple_locus_net_informativeness_scatterplot(LOCUS, PI,
            args.loci))
    elif args.plot_type == 'pi-interval-boxplot' and args.intervals is not None:
        plots.append(interval(LOCUS, INTERVAL, args.intervals, args.loci))
    elif args.plot_type == 'pi-interval-barplot' and args.intervals is not None:
        plots.append(interval(LOCUS, INTERVAL, args.intervals, args.loci,
            boxplot = False))

    plotter = tapir.rfunctions.setup_plotter(args.output, tapir.get_output_type(args.output),
            args.width, args.height, "in", args.dpi)
    for plot in plots:
        plot.plot()
    plotter.dev_off()