Module: Bioroebe::GUI::LibUI::Alignment

Includes:
LibuiParadise::Extensions
Defined in:
lib/bioroebe/gui/libui/alignment/alignment.rb

Overview

Bioroebe::GUI::LibUI::Alignment

Constant Summary collapse

TITLE =
#

TITLE

#
'Alignment'

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.runObject

#

Bioroebe::GUI::LibUI::Alignment.run

#

104
105
106
107
108
# File 'lib/bioroebe/gui/libui/alignment/alignment.rb', line 104

def self.run
  object = Object.new
  object.extend(Alignment)
  object.reset_then_run
end

Instance Method Details

#create_skeletonObject

#

create_skeleton (create tag)

#

55
56
57
# File 'lib/bioroebe/gui/libui/alignment/alignment.rb', line 55

def create_skeleton
  create_the_entries
end

#create_the_entriesObject

#

create_the_entries

#

62
63
64
65
66
67
# File 'lib/bioroebe/gui/libui/alignment/alignment.rb', line 62

def create_the_entries
  # ======================================================================= #
  # === @entry_consensus_sequence
  # ======================================================================= #
  @entry_consensus_sequence = ui_entry
end

#do_analyse(_ = @text_buffer.text?) ⇒ Object

#

do_analyse

#

92
93
94
95
96
97
98
99
# File 'lib/bioroebe/gui/libui/alignment/alignment.rb', line 92

def do_analyse(
    _ = @text_buffer.text?
  )
  _ = _.to_s
  @alignment.use_this_as_input(_)
  consensus_sequence = @alignment.consensus_sequence?
  @entry_consensus_sequence.set_text(consensus_sequence)
end

#initializeObject

#

initialize

#

30
31
32
# File 'lib/bioroebe/gui/libui/alignment/alignment.rb', line 30

def initialize
  reset
end

#resetObject

#

reset

#

45
46
47
48
49
50
# File 'lib/bioroebe/gui/libui/alignment/alignment.rb', line 45

def reset
  # ======================================================================= #
  # === @alignment
  # ======================================================================= #
  @alignment = Bioroebe::Alignment.new(nil, :do_not_run_yet)
end

#reset_then_runObject

#

reset_then_run

#

37
38
39
40
# File 'lib/bioroebe/gui/libui/alignment/alignment.rb', line 37

def reset_then_run
  reset
  run
end

#runObject

#

run

#

72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/bioroebe/gui/libui/alignment/alignment.rb', line 72

def run
  create_skeleton
  main_window = ui_margined_window(TITLE, 1200, 200, 15)
  outer_vbox = ui_vbox
  @text_buffer = ui_text_view
  outer_vbox << @text_buffer
  @button_do_analyse = ui_button('Do Analyse')
  @button_do_analyse.on_clicked {
    do_analyse
  }
  
  outer_vbox << @button_do_analyse
  outer_vbox << @entry_consensus_sequence
  main_window.child = outer_vbox
  main_window.complex_finalizer
end