def on_BTN_OUTGROUP_GENE_clicked(self) -> None: """ Signal handler: """ genes = self.__get_selected_genes() intermake.acquire(groot.set_outgroups, parent=self).run(genes=list(genes))
def call(self, intent: Intent) -> None: if intent.type == EIntent.DIRECT: argskwargs: mhelper.ArgsKwargs = mhelper.assert_type_or_none( "intent.target", intent.target, mhelper.mannotation.predefined_inspectors.ArgsKwargs) else: argskwargs = mhelper.ArgsKwargs() # TODO: Use the controller directly intermake.acquire(self.command, window=intent.parent, confirm=True).run(*argskwargs.args, **argskwargs.kwargs)
def run_queue(self): if not self.queue: return next_cmd, next_args = self.queue.pop(0) if next_cmd is None: self.close() return intermake.acquire(next_cmd, parent=self).run(**next_args).listen( self.on_run_queue)
def run(self, command: intermake.Command, *args, **kwargs) -> intermake.Result: """ Runs an Intermake command asynchronously. """ return intermake.acquire(command, window=self.window).run(*args, **kwargs)
def on_BTN_RENAME_GENE_clicked(self) -> None: """ Signal handler: """ genes = self.__get_selected_genes() gene: groot.Gene = array_helper.first_or_none(genes) name = qt.FrmGenericText( self, message="Rename the gene with accession '{}'".format( gene.accession), text=gene.display_name, editable=True) if name: intermake.acquire(groot.set_gene_name, parent=self).run(gene=gene, name=name)
def on_BTN_COMPONENT_GENE_clicked(self) -> None: """ Signal handler: """ genes = self.__get_selected_genes() intermake.acquire(groot.set_major, parent=self).run(genes=genes)