Пример #1
0
 def loadTargetsDialog(self):
   self.set_busy(True)
   fname = QFileDialog.getOpenFileName(self, 'Open target file')
   if os.path.isfile(fname) :
     self.textBox.append('Reading targets from '+fname+'...')        
     try:
       self.targets = sbml.readSBMLtargets(fname)
       self.textBox.append('done.') 
     except: self.textBox.append('failed.') 
   self.set_busy(False)
   self.checkState()
Пример #2
0
    print('Reading draft network from ',draft_sbml,'...',end=' ')
    sys.stdout.flush()
    draftnet = sbml.readSBMLnetwork(draft_sbml, 'draft')
    print('done.')
    #draftnet.to_file("draftnet.lp")

    print('Reading seeds from ',seeds_sbml,'...',end=' ')
    sys.stdout.flush()
    seeds = sbml.readSBMLseeds(seeds_sbml)
    print('done.')
    #seeds.to_file("seeds.lp")

    print('Reading targets from ',targets_sbml,'...',end=' ')
    sys.stdout.flush()
    targets = sbml.readSBMLtargets(targets_sbml)
    print('done.')
    #targets.to_file("targets.lp")

    print('\nChecking draftnet for unproducible targets ...',end=' ')
    sys.stdout.flush()
    model = query.get_unproducible(draftnet, targets, seeds)
    print('done.')
    print(' ',len(model),'unproducible targets:')
    utils.print_met(model.to_list())
    unproducible_targets = TermSet()
    for a in model :
      target= str(a)[13:]
      t = String2TermSet(target)
      unproducible_targets = TermSet(unproducible_targets.union(t))