diff --git a/paper/Dockerfile b/paper/Dockerfile index 442b96e..d9b623b 100644 --- a/paper/Dockerfile +++ b/paper/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:20.04 ARG varnote_version=1.2.0 -ARG echtvar_version=0.1.2 +ARG echtvar_version=0.1.3 ARG slivar_version=0.2.7 ARG htslib_version=1.14 @@ -12,7 +12,7 @@ RUN \ # install packages dependencies apt-get update -yqq && \ apt-get install -yqq \ - curl \ + curl time \ r-base r-base-dev \ git \ bash \ @@ -44,5 +44,5 @@ RUN mkdir -p /opt/programs/ && \ chmod +x /usr/local/bin/echtvar && \ wget -qO /usr/local/bin/slivar https://github.com/brentp/slivar/releases/download/v${slivar_version}/slivar && \ chmod +x /usr/local/bin/slivar && \ - echo "#!/bin/sh\njava -Xmx5G -jar /opt/programs/VarNote.jar \"$@\"" > /usr/local/bin/varnote && \ + echo '#!/bin/sh\njava -Xmx5G -jar /opt/programs/VarNote.jar "$@"' > /usr/local/bin/varnote && \ chmod +x /usr/local/bin/varnote diff --git a/paper/plot-times.py b/paper/plot-times.py index ec047a9..948ed99 100644 --- a/paper/plot-times.py +++ b/paper/plot-times.py @@ -58,26 +58,35 @@ def _show_on_single_plot(ax): df.to_csv('exome.plots.tsv', index=False, sep="\t") -fig, axes = plt.subplots(4, 1, figsize=(4, 12), constrained_layout=True) +fig, axes = plt.subplots(2, 2, figsize=(6, 6), constrained_layout=True) -for i, var in enumerate(('Wall time (seconds)', 'User time (seconds)', 'Memory (MB)', 'File size (GB)')): +# dropped wall time +for ii, var in enumerate(('Wall time (seconds)', 'User time (seconds)', 'Memory (MB)', 'File size (GB)')): + + i, j = [(0, 0), (0, 1), (1, 0), (1, 1)][ii] sub = df.loc[df.variable == var, :] - subplot = sns.barplot(data=sub, x='tool', y='value', ax=axes[i]) - axes[i].set_ylabel(var) - axes[i].set_xlabel(None) + subplot = sns.barplot(data=sub, x='tool', y='value', ax=axes[i, j]) + axes[i, j].set_ylabel(var) + axes[i, j].set_xlabel(None) #show_values_on_bars(subplot) - axes[i].bar_label(subplot.containers[0], fmt='%.1f') - axes[i].set_ylim(ymax=1.07*axes[i].get_ylim()[1]) + axes[i, j].bar_label(subplot.containers[0], fmt='%.1f') + axes[i, j].set_ylim(ymax=1.07*axes[i, j].get_ylim()[1]) + + if i == 1: + lbls = axes[i, j].get_xticklabels() + axes[i, j].set_xticklabels(lbls, rotation=15, ha='right') + else: + axes[i, j].set_xticklabels([], rotation=15, ha='right') - lbls = axes[i].get_xticklabels() - axes[i].set_xticklabels(lbls, rotation=15, ha='right') -# for y in sub.value: -# -# axes[i].text( -# print(y) +# set times to same y-axis +ym = max(axes[0, 1].get_ylim()[1], axes[0, 0].get_ylim()[1]) +axes[0, 1].set_ylim(ymax=ym) +axes[0, 0].set_ylim(ymax=ym) plt.tight_layout() +plt.savefig('echtvar-comparison.png', format='png', dpi=1200) +plt.savefig('echtvar-comparison.eps', format='eps', dpi=1200) plt.show()