From f8960a0a668cf90b88a06c3c2f977062160a211e Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 29 Apr 2016 03:29:44 -0500 Subject: Plotting: using cairo-png for headless environments --- wqflask/wqflask/ctl/ctl_analysis.py | 4 ++-- wqflask/wqflask/wgcna/wgcna_analysis.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/ctl/ctl_analysis.py b/wqflask/wqflask/ctl/ctl_analysis.py index d79d9bfe..7a42b2f8 100644 --- a/wqflask/wqflask/ctl/ctl_analysis.py +++ b/wqflask/wqflask/ctl/ctl_analysis.py @@ -152,7 +152,7 @@ class CTL(object): self.results['requestform'] = requestform # Store the user specified parameters for the output page # Create the lineplot - r_png(self.results['imgloc1'], width=1000, height=600) + r_png(self.results['imgloc1'], width=1000, height=600, type='cairo-png') self.r_lineplot(res, significance = significance) r_dev_off() @@ -161,7 +161,7 @@ class CTL(object): # Create the QTL like CTL plots self.results['imgurl' + str(n)] = webqtlUtil.genRandStr("CTL_") + ".png" self.results['imgloc' + str(n)] = GENERATED_IMAGE_DIR + self.results['imgurl' + str(n)] - r_png(self.results['imgloc' + str(n)], width=1000, height=600) + r_png(self.results['imgloc' + str(n)], width=1000, height=600, type='cairo-png') self.r_plotCTLobject(res, (n-1), significance = significance, main='Phenotype ' + trait) r_dev_off() n = n + 1 diff --git a/wqflask/wqflask/wgcna/wgcna_analysis.py b/wqflask/wqflask/wgcna/wgcna_analysis.py index 6901712b..880a1cb2 100644 --- a/wqflask/wqflask/wgcna/wgcna_analysis.py +++ b/wqflask/wqflask/wgcna/wgcna_analysis.py @@ -128,7 +128,7 @@ class WGCNA(object): # The iconic WCGNA plot of the modules in the hanging tree self.results['imgurl'] = webqtlUtil.genRandStr("WGCNAoutput_") + ".png" self.results['imgloc'] = GENERATED_IMAGE_DIR + self.results['imgurl'] - r_png(self.results['imgloc'], width=1000, height=600) + r_png(self.results['imgloc'], width=1000, height=600, type='cairo-png') mergedColors = self.r_labels2colors(network[1]) self.r_plotDendroAndColors(network[5][0], mergedColors, "Module colors", dendroLabels = False, hang = 0.03, addGuide = True, guideHang = 0.05) r_dev_off() -- cgit v1.2.3