aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorPjotr Prins2016-04-29 03:29:44 -0500
committerPjotr Prins2016-04-29 03:29:44 -0500
commitf8960a0a668cf90b88a06c3c2f977062160a211e (patch)
tree1d9142f3ebb309a9013abbd8c30c710f2d28ecb8 /wqflask
parent1d50581402b368dd55f29135cca643b357b5a65b (diff)
downloadgenenetwork2-f8960a0a668cf90b88a06c3c2f977062160a211e.tar.gz
Plotting: using cairo-png for headless environments
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/ctl/ctl_analysis.py4
-rw-r--r--wqflask/wqflask/wgcna/wgcna_analysis.py2
2 files changed, 3 insertions, 3 deletions
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()