Im parsing an hmmscan file, I created a checkbutton in order to print all domains (self.query_id) in my file . I 'm trying now to get checked values, but my code does not return anything. Here's the code bellow , can anyone check what is wrong with my function get_var please ?
def hmmscan_parser(self):
d={}
#with open(self.chemin, 'r') as file:
for qresult in SearchIO.parse(self.chemin, 'hmmscan3-domtab'):
self.query_id = qresult.id #sequence ID from fasta
self.query_len = qresult.seq_len
self.hits = qresult.hits
self.num_hits = len(self.hits)
if self.num_hits > 0:
for i in range(0,self.num_hits):
self.hit_evalue = self.hits[i].evalue #evalue
self.hmm_name = self.hits[i].accession
self.hmm_length = self.hits[i].seq_len
self.chek=Checkbutton(self.frame,text=self.query_id, variable=(self.hit_evalue,self.var)).pack()
def getvar(self):
print(self.var.get())
Aucun commentaire:
Enregistrer un commentaire