Permalink
Browse files

Add nice labels for identifying callers

  • Loading branch information...
1 parent c146ac4 commit 71f9b2251f1d5232402affd4a2c2cf4428d9d754 @chapmanb committed Oct 15, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 validation/plot_validation.py
@@ -48,6 +48,8 @@ def plot_prep_methods(df, prep, prepi, in_file):
vtype_labels = {"snp": "SNPs", "indel": "Indels"}
prep_labels = {"gatk": "GATK best-practice BAM preparation (recalibration, realignment)",
"none": "Minimal BAM preparation (samtools de-duplication only)"}
+ caller_labels = {"ensemble": "Ensemble", "freebayes": "FreeBayes",
+ "gatk": "GATK Unified\nGenotyper", "gatk-haplotype": "GATK Haplotype\nCaller"}
vtypes = df["variant.type"].unique()
fig, axs = plt.subplots(len(vtypes), len(cats))
callers = sorted(df["caller"].unique())
@@ -66,7 +68,7 @@ def plot_prep_methods(df, prep, prepi, in_file):
ax.set_ylim(0, maxval)
if i == len(vtypes) - 1:
ax.set_xticks(np.arange(len(callers)) + width / 2.0)
- ax.set_xticklabels([x.replace("-", "\n") for x in callers], size=8, rotation=45)
+ ax.set_xticklabels([caller_labels[x] for x in callers], size=8, rotation=45)
else:
ax.get_xaxis().set_ticks([])
_annotate(ax, labels, vals, np.arange(len(callers)), width)

0 comments on commit 71f9b22

Please sign in to comment.