X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=tableau.py;fp=tableau.py;h=1deaa8e5942b3faa5364740cfc77b32840f5cfe0;hp=06f58e83cf15918d795403a7bf9a38a9bd6d6cc5;hb=12b4b71c8c8feb6154abc04dfa9bb93a521ef789;hpb=ad8fe486b34f1cee918ea8564bf909e30cd25328 diff --git a/tableau.py b/tableau.py index 06f58e8..1deaa8e 100644 --- a/tableau.py +++ b/tableau.py @@ -210,9 +210,18 @@ class Tableau() : dc = dict(zip(listcol, listcol)) selcol = [[val for i, val in enumerate(row) if i in dc] for row in self.linecontent] return selcol + + def getactlistfromselection(self, listact) : + selcol = self.select_col(listact) + self.actives = self.make_dico(selcol) + return [[val, self.actives[val][0]] for val in self.actives] + + def make_listactives(self) : + self.listactives = [val for val in self.actives if val != 'NA' and self.actives[val] >= self.parametre['mineff']] def write01(self, fileout, dico, linecontent) : - self.listactives = [val for val in dico if val != 'NA' and dico[val] >= self.parametre['mineff']] + if self.listactives is None : + self.listactives = [val for val in dico if val != 'NA' and dico[val] >= self.parametre['mineff']] out = [['0' for forme in self.listactives] for line in linecontent] for i, forme in enumerate(self.listactives) : for line in dico[forme][1] :