Mercurial > repos > mvdbeek > igv_take_screenshots
changeset 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 | afb3f4c224d4 |
children | 9dca6aa224a2 |
files | igv_make_screenshots.xml xvfb_igv.py |
diffstat | 2 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/igv_make_screenshots.xml Mon Jul 03 11:42:19 2017 -0400 +++ b/igv_make_screenshots.xml Mon Jul 03 12:10:06 2017 -0400 @@ -17,7 +17,7 @@ cat load_session.txt '$script_file' '$exit_session' > igv_script.txt && ## gives the cluster a bit of time to actually create the symlinks ... ughs sleep 10s && - python $__tool_directory__/xvfb_igv.py igv_script.txt $width,$height && + python $__tool_directory__/xvfb_igv.py igv_script.txt '$igv_preferences' $width,$height && cp '$igv_session' '$igv_session_out' && zip screenshots.zip *.png && cp screenshots.zip '$screenshots_out' @@ -67,11 +67,13 @@ ]]></configfile> <configfile name="load_session"> load igv_session.xml -preference SAM.SHOW_SOFT_CLIPPED str($show_softclippped) </configfile> <configfile name="exit_session"> exit </configfile> + <configfile name="igv_preferences"> +SAM.SHOW_SOFT_CLIPPED=str($show_softclippped) + </configfile> </configfiles> <inputs> <repeat name="inputfiles" min="1" title="Add tracks">
--- a/xvfb_igv.py Mon Jul 03 11:42:19 2017 -0400 +++ b/xvfb_igv.py Mon Jul 03 12:10:06 2017 -0400 @@ -5,13 +5,13 @@ import xvfbwrapper -def take_screenshots(igv_script, screensize): +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', '--batch', igv_script], env=os.environ.copy()) + 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]) + take_screenshots(sys.argv[1], sys.argv[2], sys.argv[3])