Mercurial > repos > mvdbeek > igv_take_screenshots
comparison xvfb_igv.py @ 11:64eb1ffd7872 draft
planemo upload for repository https://github.com/bardin-lab/readtagger/tree/master/galaxy commit 4824aeaa8107bd30ec786e8ca81779f053f0e736-dirty
author | mvdbeek |
---|---|
date | Mon, 03 Jul 2017 12:10:06 -0400 |
parents | d828cf6bff42 |
children | 1100d5a77c4d |
comparison
equal
deleted
inserted
replaced
10:afb3f4c224d4 | 11:64eb1ffd7872 |
---|---|
3 import sys | 3 import sys |
4 | 4 |
5 import xvfbwrapper | 5 import xvfbwrapper |
6 | 6 |
7 | 7 |
8 def take_screenshots(igv_script, screensize): | 8 def take_screenshots(igv_script, preferences_file, screensize): |
9 width, height = screensize.split(',') | 9 width, height = screensize.split(',') |
10 with xvfbwrapper.Xvfb(width=width, height=height) as xvfb: | 10 with xvfbwrapper.Xvfb(width=width, height=height) as xvfb: |
11 exit_code = subprocess.call(['igv', '--batch', igv_script], env=os.environ.copy()) | 11 exit_code = subprocess.call(['igv', '-o', preferences_file, '--batch', igv_script], env=os.environ.copy()) |
12 sys.exit(exit_code) | 12 sys.exit(exit_code) |
13 | 13 |
14 | 14 |
15 if __name__ == '__main__': | 15 if __name__ == '__main__': |
16 take_screenshots(sys.argv[1], sys.argv[2]) | 16 take_screenshots(sys.argv[1], sys.argv[2], sys.argv[3]) |
17 | 17 |