Class: Bioroebe::GUI::UniversalWidgets::RandomSequence

Inherits:
UniversalWidgets::Base
  • Object
show all
Includes:
CommandlineArguments, Bioroebe::GUI
Defined in:
lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb

Overview

Bioroebe::GUI::UniversalWidgets::RandomSequence

Constant Summary collapse

TITLE =
#

TITLE

Specify which title to use for this widget.

#
'Random Sequence - for DNA, RNA and aminoacids'
WIDTH =
#

WIDTH

#
'75% or 1200px minimum'
HEIGHT =
#

HEIGHT

#
'55% or 980px minimum'
FONT_LARGE =
#

FONT_LARGE

#
'Calibri 32'
MONOSPACED_FONT =
#

MONOSPACED_FONT

When this font is changed, don’t forget to also change the font at SMALLER_FONT.

#
:hack_22
USE_THIS_FONT =
MONOSPACED_FONT
USE_THIS_MONOFONT =
MONOSPACED_FONT
SMALLER_FONT =
#

SMALLER_FONT

#
:hack_16
USE_THIS_SLIGHTLY_SMALLER_FONT =
#

USE_THIS_SLIGHTLY_SMALLER_FONT

#
:hack_16
USE_THIS_HEADER =
#

USE_THIS_HEADER

#
['one-letter abbreviation', 'n times']
GENERATE_N_AMINOACIDS_BY_DEFAULT =
#

GENERATE_N_AMINOACIDS_BY_DEFAULT

#
15

Constants included from Bioroebe::GUI

ARRAY_ALL_GTK_WIDGETS, FONT_SIZE, OLD_VERBOSE_VALUE, Bioroebe::GUI::USE_THIS_FONT_FAMILY_FOR_GUI_APPLICATIONS

Constants included from ColoursForBase

ColoursForBase::ARRAY_HTML_COLOURS_IN_USE

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Bioroebe::GUI

#disable_warnings, #enable_warnings, #log_dir?

Methods included from CommandlineArguments

#commandline_arguments?, #commandline_arguments_that_are_files?, #e, #first?, #first_non_hyphen_argument?, #remove_hyphens_from_the_commandline_arguments, #return_commandline_arguments_as_string, #return_commandline_arguments_that_are_not_files, #return_entries_without_two_leading_hyphens, #select_commandline_arguments, #select_entries_starting_with_two_hyphens, #set_commandline_arguments

Methods included from ColoursForBase

#colourize_this_aminoacid_sequence_for_the_commandline, #colourize_this_nucleotide_sequence, #disable_colours, #ecomment, #efancy, #egold, #enable_colours, #eorange, #eparse, #erev, #red, #remove_trailing_escape_part, #return_colour_for_nucleotides, #rev, #sdir, #set_will_we_use_colours, #sfancy, #sfile, #simp, #swarn, #use_colours?, #use_colours_within_the_bioroebe_namespace?

Constructor Details

#initialize(commandline_arguments = nil, run_already = true) ⇒ RandomSequence

#

initialize

#


91
92
93
94
95
96
97
98
99
100
101
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 91

def initialize(
    commandline_arguments = nil,
    run_already           = true
  )
  determine_the_GUI_to_be_used(commandline_arguments)
  reset
  set_commandline_arguments(
    commandline_arguments
  )
  run if run_already
end

Class Method Details

.[](i = ARGV) ⇒ Object

#

Bioroebe::GUI::UniversalWidgets::RandomSequence[]

#


609
610
611
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 609

def self.[](i = ARGV)
  new(i)
end

.run(i = ARGV) ⇒ Object

#

Bioroebe::GUI::Gtk::RandomSequence.run

#


616
617
618
619
620
621
622
623
624
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 616

def self.run(
    i = ARGV
  )
  r = ::Gtk.runner_factory(
    ::Bioroebe::GUI::Gtk::RandomSequence.new(i)
  )
  r.background_colour(:white)
  return r
end

Instance Method Details

#aminoacid_sequence?Boolean Also known as: sequence?, main_sequence?

#

aminoacid_sequence?

#

Returns:

  • (Boolean)


523
524
525
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 523

def aminoacid_sequence?
  @entry_containing_the_sequence.text?.to_s
end

#border_size?Boolean

#

border_size?

#

Returns:

  • (Boolean)


136
137
138
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 136

def border_size?
  4
end

#connect_the_skeletonObject

#

connect_the_skeleton (connect tag, skeleton tag)

#


576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 576

