Skip to content

Commit

Permalink
plots stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
brentp committed Mar 15, 2022
1 parent b37b621 commit 00baa1f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 16 deletions.
6 changes: 3 additions & 3 deletions paper/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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 \
Expand Down Expand Up @@ -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
35 changes: 22 additions & 13 deletions paper/plot-times.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 00baa1f

Please sign in to comment.