Mercurial > repos > mvdbeek > igv_take_screenshots
view 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 |
line wrap: on
line source
import os import subprocess import sys import xvfbwrapper def take_screenshots(igv_script, preferences_file, screensize): width, height = screensize.split(',') with xvfbwrapper.Xvfb(width=width, height=height) as xvfb: exit_code = subprocess.call(['igv', '-o', preferences_file, '--batch', igv_script], env=os.environ.copy()) sys.exit(exit_code) if __name__ == '__main__': take_screenshots(sys.argv[1], sys.argv[2], sys.argv[3])