def connect_the_skeleton
  abort_on_exception

  vbox1 = create_vbox
  vbox1.minimal(@top_bar,                                      3)
  vbox1.minimal(@entry_containing_the_sequence,                3)
  vbox1.minimal(@button_for_generating_a_new_random_sequence,  3)
  vbox1.minimal(@entry_for_n_entries_in_the_sequence,          3)
  hbox_for_the_button_copy_to_clipboard = create_hbox
  hbox_for_the_button_copy_to_clipboard.minimal(@button_copy_to_clipboard)
  hbox_for_the_button_copy_to_clipboard.align_into_the_center
  vbox1.minimal(hbox_for_the_button_copy_to_clipboard,         3)
  vbox1.minimal(@statistical_widget_top_panel,                 0)
  vbox1.maximal(@statistical_widget,                           3)

  window = runner_widget(nil, width?, height?, title?)
  window << vbox1

  ::UniversalWidgets.set_main_window(window)
  upon_delete_event_quit_the_application
  window.use_this_font = font?
  window.show_all
  window.set_size_request(width?, height?)
  window.set_default_size(width?, height?)
  window.set_padding(padding?)
  window.set_border_size(border_size?)
  window.top_left
  run_main
end

#create_statistical_informationObject

#

create_statistical_information

This method will fill up the “table”.

#


465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 465

def create_statistical_information
  create_statistical_top_panel
  @statistical_widget = create_vbox
  # ======================================================================= #
  # Next we must create the widget that can hold the hash. This will
  # be a list-store that can be dynamically updated.
  # ======================================================================= #
  array1 = ::Bioroebe.return_array_of_common_aminoacids
  array2 = Array.new(array1.size, '0')
  array = array1.zip(array2) # Zip it up with 0-values here.
  array.prepend(USE_THIS_HEADER)
  # ======================================================================= #
  # Next the tree view is created:
  # ======================================================================= #
  @tree_view, @list_store = tree_widget_with_two_columns_per_row(array)
  do_properly_setup_the_tree_view
  scrolled_window = create_scrolled_window(@tree_view)
  scrolled_window.set_border_width(10)
  scrolled_window.bblack1
  @statistical_widget.maximal(scrolled_window, 5)
  hbox1 = create_hbox
  hbox1.minimal(@clear_button)
  hbox1.align_into_the_center
  @statistical_widget.minimal(hbox1, 2)
  enable_proper_sorting_for_the_list_store
  on_right_click_in_the_tree_view_deselect_the_selection
end

#create_statistical_top_panelObject

#

create_statistical_top_panel

#


283
284
285
286
287
288
289
290
291
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 283

def create_statistical_top_panel
  # ======================================================================= #
  # This here has to be added separately from the scrolled-window.
  # ======================================================================= #
  @statistical_widget_top_panel = bold_label(
    'Showing statistical information about the '\
    'assigned aminoacid sequence next'
  )
end

#create_the_buttonsObject

#

create_the_buttons (buttons tag)

#


248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 248

def create_the_buttons
  # ======================================================================= #
  # === @clear_button
  # ======================================================================= #
  @clear_button = bold_button('_Clear the table above', self, :use_mnemonics) {
    :do_clear_the_list_store
  }
  @clear_button.hint = 'Clear the above dataset / table'
  @clear_button.set_name('button1')
  # ======================================================================= #
  # === @button_for_generating_a_new_random_sequence
  # ======================================================================= #
  @button_for_generating_a_new_random_sequence = bold_button(
    '_Generate a random aminoacid sequence',
    self,
    :use_mnemonics
  ) {{ # Add a tooltip.
    tooltip: 'Clicking on this button will <b>generate a random '\
             'aminoacid sequence</b>. Do not set a too high value '\
             'as that may take a long time, and consume a '\
             'lot of memory/RAM.'
  }}
  @button_for_generating_a_new_random_sequence.on_click_event {
    do_generate_a_random_sequence(n_aminoacids?)
  }
  @button_for_generating_a_new_random_sequence.set_name('button1')
  # ======================================================================= #
  # Next, create, then add the clipboard button:
  # ======================================================================= #
  create_the_copy_to_clipboard_button
end

#create_the_copy_to_clipboard_buttonObject

#

create_the_copy_to_clipboard_button

#


168
169
170
171
172
173
174
175
176
177
178
179
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 168

