def _add_scatter_plot(out, data): out_file = "%s-scatter.pdf" % os.path.splitext(out["cnr"])[0] priority_regions = dd.get_priority_regions(data) if not priority_regions: return None priority_bed = plot._prioritize_plot_regions(pybedtools.BedTool(priority_regions), data) if utils.file_exists(out_file): return out_file cnr = _remove_haplotype_chroms(out["cnr"], data) cns = _remove_haplotype_chroms(out["cns"], data) with file_transaction(data, out_file) as tx_out_file: cmd = [_get_cmd(), "scatter", "-s", cns, "-o", tx_out_file, "-l", priority_bed, cnr] do.run(cmd, "CNVkit scatter plot") return out_file
def _add_scatter_plot(out, data): out_file = "%s-scatter.pdf" % os.path.splitext(out["cnr"])[0] priority_bed = dd.get_svprioritize(data) if not priority_bed: return None priority_bed = plot._prioritize_plot_regions(pybedtools.BedTool(priority_bed), data, os.path.dirname(out_file)) if utils.file_exists(out_file): return out_file cnr = _remove_haplotype_chroms(out["cnr"], data) cns = _remove_haplotype_chroms(out["cns"], data) with file_transaction(data, out_file) as tx_out_file: cmd = [_get_cmd(), "scatter", "-s", cns, "-o", tx_out_file, "-l", priority_bed, cnr] do.run(_prep_cmd(cmd, tx_out_file), "CNVkit scatter plot") return out_file
def _add_scatter_plot(out, data): out_file = os.path.join(_sv_workdir(data), os.path.splitext(os.path.basename(out["cnr"]))[0] + "-scatter.pdf") priority_bed = dd.get_svprioritize(data) if not priority_bed: return None priority_bed = plot._prioritize_plot_regions(pybedtools.BedTool(priority_bed), data, os.path.dirname(out_file)) if utils.file_exists(out_file): return out_file cnr = _remove_haplotype_chroms(out["cnr"], data) cns = _remove_haplotype_chroms(out["cns"], data) with file_transaction(data, out_file) as tx_out_file: cmd = [_get_cmd(), "scatter", "-s", cns, "-o", tx_out_file, "-l", priority_bed, cnr] do.run(_prep_cmd(cmd, tx_out_file), "CNVkit scatter plot") return out_file