コード例 #1
0
    def getSumStatsTableHeader(self,numGroup):
        """ retourne l'en-tête pour le tableau à écrire dans conf.th
        """
        result = u""
        dico = {}
        for stat in self.statList1 + self.statList2 + self.statList3:
            dico[stat] = []

        gnumber = numGroup

        for box in self.oneSampleList:
            lab = str(box.findChild(QLabel,"oneSampleLabel").text()).split()[1]
            for statstr in self.statList1:
                if box.findChild(QCheckBox,"%sCheck"%self.confToStat1[statstr]).isChecked():
                    stat_name = "%s_%s_%s"%(statstr,gnumber,lab)
                    dico[statstr].append(stat_name)
        for box in self.twoSampleList:
            lab = str(box.findChild(QLabel,"twoSampleLabel").text()).split()[1]
            for statstr in self.statList2:
                if box.findChild(QCheckBox,"%sCheck"%self.confToStat2[statstr]).isChecked():
                    stat_name = "%s_%s_%s"%(statstr,gnumber,lab)
                    dico[statstr].append(stat_name)
        for box in self.admixSampleList:
            lab = str(box.findChild(QLabel,"threeSampleLabel").text()).split('\n')[1]
            for statstr in self.statList3:
                if box.findChild(QCheckBox,"%sCheck"%self.confToStat3[statstr]).isChecked():
                    stat_name = "%s_%s_%s"%(statstr,gnumber,lab)
                    dico[statstr].append(stat_name)

        for st in self.statList1 + self.statList2 + self.statList3:
            l = dico[st]
            for s in l:
                result += output.centerHeader(s,14)

        return result
コード例 #2
0
 def getParamTableHeader(self):
     """ retourne une chaine contenant les paramètres (valeurs qui varient)
     pour l'écriture du conf.th
     """
     result = u""
     gnumber = self.parent.groupList.index(self.box_group)+1
     if float(str(self.ui.mmrMinEdit.text())) < float(str(self.ui.mmrMaxEdit.text())):
         pname = u"µseq_%s"%(gnumber)
         result += output.centerHeader(pname,14)
     if not self.ui.jukesRadio.isChecked():
         if float(str(self.ui.mc1MinEdit.text())) < float(str(self.ui.mc1MaxEdit.text())):
             pname = u"k1seq_%s"%(gnumber)
             result += output.centerHeader(pname,14)
         if self.ui.tamuraRadio.isChecked():
             if float(str(self.ui.mc2MinEdit.text())) < float(str(self.ui.mc2MaxEdit.text())):
                 pname = u"k2seq_%s"%(gnumber)
                 result += output.centerHeader(pname,14)
     return result
コード例 #3
0
ファイル: projectSnp.py プロジェクト: cbgp/diyabc
 def getSumStatsTableHeader(self):
     """ retourne la partie sumstats du table header
     """
     result = u""
     numGroup = 1
     sums_txt = self.sum_stat_wins.getSumStatsTableHeader(numGroup)
     result += sums_txt
     if self.ascert_frame.ascYesRadio.isChecked():
         result += output.centerHeader("PPL",14)
     return result
コード例 #4
0
 def getParamTableHeader(self):
     """ retourne une chaine contenant les paramètres (valeurs qui varient)
     pour l'écriture du conf.th
     """
     result = u""
     gnumber = self.parent.groupList.index(self.box_group) + 1
     if float(str(self.ui.mmrMinEdit.text())) < float(str(self.ui.mmrMaxEdit.text())):
         pname = u"µmic_%s" % (gnumber)
         result += output.centerHeader(pname, 14)
         # for i in range(14-len(pname)):
         #    result += " "
     if float(str(self.ui.mcpMinEdit.text())) < float(str(self.ui.mcpMaxEdit.text())):
         pname = u"pmic_%s" % (gnumber)
         result += output.centerHeader(pname, 14)
         # for i in range(14-len(pname)):
         #    result += " "
     if float(str(self.ui.msrMinEdit.text())) < float(str(self.ui.msrMaxEdit.text())):
         pname = u"snimic_%s" % (gnumber)
         result += output.centerHeader(pname, 14)
         # for i in range(14-len(pname)):
         #    result += " "
     # print "result %s : %s"%(gnumber,result)
     return result