def create_the_copy_to_clipboard_button
  # ======================================================================= #
  # === @button_copy_to_clipboard
  # ======================================================================= #
  @button_copy_to_clipboard = bold_button('_Copy to the xorg-clipboard',
    self, :use_mnemonic) {
    :do_copy_to_the_clipboard
  }
  @button_copy_to_clipboard.hint = 'This will <b>copy the aminoacid '\
    'sequence</b> to the <b>xorg-clipboard</b>.'
  @button_copy_to_clipboard.set_name('button1')
end

#create_the_entriesObject

#

create_the_entries

#


435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 435

def create_the_entries
  # ======================================================================= #
  # === @entry_containing_the_sequence
  # ======================================================================= #
  @entry_containing_the_sequence = create_entry
  @entry_containing_the_sequence.on_click_select_everything
  @entry_containing_the_sequence.yellow_background
  @entry_containing_the_sequence.bblack1
  # ======================================================================= #
  # Add the entry that allows the user to control how many aminoacids
  # will be "generated".
  # ======================================================================= #
  @entry_for_n_entries_in_the_sequence = create_entry { :align_center }
  @entry_for_n_entries_in_the_sequence.set_text(GENERATE_N_AMINOACIDS_BY_DEFAULT.to_s)
  @entry_for_n_entries_in_the_sequence.yellow_background
  @entry_for_n_entries_in_the_sequence.on_click_select_everything
  @entry_for_n_entries_in_the_sequence.bblack1
  @entry_for_n_entries_in_the_sequence.on_enter {
    do_generate_a_random_sequence_using_the_value_from_the_proper_entry
  }
  @entry_for_n_entries_in_the_sequence.hint = 'Input here how many random '\
    'amino acids should be generated.'
end

#create_the_skeletonObject

#

create_the_skeleton (create tag, skeleton tag)

#


238
239
240
241
242
243
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 238

def create_the_skeleton
  create_the_buttons # Call this before the top_bar is created.
  create_statistical_information # Call this before the top-bar is created.
  create_the_top_bar
  create_the_entries
end

#create_the_top_barObject

#

create_the_top_bar

#


317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 317

def create_the_top_bar
  @top_bar = gtk_top_bar
  button_open_file = button('_Open File', self, :use_mnemonics) {
    :do_open_a_file_and_then_set_the_correct_values
  }
  button_open_file.hint = 'Click on this button to open a local FASTA '\
                          'file.'
  button_open_file.bblack1
  @top_bar.add(button_open_file)
  # ======================================================================= #
  # === @combo_box_for_the_sequence_type
  # ======================================================================= #
  @combo_box_for_the_sequence_type = combo_box_entry(
    %w( aminoacid DNA RNA )
  )
  @combo_box_for_the_sequence_type.first_is_active
  # ======================================================================= #
  # Respond to the event when the combo-box value changes:
  # ======================================================================= #
  @combo_box_for_the_sequence_type.on_changed {
    _ = @combo_box_for_the_sequence_type.text?
    @button_for_generating_a_new_random_sequence.set_text(
      "Generate a random #{_} sequence"
    )
    @button_for_generating_a_new_random_sequence.make_bold
    @statistical_widget_top_panel.set_text(
      "Showing statistical information about the "\
      "assigned #{_} sequence next"
    )
    @statistical_widget_top_panel.make_bold
    @tree_view.model = nil
    @list_store = nil
    @list_store = gtk_list_store(String, String)
    case mode?
    when 'DNA','RNA'
      if mode? == 'DNA'
        array1 = %w( A T C G )
      else
        array1 = %w( A U C G )
      end
      array2 = Array.new(array1.size, '0')
      zipped = array1.zip(array2) # Zip it up with 0-values here.
      zipped.each {|a, b|
        iter = @list_store.append
        iter.set_value(0, a)
        iter.set_value(1, b)
      }
    else # else we assume a protein.
    end
    @tree_view.model = @list_store
  }
  @top_bar.add(@combo_box_for_the_sequence_type)
end

#do_clear_the_list_storeObject

#

do_clear_the_list_store

#


296
297
298
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 296

def do_clear_the_list_store
  @list_store.clear
end

#do_copy_to_the_clipboardObject

#

do_copy_to_the_clipboard

#


414
415
416
417
418
419
420
421
422
423
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 414

def do_copy_to_the_clipboard
  begin
    require 'xorg_buffer'
  rescue LoadError; end
  if Object.const_defined? :XorgBuffer
    XorgBuffer.copy_this_text_to_the_clipboard(aminoacid_sequence?)
  else
    e 'The gem xorg_buffer is not installed, or could not be found.'
  end
