comparison detection_viz.py @ 2:69218d7300e5 draft default tip

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/detection_viz/ commit 787ebcc8daa1834214bc92c201c921c704ef2d1f
author thomaswollmann
date Mon, 07 Jan 2019 04:56:28 -0500
parents f5f85c63737c
children
comparison
equal deleted inserted replaced
1:245a1cde4cd5 2:69218d7300e5
30 if fn is not None: 30 if fn is not None:
31 plot_circles(fn, ax, 'red', stroke_size, circle_radius) 31 plot_circles(fn, ax, 'red', stroke_size, circle_radius)
32 if fp is not None: 32 if fp is not None:
33 plot_circles(fp, ax, 'darkorange', stroke_size, circle_radius) 33 plot_circles(fp, ax, 'darkorange', stroke_size, circle_radius)
34 34
35 fig.canvas.print_png("tmp.png", dpi=1800) 35 fig.canvas.print_png(output_file, dpi=1800)
36 os.rename("tmp.png", output_file)
37 36
38 if __name__ == "__main__": 37 if __name__ == "__main__":
39 parser = argparse.ArgumentParser() 38 parser = argparse.ArgumentParser()
40 parser.add_argument('input_file', type=argparse.FileType('r'), help='original file') 39 parser.add_argument('input_file', type=argparse.FileType('r'), help='original file')
41 # output file should not be of type argparse.FileType('w') sine it is created immediately in this case which leads to an error in renaming 40 # output file should not be of type argparse.FileType('w') sine it is created immediately in this case which leads to an error in renaming