コード例 #5
0
    def getSumStatsTableHeader(self):
        """ retourne l'en-tête pour le tableau à écrire dans conf.th
        """
        result = u""
        if self.numGroup == 0:
            gnumber = self.parent.groupList.index(self.box_group)+1
        else:
            gnumber = self.numGroup
        dico = {"NAL" : [],
        "HET" : [],
        "VAR" : [],
        "MGW" : [],
        "N2P" : [],
        "H2P" : [],
        "V2P" : [],
        "FST" : [],
        "LIK" : [],
        "DAS" : [],
        "DM2" : [],
        "AML" : []}
        for box in self.oneSampleList:
            lab = str(box.findChild(QLabel,"oneSampleLabel").text()).split()[1]
            if box.findChild(QCheckBox,"mnoaCheck").isChecked():
                stat_name = "NAL_%s_%s"%(gnumber,lab)
                dico["NAL"].append(stat_name)
            if box.findChild(QCheckBox,"mgdCheck").isChecked():
                stat_name = "HET_%s_%s"%(gnumber,lab)
                dico["HET"].append(stat_name)
            if box.findChild(QCheckBox,"msvCheck").isChecked():
                stat_name = "VAR_%s_%s"%(gnumber,lab)
                dico["VAR"].append(stat_name)
            if box.findChild(QCheckBox,"mgwCheck").isChecked():
                stat_name = "MGW_%s_%s"%(gnumber,lab)
                dico["MGW"].append(stat_name)
        for box in self.twoSampleList:
            lab = str(box.findChild(QLabel,"twoSampleLabel").text()).split()[1]
            if box.findChild(QCheckBox,"mnoa2Check").isChecked():
                stat_name = "N2P_%s_%s"%(gnumber,lab)
                dico["N2P"].append(stat_name)
            if box.findChild(QCheckBox,"mgd2Check").isChecked():
                stat_name = "H2P_%s_%s"%(gnumber,lab)
                dico["H2P"].append(stat_name)
            if box.findChild(QCheckBox,"msv2Check").isChecked():
                stat_name = "V2P_%s_%s"%(gnumber,lab)
                dico["V2P"].append(stat_name)
            if box.findChild(QCheckBox,"fst2Check").isChecked():
                stat_name = "FST_%s_%s"%(gnumber,lab)
                dico["FST"].append(stat_name)
            if box.findChild(QCheckBox,"ci2LeftCheck").isChecked():
                stat_name = "%s"%(lab)
                dico["LIK"].append(stat_name)
            if box.findChild(QCheckBox,"ci2RightCheck").isChecked():
                lab_inverted = "%s&%s"%(lab.split('&')[1],lab.split('&')[0])
                stat_name = "%s"%(lab_inverted)
                dico["LIK"].append(stat_name)
            if box.findChild(QCheckBox,"sad2Check").isChecked():
                stat_name = "DAS_%s_%s"%(gnumber,lab)
                dico["DAS"].append(stat_name)
            if box.findChild(QCheckBox,"dd2Check").isChecked():
                stat_name = "DM2_%s_%s"%(gnumber,lab)
                dico["DM2"].append(stat_name)
        for box in self.admixSampleList:
            lab = str(box.findChild(QLabel,"threeSampleLabel").text()).split('\n')[1]
            if box.findChild(QCheckBox,"ml3Check").isChecked():
                stat_name = "AML_%s_%s"%(gnumber,lab)
                dico["AML"].append(stat_name)

        dico["LIK"] = self.sortLik(dico["LIK"])
        a=[]
        for e in dico["LIK"]:
            a.append("LIK_%s_%s"%(gnumber,e))
        dico["LIK"] = a

        for t in ["NAL","HET","VAR","MGW","N2P","H2P","V2P","FST","LIK","DAS","DM2","AML"]:
            l = dico[t]
            for s in l:
                result += output.centerHeader(s,14)

        return result