end

#do_evaluate_the_sequence(use_this_sequence = main_sequence? ) ⇒ Object

#

do_evaluate_the_sequence

#


374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 374

def do_evaluate_the_sequence(
    use_this_sequence = main_sequence?
  )
  do_clear_the_list_store
  case mode?
  # ======================================================================= #
  # === DNA
  # ======================================================================= #
  when 'DNA','RNA'
    @tree_view.remove_the_columns
    column1 = ::Gtk::TreeViewColumn.new('DNA-Nucleotide', gtk_cell_renderer_text, { text: 0 })
    column2 = ::Gtk::TreeViewColumn.new('n times',        gtk_cell_renderer_text, { text: 1 })
    # ======================================================================= #
    # Add the two columns to the tree-view next.
    # ======================================================================= #
    @tree_view.append_column(column1)
    @tree_view.append_column(column2)
    @tree_view.is_sortable
    if mode? == 'DNA'
      array1 = %w( A T C G )
    else
      array1 = %w( A U C G )
    end
    array2 = Array.new(array1.size, '0')
    array2 = Bioroebe.return_DNA_composition_hash(use_this_sequence).values.map(&:to_s)
    array = array1.zip(array2)
  # ======================================================================= #
  # === aminoacids
  # ======================================================================= #
  when 'aminoacids'
    array1 = ::Bioroebe.return_array_of_common_aminoacids
    array2 = Bioroebe::CountAmountOfAminoacids.return_composition_hash(use_this_sequence).values.map(&:to_s)
    array = array1.zip(array2) # Zip it up with 0-values here.
  end
  ::Gtk.populate_this_liststore(@list_store, array)
end

#do_generate_a_random_sequence(n_aminoacids = :default) ⇒ Object

#

do_generate_a_random_sequence

This is the method that will be run whenever a new random aminoacid sequence is to be generated.

#


187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 187

def do_generate_a_random_sequence(
    n_aminoacids = :default
  )
  case n_aminoacids
  when nil, :default
    n_aminoacids = GENERATE_N_AMINOACIDS_BY_DEFAULT
  end
  n_aminoacids = n_aminoacids.to_s
  # ======================================================================= #
  # We also must update the entry that displays the aminoacids. We have
  # to check whether we use aminoacids or not, though.
  # ======================================================================= #
  case mode?
  when /RNA/i,
       /DNA/i
    use_this_as_the_new_sequence = :: Bioroebe.generate_random_dna_sequence(n_aminoacids).to_s
    array1 = Bioroebe::DNA_NUCLEOTIDES
    if mode?.to_s == 'RNA'
      use_this_as_the_new_sequence = ::Bioroebe.generate_random_rna_sequence(n_aminoacids).to_s
      array1 = Bioroebe::RNA_NUCLEOTIDES
    end
    hash = {}
    array1.each {|this_key|
      hash[this_key] = 0
    }
    use_this_as_the_new_sequence.chars.each {|this_nucleotide|
      hash[this_nucleotide.to_s] += 1
    }
    array2 = hash.values.map {|entry| entry.to_s }
  else # else assume protein sequence
    use_this_as_the_new_sequence = ::Bioroebe.create_random_aminoacids(n_aminoacids).to_s
    array1 = ::Bioroebe.return_array_of_common_aminoacids
    array2 = Bioroebe::CountAmountOfAminoacids.return_composition_hash(use_this_as_the_new_sequence).values.map(&:to_s)
  end
  @entry_containing_the_sequence.set_content(use_this_as_the_new_sequence)
  # ======================================================================= #
  # Next we have to build up our array, which is then passed into the
  # list-store.
  # ======================================================================= #
  array = array1.zip(array2) # Zip it up with 0-values here.
  # ======================================================================= #
  # Next, populate the liststore with the new data - since as of July
  # 2022 we will sort it based on most aminoacids though:
  # ======================================================================= #
  array = array.sort_by {|a, b| b }.reverse # This sorts by highest first.
  ::Gtk.populate_this_liststore(@list_store, array)
end

#do_generate_a_random_sequence_using_the_value_from_the_proper_entry(i = n_aminoacids? ) ⇒ Object

#

do_generate_a_random_sequence_using_the_value_from_the_proper_entry

This variant will be guaranteed to use the value determined by the gtk entry.

#


507
508
509
510
511
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 507

def do_generate_a_random_sequence_using_the_value_from_the_proper_entry(
    i = n_aminoacids?
  )
  do_generate_a_random_sequence(i)
