From d0911a04958a04042da02a334ccc528dae79cc17 Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 27 Mar 2015 20:28:51 +0000 Subject: Removed everything from 'web' directory except genofiles and renamed the directory to 'genotype_files' --- .../basicStatistics/BasicStatisticsPage_alpha.py | 344 --------------------- .../basicStatistics/updatedBasicStatisticsPage.py | 150 --------- 2 files changed, 494 deletions(-) delete mode 100755 wqflask/basicStatistics/BasicStatisticsPage_alpha.py delete mode 100755 wqflask/basicStatistics/updatedBasicStatisticsPage.py (limited to 'wqflask/basicStatistics') diff --git a/wqflask/basicStatistics/BasicStatisticsPage_alpha.py b/wqflask/basicStatistics/BasicStatisticsPage_alpha.py deleted file mode 100755 index 365143db..00000000 --- a/wqflask/basicStatistics/BasicStatisticsPage_alpha.py +++ /dev/null @@ -1,344 +0,0 @@ -# Copyright (C) University of Tennessee Health Science Center, Memphis, TN. -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU Affero General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Affero General Public License for more details. -# -# This program is available from Source Forge: at GeneNetwork Project -# (sourceforge.net/projects/genenetwork/). -# -# Contact Drs. Robert W. Williams and Xiaodong Zhou (2010) -# at rwilliams@uthsc.edu and xzhou15@uthsc.edu -# -# -# -# This module is used by GeneNetwork project (www.genenetwork.org) -# -# Created by GeneNetwork Core Team 2010/08/10 -# -# Last updated by GeneNetwork Core Team 2010/10/20 - -import string -from math import * -import piddle as pid -import os - -from htmlgen import HTMLgen2 as HT -import reaper - -from utility import Plot -from base.webqtlTrait import webqtlTrait -from base.templatePage import templatePage -from utility import webqtlUtil -from base import webqtlConfig -from dbFunction import webqtlDatabaseFunction - - - -class BasicStatisticsPage_alpha(templatePage): - - plotMinInformative = 4 - - def __init__(self, fd): - - templatePage.__init__(self, fd) - - if not fd.genotype: - fd.readGenotype() - strainlist2 = fd.strainlist - - if fd.allstrainlist: - strainlist2 = fd.allstrainlist - - fd.readData(strainlist2) - - specialStrains = [] - setStrains = [] - for item in strainlist2: - if item not in fd.strainlist and item.find('F1') < 0: - specialStrains.append(item) - else: - setStrains.append(item) - specialStrains.sort() - #So called MDP Panel - if specialStrains: - specialStrains = fd.f1list+fd.parlist+specialStrains - - self.plotType = fd.formdata.getvalue('ptype', '0') - plotStrains = strainlist2 - if specialStrains: - if self.plotType == '1': - plotStrains = setStrains - if self.plotType == '2': - plotStrains = specialStrains - - self.dict['title'] = 'Basic Statistics' - if not self.openMysql(): - return - - self.showstrains = 1 - self.identification = "unnamed trait" - - self.fullname = fd.formdata.getvalue('fullname', '') - if self.fullname: - self.Trait = webqtlTrait(fullname=self.fullname, cursor=self.cursor) - self.Trait.retrieveInfo() - else: - self.Trait = None - - if fd.identification: - self.identification = fd.identification - self.dict['title'] = self.identification + ' / '+self.dict['title'] - TD_LR = HT.TD(height=200,width="100%",bgColor='#eeeeee') - - ##should not display Variance, but cannot convert Variance to SE - #print plotStrains, fd.allTraitData.keys() - if len(fd.allTraitData) > 0: - vals=[] - InformData = [] - for _strain in plotStrains: - if fd.allTraitData.has_key(_strain): - _val, _var = fd.allTraitData[_strain].val, fd.allTraitData[_strain].var - if _val != None: - vals.append([_strain, _val, _var]) - InformData.append(_val) - - if len(vals) >= self.plotMinInformative: - supertable2 = HT.TableLite(border=0, cellspacing=0, cellpadding=5,width="800") - - staIntro1 = HT.Paragraph("The table and plots below list the basic statistical analysis result of trait",HT.Strong(" %s" % self.identification)) - - ##### - #anova - ##### - traitmean, traitmedian, traitvar, traitstdev, traitsem, N = reaper.anova(InformData) - TDStatis = HT.TD(width="360", valign="top") - tbl2 = HT.TableLite(cellpadding=5, cellspacing=0, Class="collap") - dataXZ = vals[:] - dataXZ.sort(self.cmpValue) - tbl2.append(HT.TR(HT.TD("Statistic",align="center", Class="fs14 fwb ffl b1 cw cbrb", width = 200), - HT.TD("Value", align="center", Class="fs14 fwb ffl b1 cw cbrb", width = 140))) - tbl2.append(HT.TR(HT.TD("N of Cases",align="center", Class="fs13 b1 cbw c222"), - HT.TD(N,nowrap="yes",align="center", Class="fs13 b1 cbw c222"))) - tbl2.append(HT.TR(HT.TD("Mean",align="center", Class="fs13 b1 cbw c222",nowrap="yes"), - HT.TD("%2.3f" % traitmean,nowrap="yes",align="center", Class="fs13 b1 cbw c222"))) - tbl2.append(HT.TR(HT.TD("Median",align="center", Class="fs13 b1 cbw c222",nowrap="yes"), - HT.TD("%2.3f" % traitmedian,nowrap="yes",align="center", Class="fs13 b1 cbw c222"))) - #tbl2.append(HT.TR(HT.TD("Variance",align="center", Class="fs13 b1 cbw c222",nowrap="yes"), - # HT.TD("%2.3f" % traitvar,nowrap="yes",align="center", Class="fs13 b1 cbw c222"))) - tbl2.append(HT.TR(HT.TD("SEM",align="center", Class="fs13 b1 cbw c222",nowrap="yes"), - HT.TD("%2.3f" % traitsem,nowrap="yes",align="center", Class="fs13 b1 cbw c222"))) - tbl2.append(HT.TR(HT.TD("SD",align="center", Class="fs13 b1 cbw c222",nowrap="yes"), - HT.TD("%2.3f" % traitstdev,nowrap="yes",align="center", Class="fs13 b1 cbw c222"))) - tbl2.append(HT.TR(HT.TD("Minimum",align="center", Class="fs13 b1 cbw c222",nowrap="yes"), - HT.TD("%s" % dataXZ[0][1],nowrap="yes",align="center", Class="fs13 b1 cbw c222"))) - tbl2.append(HT.TR(HT.TD("Maximum",align="center", Class="fs13 b1 cbw c222",nowrap="yes"), - HT.TD("%s" % dataXZ[-1][1],nowrap="yes",align="center", Class="fs13 b1 cbw c222"))) - if self.Trait and self.Trait.db.type == 'ProbeSet': - #IRQuest = HT.Href(text="Interquartile Range", url=webqtlConfig.glossaryfile +"#Interquartile",target="_blank", Class="fs14") - #IRQuest.append(HT.BR()) - #IRQuest.append(" (fold difference)") - tbl2.append(HT.TR(HT.TD("Range (log2)",align="center", Class="fs13 b1 cbw c222",nowrap="yes"), - HT.TD("%2.3f" % (dataXZ[-1][1]-dataXZ[0][1]),nowrap="yes",align="center", Class="fs13 b1 cbw c222"))) - tbl2.append(HT.TR(HT.TD(HT.Span("Range (fold)"),align="center", Class="fs13 b1 cbw c222",nowrap="yes"), - HT.TD("%2.2f" % pow(2.0,(dataXZ[-1][1]-dataXZ[0][1])), nowrap="yes",align="center", Class="fs13 b1 cbw c222"))) - tbl2.append(HT.TR(HT.TD(HT.Span("Quartile Range",HT.BR()," (fold difference)"),align="center", Class="fs13 b1 cbw c222",nowrap="yes"), - HT.TD("%2.2f" % pow(2.0,(dataXZ[int((N-1)*3.0/4.0)][1]-dataXZ[int((N-1)/4.0)][1])), nowrap="yes",align="center", Class="fs13 b1 cbw c222"))) - - # (Lei Yan) - # 2008/12/19 - self.Trait.retrieveData() - #XZ, 04/01/2009: don't try to get H2 value for probe. - if self.Trait.cellid: - pass - else: - self.cursor.execute("SELECT DataId, h2 from ProbeSetXRef WHERE DataId = %d" % self.Trait.mysqlid) - dataid, heritability = self.cursor.fetchone() - if heritability: - tbl2.append(HT.TR(HT.TD(HT.Span("Heritability"),align="center", Class="fs13 b1 cbw c222",nowrap="yes"),HT.TD("%s" % heritability, nowrap="yes",align="center", Class="fs13 b1 cbw c222"))) - else: - tbl2.append(HT.TR(HT.TD(HT.Span("Heritability"),align="center", Class="fs13 b1 cbw c222",nowrap="yes"),HT.TD("NaN", nowrap="yes",align="center", Class="fs13 b1 cbw c222"))) - - # Lei Yan - # 2008/12/19 - - TDStatis.append(tbl2) - - plotHeight = 220 - plotWidth = 120 - xLeftOffset = 60 - xRightOffset = 25 - yTopOffset = 20 - yBottomOffset = 53 - - canvasHeight = plotHeight + yTopOffset + yBottomOffset - canvasWidth = plotWidth + xLeftOffset + xRightOffset - canvas = pid.PILCanvas(size=(canvasWidth,canvasHeight)) - XXX = [('', InformData[:])] - - Plot.plotBoxPlot(canvas, XXX, offset=(xLeftOffset, xRightOffset, yTopOffset, yBottomOffset), XLabel= "Trait") - filename= webqtlUtil.genRandStr("Box_") - canvas.save(webqtlConfig.IMGDIR+filename, format='gif') - img=HT.Image('/image/'+filename+'.gif',border=0) - - #supertable2.append(HT.TR(HT.TD(staIntro1, colspan=3 ))) - tb = HT.TableLite(border=0, cellspacing=0, cellpadding=0) - tb.append(HT.TR(HT.TD(img, align="left", style="border: 1px solid #999999; padding:0px;"))) - supertable2.append(HT.TR(TDStatis, HT.TD(tb))) - - dataXZ = vals[:] - tvals = [] - tnames = [] - tvars = [] - for i in range(len(dataXZ)): - tvals.append(dataXZ[i][1]) - tnames.append(webqtlUtil.genShortStrainName(fd, dataXZ[i][0])) - tvars.append(dataXZ[i][2]) - nnStrain = len(tnames) - - sLabel = 1 - - ###determine bar width and space width - if nnStrain < 20: - sw = 4 - elif nnStrain < 40: - sw = 3 - else: - sw = 2 - - ### 700 is the default plot width minus Xoffsets for 40 strains - defaultWidth = 650 - if nnStrain > 40: - defaultWidth += (nnStrain-40)*10 - defaultOffset = 100 - bw = int(0.5+(defaultWidth - (nnStrain-1.0)*sw)/nnStrain) - if bw < 10: - bw = 10 - - plotWidth = (nnStrain-1)*sw + nnStrain*bw + defaultOffset - plotHeight = 500 - #print [plotWidth, plotHeight, bw, sw, nnStrain] - c = pid.PILCanvas(size=(plotWidth,plotHeight)) - Plot.plotBarText(c, tvals, tnames, variance=tvars, YLabel='Value', title='%s by Case (sorted by name)' % self.identification, sLabel = sLabel, barSpace = sw) - - filename= webqtlUtil.genRandStr("Bar_") - c.save(webqtlConfig.IMGDIR+filename, format='gif') - img0=HT.Image('/image/'+filename+'.gif',border=0) - - dataXZ = vals[:] - dataXZ.sort(self.cmpValue) - tvals = [] - tnames = [] - tvars = [] - for i in range(len(dataXZ)): - tvals.append(dataXZ[i][1]) - tnames.append(webqtlUtil.genShortStrainName(fd, dataXZ[i][0])) - tvars.append(dataXZ[i][2]) - - c = pid.PILCanvas(size=(plotWidth,plotHeight)) - Plot.plotBarText(c, tvals, tnames, variance=tvars, YLabel='Value', title='%s by Case (ranked)' % self.identification, sLabel = sLabel, barSpace = sw) - - filename= webqtlUtil.genRandStr("Bar_") - c.save(webqtlConfig.IMGDIR+filename, format='gif') - img1=HT.Image('/image/'+filename+'.gif',border=0) - - # Lei Yan - # 05/18/2009 - # report - - title = HT.Paragraph('REPORT on the variation of Shh (or PCA Composite Trait XXXX) (sonic hedgehog) in the (insert Data set name) of (insert Species informal name, e.g., Mouse, Rat, Human, Barley, Arabidopsis)', Class="title") - header = HT.Paragraph('''This report was generated by GeneNetwork on May 11, 2009, at 11.20 AM using the Basic Statistics module (v 1.0) and data from the Hippocampus Consortium M430v2 (Jun06) PDNN data set. For more details and updates on this data set please link to URL:get Basic Statistics''') - hr = HT.HR() - p1 = HT.Paragraph('''Trait values for Shh were taken from the (insert Database name, Hippocampus Consortium M430v2 (Jun06) PDNN). GeneNetwork contains data for NN (e.g., 99) cases. In general, data are averages for each case. A summary of mean, median, and the range of these data are provided in Table 1 and in the box plot (Figure 1). Data for individual cases are provided in Figure 2A and 2B, often with error bars (SEM). ''') - p2 = HT.Paragraph('''Trait values for Shh range 5.1-fold: from a low of 8.2 (please round value) in 129S1/SvImJ to a high of 10.6 (please round value) in BXD9. The interquartile range (the difference between values closest to the 25% and 75% levels) is a more modest 1.8-fold. The mean value is XX. ''') - t1 = HT.Paragraph('''Table 1. Summary of Shh data from the Hippocampus Consortium M430v2 (june06) PDNN data set''') - f1 = HT.Paragraph('''Figure 1. ''') - f1.append(HT.Href(text="Box plot", url="http://davidmlane.com/hyperstat/A37797.html", target="_blank", Class="fs14")) - f1.append(HT.Text(''' of Shh data from the Hippocampus Consortium M430v2 (june06) PDNN data set''')) - f2A = HT.Paragraph('''Figure 2A: Bar chart of Shh data ordered by case from the Hippocampus Consortium M430v2 (june06) PDNN data set''') - f2B = HT.Paragraph('''Figure 2B: Bar chart of Shh values ordered by from the Hippocampus Consortium M430v2 (june06) PDNN data set''') - TD_LR.append(HT.Blockquote(title, HT.P(), header, hr, p1, HT.P(), p2, HT.P(), supertable2, t1, f1, HT.P(), img0, f2A, HT.P(), img1, f2B)) - self.dict['body'] = str(TD_LR) - else: - heading = "Basic Statistics" - detail = ['Fewer than %d case data were entered for %s data set. No statitical analysis has been attempted.' % (self.plotMinInformative, fd.RISet)] - self.error(heading=heading,detail=detail) - return - else: - heading = "Basic Statistics" - detail = ['Empty data set, please check your data.'] - self.error(heading=heading,detail=detail) - return - - def traitInfo(self, fd, specialStrains = None): - species = webqtlDatabaseFunction.retrieveSpecies(cursor=self.cursor, RISet=fd.RISet) - heading2 = HT.Paragraph(HT.Strong('Population: '), "%s %s" % (species.title(), fd.RISet) , HT.BR()) - if self.Trait: - trait_url = HT.Href(text=self.Trait.name, url = os.path.join(webqtlConfig.CGIDIR, webqtlConfig.SCRIPTFILE) + \ - "?FormID=showDatabase&incparentsf1=1&database=%s&ProbeSetID=%s" % (self.Trait.db.name, self.Trait.name), \ - target='_blank', Class="fs13 fwn") - heading2.append(HT.Strong("Database: "), - HT.Href(text=self.Trait.db.fullname, url = webqtlConfig.INFOPAGEHREF % self.Trait.db.name , - target='_blank',Class="fs13 fwn"),HT.BR()) - if self.Trait.db.type == 'ProbeSet': - heading2.append(HT.Strong('Trait ID: '), trait_url, HT.BR(), - HT.Strong("Gene Symbol: "), HT.Italic('%s' % self.Trait.symbol,id="green"),HT.BR()) - if self.Trait.chr and self.Trait.mb: - heading2.append(HT.Strong("Location: "), 'Chr %s @ %s Mb' % (self.Trait.chr, self.Trait.mb)) - elif self.Trait.db.type == 'Geno': - heading2.append(HT.Strong('Locus : '), trait_url, HT.BR()) - #heading2.append(HT.Strong("Gene Symbol: "), HT.Italic('%s' % self.Trait.Symbol,id="green"),HT.BR()) - if self.Trait.chr and self.Trait.mb: - heading2.append(HT.Strong("Location: "), 'Chr %s @ %s Mb' % (self.Trait.chr, self.Trait.mb)) - elif self.Trait.db.type == 'Publish': - heading2.append(HT.Strong('Record ID: '), trait_url, HT.BR()) - heading2.append(HT.Strong('Phenotype: '), self.Trait.phenotype, HT.BR()) - heading2.append(HT.Strong('Author: '), self.Trait.authors, HT.BR()) - elif self.Trait.db.type == 'Temp': - heading2.append(HT.Strong('Description: '), self.Trait.description, HT.BR()) - #heading2.append(HT.Strong('Author: '), self.Trait.authors, HT.BR()) - else: - pass - else: - heading2.append(HT.Strong("Trait Name: "), fd.identification) - - if specialStrains: - mdpform = HT.Form(cgi= os.path.join(webqtlConfig.CGIDIR, webqtlConfig.SCRIPTFILE), name='MDP_Form',submit=HT.Input(type='hidden')) - mdphddn = {'FormID':'dataEditing', 'submitID':'basicStatistics','RISet':fd.RISet, "allstrainlist":string.join(fd.allstrainlist, " "), "ptype":self.plotType, 'identification':fd.identification, "incparentsf1":1} - if self.fullname: mdphddn['fullname'] = self.fullname - webqtlUtil.exportData(mdphddn, fd.allTraitData) - for key in mdphddn.keys(): - mdpform.append(HT.Input(name=key, value=mdphddn[key], type='hidden')) - btn0 = HT.Input(type='button' ,name='',value='All Cases',onClick="this.form.ptype.value=0;submit();", Class="button") - btn1 = HT.Input(type='button' ,name='',value='%s Only' % fd.RISet,onClick="this.form.ptype.value=1;submit();", Class="button") - btn2 = HT.Input(type='button' ,name='',value='MDP Only', onClick="this.form.ptype.value=2;submit();", Class="button") - mdpform.append(btn0) - mdpform.append(btn1) - mdpform.append(btn2) - heading2.append(HT.P(), mdpform) - - return HT.Span(heading2) - - def calSD(self,var): - try: - return sqrt(abs(var)) - except: - return None - - - def cmpValue(self,A,B): - try: - if A[1] < B[1]: - return -1 - elif A[1] == B[1]: - return 0 - else: - return 1 - except: - return 0 diff --git a/wqflask/basicStatistics/updatedBasicStatisticsPage.py b/wqflask/basicStatistics/updatedBasicStatisticsPage.py deleted file mode 100755 index 3f30619d..00000000 --- a/wqflask/basicStatistics/updatedBasicStatisticsPage.py +++ /dev/null @@ -1,150 +0,0 @@ -from htmlgen import HTMLgen2 as HT - -from base.templatePage import templatePage -from dbFunction import webqtlDatabaseFunction -import BasicStatisticsFunctions - -#Window generated from the Trait Data and Analysis page (DataEditingPage.py) with updated stats figures; takes the page's values that can bed edited by the user -class updatedBasicStatisticsPage(templatePage): - - plotMinInformative = 4 - - def __init__(self, fd): - - templatePage.__init__(self, fd) - - if not fd.genotype: - fd.readGenotype() - this_strainlist = fd.strainlist - - if fd.allstrainlist: - this_strainlist = fd.allstrainlist - - fd.readData(this_strainlist) - - specialStrains = [] #This appears to be the "other/non-RISet strainlist" without parents/f1 strains; not sure what to name it - setStrains = [] - for item in this_strainlist: - if item not in fd.strainlist and item.find('F1') < 0: - specialStrains.append(item) - else: - continue - - specialStrains.sort() - if specialStrains: - specialStrains = fd.f1list+fd.parlist+specialStrains - - self.dict['title'] = 'Basic Statistics' - TD_LR = HT.TD(valign="top",width="100%",bgcolor="#fafafa") - - stats_row = HT.TR() - stats_cell = HT.TD() - stats_script = HT.Script(language="Javascript") - - #Get strain names, values, and variances - strain_names = fd.formdata.getvalue('strainNames').split(',') - strain_vals = fd.formdata.getvalue('strainVals').split(',') - strain_vars = fd.formdata.getvalue('strainVars').split(',') - - vals = [] - if (len(strain_names) > 0): - if (len(strain_names) > 3): - #Need to create "vals" object - for i in range(len(strain_names)): - try: - this_strain_val = float(strain_vals[i]) - except: - continue - try: - this_strain_var = float(strain_vars[i]) - except: - this_strain_var = None - - thisValFull = [strain_names[i], this_strain_val, this_strain_var] - vals.append(thisValFull) - - stats_tab_list = [HT.Href(text="Basic Table", url="#statstabs-1", Class="stats_tab"),HT.Href(text="Probability Plot", url="#statstabs-2", Class="stats_tab"), - HT.Href(text="Bar Graph (by name)", url="#statstabs-3", Class="stats_tab"), HT.Href(text="Bar Graph (by rank)", url="#statstabs-4", Class="stats_tab"), - HT.Href(text="Box Plot", url="#statstabs-5", Class="stats_tab")] - stats_tabs = HT.List(stats_tab_list) - - stats_container = HT.Div(id="stats_tabs", Class="ui-tabs") - stats_container.append(stats_tabs) - - stats_script_text = """$(function() { $("#stats_tabs").tabs();});""" #Javascript enabling tabs - - table_div = HT.Div(id="statstabs-1", style="height:320px;width:740px;overflow:scroll;") - table_container = HT.Paragraph() - - statsTable = HT.TableLite(cellspacing=0, cellpadding=0, width="100%") - this_trait_type = fd.formdata.getvalue('trait_type', None) - this_cellid = fd.formdata.getvalue('cellid', None) - statsTableCell = BasicStatisticsFunctions.basicStatsTable(vals=vals, trait_type=this_trait_type, cellid=this_cellid) - statsTable.append(HT.TR(HT.TD(statsTableCell))) - - table_container.append(statsTable) - table_div.append(table_container) - stats_container.append(table_div) - - normalplot_div = HT.Div(id="statstabs-2", style="height:540px;width:740px;overflow:scroll;") - normalplot_container = HT.Paragraph() - normalplot = HT.TableLite(cellspacing=0, cellpadding=0, width="100%") - plotTitle = fd.formdata.getvalue("normalPlotTitle","") - normalplot_img = BasicStatisticsFunctions.plotNormalProbability(vals=vals, RISet=fd.RISet, title=plotTitle, specialStrains=specialStrains) - normalplot.append(HT.TR(HT.TD(normalplot_img))) - normalplot.append(HT.TR(HT.TD(HT.BR(),HT.BR(),"This plot evaluates whether data are \ - normally distributed. Different symbols represent different groups.",HT.BR(),HT.BR(), - "More about ", HT.Href(url="http://en.wikipedia.org/wiki/Normal_probability_plot", - target="_blank", text="Normal Probability Plots"), " and more about interpreting these plots from the ", HT.Href(url="/glossary.html#normal_probability", target="_blank", text="glossary")))) - normalplot_container.append(normalplot) - normalplot_div.append(normalplot_container) - stats_container.append(normalplot_div) - - barName_div = HT.Div(id="statstabs-3", style="height:540px;width:740px;overflow:scroll;") - barName_container = HT.Paragraph() - barName = HT.TableLite(cellspacing=0, cellpadding=0, width="100%") - barName_img = BasicStatisticsFunctions.plotBarGraph(identification=fd.identification, RISet=fd.RISet, vals=vals, type="name") - barName.append(HT.TR(HT.TD(barName_img))) - barName_container.append(barName) - barName_div.append(barName_container) - stats_container.append(barName_div) - - barRank_div = HT.Div(id="statstabs-4", style="height:540px;width:740px;overflow:scroll;") - barRank_container = HT.Paragraph() - barRank = HT.TableLite(cellspacing=0, cellpadding=0, width="100%") - barRank_img = BasicStatisticsFunctions.plotBarGraph(identification=fd.identification, RISet=fd.RISet, vals=vals, type="rank") - barRank.append(HT.TR(HT.TD(barRank_img))) - barRank_container.append(barRank) - barRank_div.append(barRank_container) - stats_container.append(barRank_div) - - boxplot_div = HT.Div(id="statstabs-5", style="height:540px;width:740px;overflow:scroll;") - boxplot_container = HT.Paragraph() - boxplot = HT.TableLite(cellspacing=0, cellpadding=0, width="100%") - boxplot_img, boxplot_link = BasicStatisticsFunctions.plotBoxPlot(vals) - boxplot.append(HT.TR(HT.TD(boxplot_img, HT.P(), boxplot_link, align="left"))) - boxplot_container.append(boxplot) - boxplot_div.append(boxplot_container) - stats_container.append(boxplot_div) - - stats_cell.append(stats_container) - stats_script.append(stats_script_text) - - submitTable = HT.TableLite(cellspacing=0, cellpadding=0, width="100%") - stats_row.append(stats_cell) - - submitTable.append(stats_row) - submitTable.append(stats_script) - - TD_LR.append(submitTable) - self.dict['body'] = str(TD_LR) - else: - heading = "Basic Statistics" - detail = ['Fewer than %d case data were entered for %s data set. No statitical analysis has been attempted.' % (self.plotMinInformative, fd.RISet)] - self.error(heading=heading,detail=detail) - return - else: - heading = "Basic Statistics" - detail = ['Empty data set, please check your data.'] - self.error(heading=heading,detail=detail) - return -- cgit v1.2.3