16
16
from Orange .data import Table , Domain , ContinuousVariable
17
17
from Orange .util import wrap_callback
18
18
from Orange .widgets import gui , widget , settings
19
- from Orange .widgets .widget import Msg , Output , StateInfo
19
+ from Orange .widgets .widget import Msg , Output
20
20
from Orange .data .pandas_compat import vars_from_df
21
21
from Orange .widgets .utils .concurrent import TaskState , ConcurrentWidgetMixin
22
22
from Orange .widgets .utils .itemmodels import PyTableModel
@@ -264,11 +264,6 @@ def __init__(self):
264
264
# Cache clinical metadata
265
265
self .clinical_metadata : Optional [Table ] = None
266
266
267
- # Control area
268
- self .info_box = gui .widgetLabel (
269
- gui .widgetBox (self .controlArea , "Info" , margin = 3 ), 'No data on output.'
270
- )
271
-
272
267
self .exp_type_combo = gui .comboBox (
273
268
self .controlArea ,
274
269
self ,
@@ -377,8 +372,6 @@ def __invalidate(self):
377
372
self .Warning .multiple_feature_type .clear ()
378
373
self .Warning .unexpected_feature_type .clear ()
379
374
self .Warning .no_data_objects .clear ()
380
- self .info .set_output_summary (StateInfo .NoOutput )
381
- self .update_info_box ()
382
375
383
376
def update_user_status (self ):
384
377
user = self .res .get_currently_logged_user ()
@@ -401,30 +394,6 @@ def update_user_status(self):
401
394
self .user_info .setText (user_info )
402
395
self .server_info .setText (f'Server: { self .res .url [8 :]} ' )
403
396
404
- def update_info_box (self ):
405
- if self .data_table :
406
- total_genes = len (self .data_table .domain .attributes )
407
- known_genes = len (
408
- [
409
- col
410
- for col in self .data_table .domain .attributes
411
- if len (col .attributes )
412
- ]
413
- )
414
-
415
- info_text = (
416
- '{} genes on output\n '
417
- '{} genes match Entrez database\n '
418
- '{} genes with match conflicts\n ' .format (
419
- total_genes , known_genes , total_genes - known_genes
420
- )
421
- )
422
-
423
- else :
424
- info_text = 'No data on output.'
425
-
426
- self .info_box .setText (info_text )
427
-
428
397
def sign_in (self , silent = False ):
429
398
dialog = SignIn (self , server_type = resolwe .RESOLWE_PLATFORM )
430
399
@@ -437,7 +406,7 @@ def sign_in(self, silent=False):
437
406
url = resolwe .resapi .DEFAULT_URL , server_type = resolwe .RESOLWE_PLATFORM
438
407
)
439
408
440
- if not silent and dialog .exec_ ():
409
+ if not silent and dialog .exec ():
441
410
self .res = dialog .resolwe_instance
442
411
443
412
def sign_out (self ):
@@ -536,21 +505,22 @@ def normalize(self, table: Table) -> Optional[Table]:
536
505
537
506
return table
538
507
508
+ @gui .deferred
539
509
def commit (self ):
540
510
self .Warning .no_data_objects .clear ()
541
511
self .cancel ()
542
512
self .start (self .runner )
543
513
544
514
def on_output_option_changed (self ):
545
515
self .data_table = None
546
- self .commit ()
516
+ self .commit . deferred ()
547
517
548
518
def on_clinical_data_changed (self ):
549
519
self .clinical_metadata = self .fetch_clinical_metadata ()
550
- self .commit ()
520
+ self .commit . deferred ()
551
521
552
522
def on_normalization_changed (self ):
553
- self .commit ()
523
+ self .commit . deferred ()
554
524
555
525
def on_selection_changed (self ):
556
526
self .__invalidate ()
@@ -614,9 +584,6 @@ def get_selected_row_data(self, column: int) -> Optional[str]:
614
584
615
585
def on_done (self , table : Table ):
616
586
if table :
617
- samples , genes = table .X .shape
618
- self .info .set_output_summary (f'Samples: { samples } Genes: { genes } ' )
619
- self .update_info_box ()
620
587
self .Outputs .table .send (table )
621
588
622
589
def on_exception (self , ex ):
0 commit comments