end

#do_open_a_file_and_then_set_the_correct_valuesObject

#

do_open_a_file_and_then_set_the_correct_values

#


531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 531

def do_open_a_file_and_then_set_the_correct_values
  filename = ::Gtk.select_file(self) {{ # @parent_widget should be of Gtk::Window class or subclass.
    show_hidden:                true,
    add_these_shortcut_folders: ::Bioroebe.log_dir?,
    current_folder:             ::Bioroebe.log_dir?
  }}
  if File.exist? filename
    _ = filename
    if _.end_with? '.fasta'
      require 'bioroebe/fasta_and_fastq/parse_fasta/parse_fasta.rb'
      sequence = Bioroebe.parse_fasta_file(_).sequence?
      set_main_input(sequence)
      do_evaluate_the_sequence
    else
      set_main_input(File.read(_).strip)
    end
  end
end

#do_properly_setup_the_tree_viewObject

#

do_properly_setup_the_tree_view

#


496
497
498
499
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 496

def do_properly_setup_the_tree_view
  @tree_view.linear_sorting
  @tree_view.the_headers_can_be_dragged
end

#enable_proper_sorting_for_the_list_storeObject

#

enable_proper_sorting_for_the_list_store

#


553
554
555
556
557
558
559
560
561
562
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 553

def enable_proper_sorting_for_the_list_store
  # ======================================================================= #
  # Sort the number-of-entries found entry a bit differently. This
  # will sort by putting the most frequently occurring aminoacids
  # or DNA/RNA nucleotides on top.
  # ======================================================================= #
  @list_store.set_sort_func(1) { |_model, iter1, iter2|
    iter2[1].to_i <=> iter1[1].to_i
  }
end

#handle_CSS_rulesObject Also known as: handle_CSS

#

handle_CSS_rules (CSS tag, css tag)

#


157
158
159
160
161
162
163
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 157

def handle_CSS_rules
  use_gtk_paradise_project_css_file
  append_project_css_file
  add_these_custom_CSS_rules '
'
  apply_the_CSS_rules
end

#main_font?Boolean

#

main_font?

#

Returns:

  • (Boolean)


143
144
145
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 143

def main_font?
  USE_THIS_FONT
end

#mode?Boolean

#

mode?

#

Returns:

  • (Boolean)


310
311
312
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 310

def mode?
  @combo_box_for_the_sequence_type.text?
end

#n_aminoacids?Boolean

#

n_aminoacids?

#

Returns:

  • (Boolean)


428
429
430
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 428

def n_aminoacids?
  @entry_for_n_entries_in_the_sequence.text?.to_s
end

#on_right_click_in_the_tree_view_deselect_the_selectionObject

#

on_right_click_in_the_tree_view_deselect_the_selection

#


567
568
569
570
571
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 567

def on_right_click_in_the_tree_view_deselect_the_selection
  @tree_view.on_right_mouse_button_clicked {|widget, event|
    @tree_view.deselect_everything
  }
end

#padding?Boolean

#

padding?

#

Returns:

  • (Boolean)


129
130
131
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 129

def padding?
  8
end

#resetObject

#

reset (reset tag)

#


106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 106

def reset
  super() if respond_to?(:super)
  reset_the_internal_variables
  reset_the_base_module # This must come after reset_the_internal_variables().
  infer_the_namespace
  # ======================================================================= #
  # === @configuration
  # ======================================================================= #
  @configuration = [true, __dir__, namespace?]
  # ======================================================================= #
  # === Set the title, width, height and the font in use.
  # ======================================================================= #
  title_width_height_font(TITLE, WIDTH, HEIGHT, USE_THIS_FONT)
  handle_CSS if use_gtk3?
  # ======================================================================= #
  # === @list_store
  # ======================================================================= #
  @list_store = nil
end

#runObject

#

run (run tag)

#


516
517
518
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 516

def run
  run_super
end

#set_main_input(i) ⇒ Object

#

set_main_input

#


303
304
305
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 303

def set_main_input(i)
  @entry_containing_the_sequence.set_text(i.to_s)
end

#slightly_smaller_font?Boolean

#

slightly_smaller_font?

#

Returns:

  • (Boolean)


150
151
152
# File 'lib/bioroebe/gui/universal_widgets/random_sequence/random_sequence.rb', line 150

def slightly_smaller_font?
  USE_THIS_SLIGHTLY_SMALLER_FONT
end