コード例 #6
0
    def getSumStatsTableHeader(self):
        result = u""
        if self.numGroup == 0:
            gnumber = self.parent.groupList.index(self.box_group)+1
        else:
            gnumber = self.numGroup
        dico = {"NHA":[],"NSS":[],"MPD":[],"VPD":[],"DTA":[],"PSS":[],"MNS":[],"VNS":[],"NH2":[],"NS2":[],"MP2":[],"MPB":[],"HST":[],"SML":[]}
        for box in self.oneSampleList:
            lab = str(box.findChild(QLabel,"oneSampleLabel").text()).split()[1]
            if box.findChild(QCheckBox,"nohCheck").isChecked():
                stat_name = "NHA_%s_%s"%(gnumber,lab)
                dico["NHA"].append(stat_name)
            if box.findChild(QCheckBox,"nossCheck").isChecked():
                stat_name = "NSS_%s_%s"%(gnumber,lab)
                dico["NSS"].append(stat_name)
            if box.findChild(QCheckBox,"mopdCheck").isChecked():
                stat_name = "MPD_%s_%s"%(gnumber,lab)
                dico["MPD"].append(stat_name)
            if box.findChild(QCheckBox,"vopdCheck").isChecked():
                stat_name = "VPD_%s_%s"%(gnumber,lab)
                dico["VPD"].append(stat_name)
            if box.findChild(QCheckBox,"tdCheck").isChecked():
                stat_name = "DTA_%s_%s"%(gnumber,lab)
                dico["DTA"].append(stat_name)
            if box.findChild(QCheckBox,"pssCheck").isChecked():
                stat_name = "PSS_%s_%s"%(gnumber,lab)
                dico["PSS"].append(stat_name)
            if box.findChild(QCheckBox,"monotrCheck").isChecked():
                stat_name = "MNS_%s_%s"%(gnumber,lab)
                dico["MNS"].append(stat_name)
            if box.findChild(QCheckBox,"vonotrCheck").isChecked():
                stat_name = "VNS_%s_%s"%(gnumber,lab)
                dico["VNS"].append(stat_name)
        for box in self.twoSampleList:
            lab = str(box.findChild(QLabel,"twoSampleLabel").text()).split()[1]
            if box.findChild(QCheckBox,"noh2Check").isChecked():
                stat_name = "NH2_%s_%s"%(gnumber,lab)
                dico["NH2"].append(stat_name)
            if box.findChild(QCheckBox,"noss2Check").isChecked():
                stat_name = "NS2_%s_%s"%(gnumber,lab)
                dico["NS2"].append(stat_name)
            if box.findChild(QCheckBox,"mopdw2Check").isChecked():
                stat_name = "MP2_%s_%s"%(gnumber,lab)
                dico["MP2"].append(stat_name)
            if box.findChild(QCheckBox,"mopdb2Check").isChecked():
                stat_name = "MPB_%s_%s"%(gnumber,lab)
                dico["MPB"].append(stat_name)
            if box.findChild(QCheckBox,"fst2Check").isChecked():
                stat_name = "HST_%s_%s"%(gnumber,lab)
                dico["HST"].append(stat_name)
        for box in self.admixSampleList:
            lab = str(box.findChild(QLabel,"threeSampleLabel").text()).split('\n')[1]
            if box.findChild(QCheckBox,"ml3Check").isChecked():
                stat_name = "SML_%s_%s"%(gnumber,lab)
                dico["SML"].append(stat_name)

        for t in ["NHA","NSS","MPD","VPD","DTA","PSS","MNS","VNS","NH2","NS2","MP2","MPB","HST","SML"]:
            l = dico[t]
            for s in l:
                result += output.centerHeader(s,14)
        return result