annotate output_report.py @ 0:76733d05d8ef draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
author iuc
date Sat, 28 Nov 2020 13:45:34 +0000
parents
children 639d2031d998
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
1 """ Produces plots and a summary html 'headless' """
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
2 import logging
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
3 import os
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
4
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
5 import matplotlib
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
6 import matplotlib.pyplot as ppl
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
7 import spyboat.plotting as spyplot
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
8
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
9 ppl.switch_backend('Agg')
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
10 matplotlib.rcParams["text.usetex"] = False
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
11 logger = logging.getLogger(__name__)
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
12
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
13 # figure resolution
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
14 DPI = 250
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
15
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
16
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
17 def produce_snapshots(input_movie, results, frame, Wkwargs, img_path="."):
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
18 """
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
19 Takes the *input_movie* and the *results* dictionary
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
20 from spyboat.processing.run_parallel and produces phase,
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
21 period and amplitude snapshot png's.
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
22
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
23 For the period snapshot also the period range is needed,
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
24 hence the analysis dictionary 'Wkwargs' also gets passed.
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
25
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
26 The output files name pattern is:
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
27 [input, phase, period, amplitude]_frame{frame}.png
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
28 and the storage location in *img_path*.
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
29
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
30 These get picked up by 'create_html'
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
31 """
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
32
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
33 spyplot.input_snapshot(input_movie[frame])
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
34 fig = ppl.gcf()
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
35 out_path = os.path.join(img_path, f"input_frame{frame}.png")
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
36 fig.savefig(out_path, dpi=DPI)
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
37 ppl.close(fig)
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
38
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
39 spyplot.phase_snapshot(results["phase"][frame])
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
40 fig = ppl.gcf()
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
41 out_path = os.path.join(img_path, f"phase_frame{frame}.png")
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
42 fig.savefig(out_path, dpi=DPI)
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
43 ppl.close(fig)
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
44
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
45 spyplot.period_snapshot(
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
46 results["period"][frame], Wkwargs["Tmin"],
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
47 Wkwargs["Tmax"], time_unit="a.u."
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
48 )
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
49
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
50 fig = ppl.gcf()
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
51 out_path = os.path.join(img_path, f"period_frame{frame}.png")
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
52 fig.savefig(out_path, dpi=DPI)
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
53 ppl.close(fig)
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
54
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
55 spyplot.amplitude_snapshot(results["amplitude"][frame])
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
56 fig = ppl.gcf()
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
57 out_path = os.path.join(img_path, f"amplitude_frame{frame}.png")
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
58 fig.savefig(out_path, dpi=DPI)
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
59 ppl.close(fig)
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
60
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
61 logger.info(f"Produced 4 snapshots for frame {frame}..")
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
62
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
63
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
64 def produce_distr_plots(results, Wkwargs, img_path="."):
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
65 """
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
66 Output file names are:
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
67
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
68 period_distr.png, power_distr.png and phase_distr.png
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
69 """
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
70
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
71 spyplot.period_distr_dynamics(results["period"], Wkwargs)
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
72 fig = ppl.gcf()
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
73 out_path = os.path.join(img_path, "period_distr.png")
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
74 fig.savefig(out_path, dpi=DPI)
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
75
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
76 spyplot.power_distr_dynamics(results["power"], Wkwargs)
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
77 fig = ppl.gcf()
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
78 out_path = os.path.join(img_path, "power_distr.png")
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
79 fig.savefig(out_path, dpi=DPI)
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
80
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
81 spyplot.phase_coherence_dynamics(results["phase"], Wkwargs)
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
82 fig = ppl.gcf()
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
83 out_path = os.path.join(img_path, "phase_distr.png")
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
84 fig.savefig(out_path, dpi=DPI)
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
85
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
86 logger.info("Produced 3 distribution plots..")
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
87
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
88
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
89 def create_html(frame_nums, html_fname="OutputReport.html"):
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
90 """
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
91 The html generated assumes the respective png's
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
92 have been created with 'produce_snapshots' and 'produce_distr_plots'
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
93 and can be found at the cwd (that's how Galaxy works..)
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
94 """
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
95
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
96 # -- create a gallery for every frame in frame_nums --
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
97
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
98 galleries = ""
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
99 for frame_num in frame_nums:
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
100 new_gal = f"""
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
101 <div class="FrameSlides">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
102 <h3 style="text-align:center; color=#363333">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
103 Frame Nr. {frame_num} </h3>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
104
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
105 <div class="snapshot_gallery">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
106
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
107 <figure class=”snapshot_gallery__item
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
108 snapshot_gallery__item--1">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
109 <img src="input_frame{frame_num}.png" alt="The Input"
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
110 class="snapshot_gallery__img">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
111 </figure>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
112
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
113 <figure class=”snapshot_gallery__item
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
114 snapshot_gallery__item--2">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
115 <img src="phase_frame{frame_num}.png" alt="Phase"
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
116 class="snapshot_gallery__img">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
117 </figure>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
118
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
119 <figure class=”snapshot_gallery__item
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
120 snapshot_gallery__item--3">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
121 <img src="period_frame{frame_num}.png"
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
122 alt="Period" class="snapshot_gallery__img">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
123 </figure>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
124
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
125 <figure class=”snapshot_gallery__item
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
126 snapshot_gallery__item--4">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
127 <img src="amplitude_frame{frame_num}.png"
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
128 alt="Amplitude" class="snapshot_gallery__img">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
129 </figure>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
130 </div>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
131 </div>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
132 """
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
133 galleries += new_gal
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
134
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
135 html_string = f"""
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
136 <html>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
137 <!-- this file got automatically created by 'output_report.py' -->
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
138 <title>SpyBOAT Output Report</title>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
139 <head>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
140 <!-- that doesn't work with galaxy.. -->
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
141 <!--link rel="stylesheet" href="styles.css"-->
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
142 <style type="text/css">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
143 body{{ margin:10 100; background:whitesmoke; }}
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
144 /*body{{ margin:10 100; background:darkslategrey; }}*/
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
145 .center{{
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
146 text-align: center;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
147 display: block;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
148 margin-left: auto;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
149 margin-right: auto;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
150 width: 100%;}}
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
151
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
152 /* matplotlib output at 1600x1200 */
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
153 .distr_gallery {{
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
154 display: grid;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
155 margin: 0 auto;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
156 text-align: center;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
157 /* border: 1px dashed rgba(4, 4, 4, 0.35); */
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
158 grid-template-columns: repeat(3,1fr);
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
159 grid-template-rows: 20vw;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
160 grid-gap: 0px;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
161 column-gap: 0px
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
162 }}
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
163 .distr_gallery__img {{
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
164 width: 100%;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
165 height: 100%;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
166 object-fit: contain;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
167 }}
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
168
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
169
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
170 /* matplotlib output at 1600x1200 */
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
171 .snapshot_gallery {{
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
172 display: grid;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
173 margin: 0 auto;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
174 border: 1px dashed rgba(4, 4, 4, 0.35);
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
175 text-align: center;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
176 grid-template-columns: repeat(2,1fr);
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
177 grid-template-rows: repeat(2,20vw);
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
178 grid-gap: 5px;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
179 }}
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
180 .snapshot_gallery__img {{
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
181 width: 100%;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
182 height: 100%;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
183 object-fit: contain;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
184 }}
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
185 .subheader{{
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
186 text-align:center;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
187 font-size: 160%;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
188 color:#363333;}}
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
189 </style>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
190 </head>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
191 <body>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
192 <h1 style="text-align:center; color:#363333">SpyBOAT Results Report</h1>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
193 <hr style="width:50%">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
194 <h1 class="subheader"> Distribution Dynamics </h1>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
195 <div class="distr_gallery">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
196 <figure class=”distr_gallery__item distr_gallery__item--1">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
197 <img src="period_distr.png" alt="Period" class="distr_gallery__img">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
198 </figure>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
199
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
200 <figure class=”distr_gallery__item distr_gallery__item--2">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
201 <img src="power_distr.png" alt="Power" class="distr_gallery__img">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
202 </figure>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
203
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
204 <figure class=”distr_gallery__item distr_gallery__item--3">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
205 <img src="phase_distr.png" alt="Phase" class="distr_gallery__img">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
206 </figure>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
207
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
208 </div>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
209
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
210 <h1 class="subheader"> Output Movie Snapshots </h1>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
211
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
212 <!-- trigger the javascript at the end--->
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
213 <div class="center">
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
214 <button class="w3-button" onclick="plusDivs(-1)">&#10094; Prev</button>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
215 <button class="w3-button" onclick="plusDivs(1)">Next &#10095;</button>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
216 </div>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
217
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
218 <!-- defines all elements of the "FrameSlides" class --->
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
219 {galleries}
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
220 </div>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
221
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
222 <!-- javascript with escaped '{{'--->
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
223 <script>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
224 var slideIndex = 1;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
225 showDivs(slideIndex);
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
226
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
227 function plusDivs(n) {{
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
228 showDivs(slideIndex += n);
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
229 }}
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
230
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
231 function showDivs(n) {{
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
232 var i;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
233 var x = document.getElementsByClassName("FrameSlides");
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
234 if (n > x.length) {{slideIndex = 1}}
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
235 if (n < 1) {{slideIndex = x.length}} ;
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
236 for (i = 0; i < x.length; i++) {{
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
237 x[i].style.display = "none";
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
238 }}
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
239 x[slideIndex-1].style.display = "block";
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
240 }}
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
241 </script>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
242 </body>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
243 </html>
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
244 """
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
245
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
246 with open(html_fname, "w") as OUT:
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
247 OUT.write(html_string)
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
248
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
249 logger.info("Created html report")
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
250 return html_string
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
251
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
252 # for local testing
76733d05d8ef "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
iuc
parents:
diff changeset
253 # create_html([0,20,40,60,80])