Module: Bioroebe::EmbeddableInterface

Includes:
Colours, Colours::E
Defined in:
lib/bioroebe/www/embeddable_interface.rb

Constant Summary collapse

USE_THESE_CSS_RULES_FOR_THE_WHOLE_WEBPAGE =
#

USE_THESE_CSS_RULES_FOR_THE_WHOLE_WEBPAGE

#
'

a:link,
a:visited {
text-decoration: none;
color: royalblue;
}

a:hover {
text-decoration: underline;
color: midnightblue;
}

'.dup
TOP_LOGO_IMAGE =
#

TOP_LOGO_IMAGE

#
HtmlTags.image('https://i.imgur.com/Ufb3XW3.png')
USE_THIS_PORT =
'4567'
TITLE =
#

TITLE

#
'The Bioroebe sinatra-interface (Web-API)'
CSS_STYLE_FOR_THE_FORMS =
#

CSS_STYLE_FOR_THE_FORMS

#
'style="margin-left:2em; margin-top:2px"'
BODY_CSS_STYLE =
#

BODY_CSS_STYLE

#
'margin: 0.8em;'
ARRAY_FOR_PALINDROMES =
#

ARRAY_FOR_PALINDROMES

#
%w(
  /palindromes
)
ARRAY_FOR_CHUNKED_DISPLAY =
#

ARRAY_FOR_CHUNKED_DISPLAY

List the APIs for displaying a chunked display of the DNA sequence at hand.

#
%w(
  /to_chunked
  /chunked_display
  /chunked
)
ARRAY_FOR_TO_AMINOACIDS_CONVERSION =
#

ARRAY_FOR_TO_AMINOACIDS_CONVERSION

#
%w(
  /to_aa /to_aminoacids
)
ARRAY_AVAILABLE_TOPLEVEL_ACTIONS_FOR_THE_SINATRA_INTERFACE =
#

ARRAY_AVAILABLE_TOPLEVEL_ACTIONS_FOR_THE_SINATRA_INTERFACE

This Array contains the actionable links for the sinatra-interface of the BioRoebe project.

#
%w(
  /blosum
  /compseq
  /codon_frequency_of_this_string
  /is_palindrome
  /frequency_per_thousand
  /n_stop_codons_in_this_sequence
  /to_aa
  /to_chunked
  /to_dna
  /random_aminoacids
  /reverse_complement
  /mirror
  /palindromes
  /shuffleseq
  /view
)
INPUT_TYPE_TEXT_AND_BR_TAG =
#

INPUT_TYPE_TEXT_AND_BR_TAG

#
'<input type="text" value="" autocomplete="off" name="user_input" '\
'style="border:3px solid slateblue; padding: 4px; width: 250px"><br>'

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.localhost_to_use?Boolean

#

Bioroebe::EmbeddableInterface.localhost_to_use?

#

Returns:

  • (Boolean)


254
255
256
# File 'lib/bioroebe/www/embeddable_interface.rb', line 254

def self.localhost_to_use?
  "http://localhost:#{USE_THIS_PORT}/"
end

.routes?Boolean

#

Bioroebe::EmbeddableInterface.routes?

Define all legal routes via this Array. This Array will then be used to add more routes to any sinatra-application that needs it.

#

Returns:

  • (Boolean)


142
143
144
145
146
147
148
149
150
151
152
153
# File 'lib/bioroebe/www/embeddable_interface.rb', line 142

def self.routes?
  [
    'to_rna',
    'to_rna/*',
    'to_dna',
    'to_dna/*',
    'to_chunked',
    'to_chunked/*',
    ARRAY_FOR_PALINDROMES.first,
    ARRAY_FOR_PALINDROMES.first+'/*'
  ]
end

Instance Method Details

#erev(i = '') ⇒ Object

#

erev

#


237
238
239
# File 'lib/bioroebe/www/embeddable_interface.rb', line 237

def erev(i = '')
  ::Bioroebe.erev(i)
end

#method_codon_frequency_of_this_stringObject

#

method_codon_frequency_of_this_string

#


743
744
745
746
747
748
749
750
751
752
753
# File 'lib/bioroebe/www/embeddable_interface.rb', line 743

def method_codon_frequency_of_this_string
  Cyberweb.template(
    title:          'Codon Frequence of this string',
    body_css_style: BODY_CSS_STYLE,
    body:           return_header_codon_frequency_of_this_string+
      HtmlTags.p(
        'This entry point can be used to show the codon frequency '\
        'of the given string.')+
      footer
  ).to_s
end

#method_codon_frequency_per_thousandObject

#

method_codon_frequency_per_thousand

#


758
759
760
761
762
763
764
765
766
767
768
# File 'lib/bioroebe/www/embeddable_interface.rb', line 758

def method_codon_frequency_per_thousand
  Cyberweb.template(
    title: 'Codon Frequence per thousand',
    body_css_style: BODY_CSS_STYLE,
    body:  return_header_codon_frequency_of_this_string+
      HtmlTags.p(
        'This entry point can be used to show the codon frequency '\
        'of the given string.')+
      footer
  ).to_s
end

#method_random_aminoacidsObject

#

method_random_aminoacids

#


688
689
690
691
692
693
694
695
696
697
698
# File 'lib/bioroebe/www/embeddable_interface.rb', line 688

def method_random_aminoacids
  Cyberweb::HtmlTemplate[
    title: 'Random Aminoacids',
    body:  return_header_random_aminoacids+
      HtmlTags.p(
        'This entry point can be used to "create" a random sequence '\
        'of amino acids. Simply input how many aminoacids to '\
        'create, as a <b>number</b>.')+
      footer
  ].to_s
end

#method_reverse_complementObject

#

method_reverse_complement

API:

http://localhost:4568/reverse_complement
#


672
673
674
675
676
677
678
679
680
681
682
683
# File 'lib/bioroebe/www/embeddable_interface.rb', line 672

def method_reverse_complement
  return_intro_for_reverse_complement_conversion+
  p(
    "You can <b>reverse complement</b> a DNA sequence through this API.<br>\n<br>\n"
  )+
  p(
    "Simply input the nucleotide String, such as \"ATGCT\", "\
    "without the \"\" quotes.<br><br>\n\n"
  )+
  return_form_for_reverse_complement_action+
  hyperlink_paragraph
end

#method_shuffleseqObject

#

method_shuffleseq

#


408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
# File 'lib/bioroebe/www/embeddable_interface.rb', line 408

def method_shuffleseq
  Cyberweb::HtmlTemplate[
    title: 'Shuffleseq',
    body:  return_intro_for_shuffleseq+
      HtmlTags.p(
        'You can shuffle-seq (randomize) a DNA sequence through this API.'
      )+
      HtmlTags.p(
        'Simply input the nucleotide String, such as "ATGCT", '\
        'without the "" quotes.'
      )+
      return_form_for_shuffleseq_action+
      hyperlink_paragraph
  ].to_s
end

#not_yet_implementedObject

#

not_yet_implemented

This can be added as a placeholder for future changes.

#


530
531
532
533
534
# File 'lib/bioroebe/www/embeddable_interface.rb', line 530

def not_yet_implemented
  HtmlTags.p(
    "Not yet implemented."
  )
end

#return_default_submit_buttonObject

#

return_default_submit_button

#


315
316
317
318
# File 'lib/bioroebe/www/embeddable_interface.rb', line 315

def return_default_submit_button
  '<input type="submit" name="user_input_submit" value="Submit" style="3px dotted royalblue; '\
  'color: white; background-color: olive; font-size: 1.25em; margin:3px; padding: 4px">'
end

#return_explanation_of_how_to_use_the_aminoacid_conversionObject

#

return_explanation_of_how_to_use_the_aminoacid_conversion

#


580
581
582
583
584
585
586
587
588
589
# File 'lib/bioroebe/www/embeddable_interface.rb', line 580

def return_explanation_of_how_to_use_the_aminoacid_conversion
  Cyberweb::HtmlTemplate[
    title: 'To aminoacid conversion',
    body: HtmlTags.p(
      'This functionality requires that a DNA/RNA
       sequence is used as input, which will then be converted
       into the corresponding aminoacid sequence.'
    )
  ].to_s
end

#return_form_for_blosum_action(route_to_this_action = '/blosum/') ⇒ Object

#

return_form_for_blosum_action

#


303
304
305
306
307
308
309
310
# File 'lib/bioroebe/www/embeddable_interface.rb', line 303

def return_form_for_blosum_action(
    route_to_this_action = '/blosum/'
  )
  '<form id="blosum" autocomplete="off" '+CSS_STYLE_FOR_THE_FORMS+' action="'+route_to_this_action+'">'+
   INPUT_TYPE_TEXT_AND_BR_TAG+
   return_default_submit_button+'
   </form>'
end

#return_form_for_codon_frequency_of_this_string(route_to_this_action = '/codon_frequency_of_this_string/') ⇒ Object

#

return_form_for_codon_frequency_of_this_string

#


731
732
733
734
735
736
737
738
# File 'lib/bioroebe/www/embeddable_interface.rb', line 731

def return_form_for_codon_frequency_of_this_string(
    route_to_this_action = '/codon_frequency_of_this_string/'
  )
  '<form id="codon_frequency_of_this_string" '+CSS_STYLE_FOR_THE_FORMS+' action="'+route_to_this_action+'">'+
   INPUT_TYPE_TEXT_AND_BR_TAG+
   return_default_submit_button+'
   </form>'
end

#return_form_for_compseq_action(route_to_this_action = '/compseq/') ⇒ Object

#

return_form_for_compseq_action

#


291
292
293
294
295
296
297
298
# File 'lib/bioroebe/www/embeddable_interface.rb', line 291

def return_form_for_compseq_action(
    route_to_this_action = '/compseq/'
  )
  '<form id="compseq" '+CSS_STYLE_FOR_THE_FORMS+' action="'+route_to_this_action+'">'+
   INPUT_TYPE_TEXT_AND_BR_TAG+
   return_default_submit_button+'
   </form>'
end

#return_form_for_is_a_palindrome_action(route_to_this_action = '/is_palindrome/') ⇒ Object

#

return_form_for_is_a_palindrome_action

#


504
505
506
507
508
509
510
511
# File 'lib/bioroebe/www/embeddable_interface.rb', line 504

def return_form_for_is_a_palindrome_action(
    route_to_this_action = '/is_palindrome/'
  )
  '<form id="is_palindrome" '+CSS_STYLE_FOR_THE_FORMS+' action="'+route_to_this_action+'">'+
   INPUT_TYPE_TEXT_AND_BR_TAG+
   return_default_submit_button+'
   </form>'
end

#return_form_for_mirror_repeat_action(route_to_this_action = '/mirror/') ⇒ Object

#

return_form_for_mirror_repeat_action

This method will show the <form> for the DNA-input action.

#


655
656
657
658
659
660
661
662
# File 'lib/bioroebe/www/embeddable_interface.rb', line 655

def return_form_for_mirror_repeat_action(
    route_to_this_action = '/mirror/'
  )
  '<form id="mirror" autocomplete="off" '+CSS_STYLE_FOR_THE_FORMS+' action="'+route_to_this_action+'">'+
   INPUT_TYPE_TEXT_AND_BR_TAG+
   return_default_submit_button+'
   </form>'
end

#return_form_for_n_stop_codons_in_this_sequence(route_to_this_action = '/n_stop_codons_in_this_sequence/') ⇒ Object

#

return_form_for_n_stop_codons_in_this_sequence

#


224
225
226
227
228
229
230
231
232
# File 'lib/bioroebe/www/embeddable_interface.rb', line 224

def return_form_for_n_stop_codons_in_this_sequence(
    route_to_this_action = '/n_stop_codons_in_this_sequence/'
  )
  '<form id="'+route_to_this_action.delete('/')+'" '+
   CSS_STYLE_FOR_THE_FORMS+' action="'+route_to_this_action+'">'+
   INPUT_TYPE_TEXT_AND_BR_TAG+
   return_default_submit_button+'
   </form>'
end

#return_form_for_palindromes_action(route_to_this_action = '/palindromes/') ⇒ Object

#

return_form_for_palindromes_action

#


492
493
494
495
496
497
498
499
# File 'lib/bioroebe/www/embeddable_interface.rb', line 492

def return_form_for_palindromes_action(
    route_to_this_action = '/palindromes/'
  )
  '<form id="palindromes" '+CSS_STYLE_FOR_THE_FORMS+' action="'+route_to_this_action+'">'+
   INPUT_TYPE_TEXT_AND_BR_TAG+
   return_default_submit_button+'
   </form>'
end

#return_form_for_reverse_complement_action(route_to_this_action = '/reverse_complement/') ⇒ Object

#

return_form_for_reverse_complement_action

#


719
720
721
722
723
724
725
726
# File 'lib/bioroebe/www/embeddable_interface.rb', line 719

def return_form_for_reverse_complement_action(
    route_to_this_action = '/reverse_complement/'
  )
  '<form id="reverse_complement" '+CSS_STYLE_FOR_THE_FORMS+' action="'+route_to_this_action+'">'+
   INPUT_TYPE_TEXT_AND_BR_TAG+
   return_default_submit_button+'
   </form>'
end

#return_form_for_shuffleseq_action(route_to_this_action = '/shuffleseq/') ⇒ Object

#

return_form_for_shuffleseq_action

#


437
438
439
440
441
442
443
444
# File 'lib/bioroebe/www/embeddable_interface.rb', line 437

def return_form_for_shuffleseq_action(
    route_to_this_action = '/shuffleseq/'
  )
  '<form id="shuffleseq" '+CSS_STYLE_FOR_THE_FORMS+' action="'+route_to_this_action+'">'+
   INPUT_TYPE_TEXT_AND_BR_TAG+
   return_default_submit_button+'
   </form>'
end

#return_form_for_to_aa_action(route_to_this_action = '/to_aa/') ⇒ Object

#

return_form_for_to_aa_action

#


594
595
596
597
598
599
600
601
# File 'lib/bioroebe/www/embeddable_interface.rb', line 594

def return_form_for_to_aa_action(
    route_to_this_action = '/to_aa/'
  )
  '<form id="to_aa" autocomplete="off" '+CSS_STYLE_FOR_THE_FORMS+' action="'+route_to_this_action+'">'+
   INPUT_TYPE_TEXT_AND_BR_TAG+
   return_default_submit_button+'
   </form>'
end

#return_form_for_to_dna_action(route_to_this_action = '/to_dna/*') ⇒ Object

#

return_form_for_to_dna_action

This method will show the <form> for the DNA-input action.

#


325
326
327
328
329
330
331
332
333
334
# File 'lib/bioroebe/www/embeddable_interface.rb', line 325

def return_form_for_to_dna_action(
    route_to_this_action = '/to_dna/*'
  )
  '<form id="to_dna" autocomplete="off" '+CSS_STYLE_FOR_THE_FORMS+
  ' action="'+route_to_this_action+'"'+
  ' method="post">'+
   INPUT_TYPE_TEXT_AND_BR_TAG+
   return_default_submit_button+'
   </form>'
end

#return_header_codon_frequency_of_this_stringObject

#

return_header_codon_frequency_of_this_string

#


711
712
713
714
# File 'lib/bioroebe/www/embeddable_interface.rb', line 711

def return_header_codon_frequency_of_this_string
  HtmlTags.h1('Codon frequence of this string',
    css_style: 'margin-left:0.25em;')
end

#return_header_for_palindromes(title_to_use = 'Palindromes') ⇒ Object

#

return_header_for_palindromes

#


516
517
518
519
520
521
522
523
# File 'lib/bioroebe/www/embeddable_interface.rb', line 516

def return_header_for_palindromes(
    title_to_use = 'Palindromes'
  )
  HtmlTags.h1(
    title_to_use,
    css_style: 'margin-left:0.25em;'
  )
end

#return_header_random_aminoacidsObject

#

return_header_random_aminoacids

#


703
704
705
706
# File 'lib/bioroebe/www/embeddable_interface.rb', line 703

def return_header_random_aminoacids
  HtmlTags.h1('Random aminoacids',
    css_style: 'margin-left:0.25em;')
end

#return_header_to_aminoacid_conversionObject

#

return_header_to_aminoacid_conversion

#


631
632
633
634
635
636
637
638
# File 'lib/bioroebe/www/embeddable_interface.rb', line 631

def return_header_to_aminoacid_conversion
  Cyberweb::HtmlTemplate[
    title: 'To aminoacid conversion',
    body: HtmlTags.h1('To aminoacid conversion',
      css_style: 'margin-left:0.25em;'
    )
  ].to_s
end

#return_header_to_chunked_displayObject

#

return_header_to_chunked_display

#


549
550
551
552
553
554
# File 'lib/bioroebe/www/embeddable_interface.rb', line 549

def return_header_to_chunked_display
  HtmlTags.h1(
    'To chunked-display',
    css_style: 'margin-left:0.25em;'
  )
end
#

This method will bundle together the different indices containing the hyperlinks that will be shown on the root-directory.

#


342
343
344
345
346
347
348
349
350
351
352
353
354
# File 'lib/bioroebe/www/embeddable_interface.rb', line 342

def return_index_of_hyperlinks
  use_this_uniform_css_style = 
    'margin-left: 2.0em; font-weight: bold; font-size: larger'
  result = ''.dup
  ARRAY_AVAILABLE_TOPLEVEL_ACTIONS_FOR_THE_SINATRA_INTERFACE.each {|entry|
    result <<
      HtmlTags.a(
        entry, css_style: use_this_uniform_css_style
      )+
      '<br>'
  }
  result
end

#return_intro_for_blosumObject

#

return_intro_for_blosum

#


643
644
645
646
647
648
# File 'lib/bioroebe/www/embeddable_interface.rb', line 643

def return_intro_for_blosum
  HtmlTags.h1(
    '(<b>16</b>) Blosum',
    css_style: 'margin-left:0.25em;'
  )
end

#return_intro_for_compseqObject

#

return_intro_for_compseq

#


539
540
541
542
543
544
# File 'lib/bioroebe/www/embeddable_interface.rb', line 539

def return_intro_for_compseq
  HtmlTags.h1(
    '(<b>7</b>) Compseq a DNA sequence',
    css_style: 'margin-left:0.25em;'
  )
end

#return_intro_for_mirror_repeat_conversionObject

#

return_intro_for_mirror_repeat_conversion

#


427
428
429
430
431
432
# File 'lib/bioroebe/www/embeddable_interface.rb', line 427

def return_intro_for_mirror_repeat_conversion
  HtmlTags.h1(
    '<b>10</b>) Mirror Repeat',
    css_style: 'margin-left:0.25em;'
  )
end

#return_intro_for_n_stop_codons_in_this_sequenceObject

#

return_intro_for_n_stop_codons_in_this_sequence

#


214
215
216
217
218
219
# File 'lib/bioroebe/www/embeddable_interface.rb', line 214

def return_intro_for_n_stop_codons_in_this_sequence
  HtmlTags.h1(
    '(<b>6</b>) n stop codons in this sequence',
    css_style: 'margin-left:0.25em;'
  )
end

#return_intro_for_reverse_complement_conversionObject

#

return_intro_for_reverse_complement_conversion

#


244
245
246
247
248
249
# File 'lib/bioroebe/www/embeddable_interface.rb', line 244

def return_intro_for_reverse_complement_conversion
  HtmlTags.h1(
    '(<b>5</b>) Reverse complement a DNA sequence',
    css_style: 'margin-left:0.25em;'
  )
end

#return_intro_for_shuffleseqObject

#

return_intro_for_shuffleseq

#


482
483
484
485
486
487
# File 'lib/bioroebe/www/embeddable_interface.rb', line 482

def return_intro_for_shuffleseq
  HtmlTags.h1(
    '(<b>11</b>) Shuffleseq (randomize) a given DNA sequence',
    css_style: 'margin-left:0.25em;'
  )
end

#return_intro_for_to_dna_conversion(i = '(<b>2</b>) ') ⇒ Object

#

return_intro_for_to_dna_conversion

#


467
468
469
470
471
472
473
474
475
476
477
# File 'lib/bioroebe/www/embeddable_interface.rb', line 467

def return_intro_for_to_dna_conversion(
    i = '(<b>2</b>) '
  )
  Cyberweb::HtmlTemplate[
    title: 'To DNA conversion (from RNA)',
    body: HtmlTags.h1(
            "#{i}To DNA conversion (from RNA)",
            css_style: 'margin-left:0.25em;'
          )
  ].to_s
end
#
#


606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
# File 'lib/bioroebe/www/embeddable_interface.rb', line 606

def return_paragraph_of_hyperlinks
  HtmlTags.p(
    '<span style="font-size: larger">
    The following <b>'+
    ARRAY_AVAILABLE_TOPLEVEL_ACTIONS_FOR_THE_SINATRA_INTERFACE.size.to_s+
    '</b> options are available for the '\
    '<b>Bioroebe-sinatra interface</b>: </span>'\
    '<br><br>'+
    return_index_of_hyperlinks,
    css_style: 'margin-left: 2em; '\
               'margin-right: 2em; '\
               'padding: 1.25em; '\
               'font-size: smaller; '\
               'border: 2px dotted darkblue;
                float: right;
                top: 1em;
               '
  )
end

#return_sinatra_method_for_compseqObject

#

return_sinatra_method_for_compseq

#


559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
# File 'lib/bioroebe/www/embeddable_interface.rb', line 559

def return_sinatra_method_for_compseq
  body = return_intro_for_compseq+
  HtmlTags.p(
    'You can compseq (compare sequence) a '\
    'DNA sequence through this API.'
  )+
  HtmlTags.p(
    'Simply input the nucleotide String, such as "ATGCT", '\
    'without the "" quotes.'
  )+
  return_form_for_compseq_action+
  hyperlink_paragraph
  Cyberweb::HtmlTemplate[
    title: title?,
    body: body
  ].to_s
end

#return_sinatra_to_chunkedObject

#

return_sinatra_to_chunked

This is: localhost:4567/to_chunked

#


398
399
400
401
402
403
# File 'lib/bioroebe/www/embeddable_interface.rb', line 398

def return_sinatra_to_chunked
  Cyberweb::HtmlTemplate[
    title: 'Chunked display',
    body:  'This will display in a chunked manner..<br><br>'
  ].to_s
end

#return_sinatra_to_chunked_with_arguments(i = web_params_as_string? ) ⇒ Object

#

return_sinatra_to_chunked_with_arguments

Usage example:

http://localhost:4567/to_chunked/UGAUCGUACUGCAUGACUGAUGGUACUGACCAGUACUGCAUGACUGAUGGUACUGACCAGUACUGCAUGACUGAUGGUACUGACCAGUACUGCAUGACUGAUGGUACUGACCA
#


454
455
456
457
458
459
460
461
462
# File 'lib/bioroebe/www/embeddable_interface.rb', line 454

def return_sinatra_to_chunked_with_arguments(
    i = web_params_as_string?
  )
  i = i.dup if i.frozen?
  Cyberweb::HtmlTemplate[
    title: 'Chunked display',
    body:  HtmlTags.pre(HtmlTags.bold(::Bioroebe.chunked_display(i)))
  ].to_s
end

#return_sinatra_to_dnaObject

#

return_sinatra_to_dna

This is:

http://localhost:4567/to_dna
#


266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
# File 'lib/bioroebe/www/embeddable_interface.rb', line 266

def return_sinatra_to_dna
  if Object.const_defined?(:Roebe) and Roebe.const_defined?(:Controller)
    _ = return_intro_for_to_dna_conversion('')
  else
    _ = return_intro_for_to_dna_conversion
  end
  Cyberweb.html_template(
    title: 'Convert to DNA',
    body:  _+
    p(
      "You can \"<b>convert</b>\" a RNA sequence into DNA through "\
      "this API.<br>\n"
    )+
    p(
      'Simply input the nucleotide String, such as "ATGCT", '\
      'without the "" quotes.'+"<br>"
    )+
    return_form_for_to_dna_action+
    hyperlink_paragraph
  )
end

#return_sinatra_to_dna_with_arguments(i = web_params_as_string? ) ⇒ Object

#

return_sinatra_to_dna_with_arguments

Usage example:

http://localhost:4567/to_dna/UGAUCGUACUGCAUGACUGAUGGUACUGACCA
#


382
383
384
385
386
387
388
389
390
391
# File 'lib/bioroebe/www/embeddable_interface.rb', line 382

def return_sinatra_to_dna_with_arguments(
    i = web_params_as_string?
  )
  i = i.dup if i.frozen?
  _ = ''.dup
  converted = Bioroebe.to_dna(i.to_s)
  _ << HtmlTags.bold(converted)+
       ' ('+converted.size.to_s+' nucleotides)<br>'
  return _
end

#return_sinatra_to_rna_with_arguments(i = web_params_as_string? ) ⇒ Object

#

return_sinatra_to_rna_with_arguments

Usage example:

http://localhost:4567/to_rna/CAGCATCTAGTCATAGTCGATGCATGCTAGTCACA
#


364
365
366
367
368
369
370
371
372
# File 'lib/bioroebe/www/embeddable_interface.rb', line 364

def return_sinatra_to_rna_with_arguments(
    i = web_params_as_string?
  )
  i = i.dup if i.frozen?
  _ = ''.dup
  converted = Bioroebe.to_rna(i)
  _ << HtmlTags.bold(converted)+' ('+converted.size.to_s+' nucleotides)<br>'
  return _
end

#return_view_stringObject Also known as: return_root_string

#

return_view_string

This method will return the main “root” String - that is, the general index.

#


185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/bioroebe/www/embeddable_interface.rb', line 185

def return_view_string
  body = HtmlTags.h1(
    TOP_LOGO_IMAGE+"<br>\n"+
    TITLE,
    css_style: 'margin-left: 0.40em;'
  )+
  p(
    "The <b>following actions</b>, as links, can be used to make use "\
    "of the Bioroebe project's www interface (through <b>sinatra</b>).<br>\n<br>\n"
  )+
  return_index_of_hyperlinks
  Cyberweb.html_template(
    title:            title?,
    css_rules_to_use: USE_THESE_CSS_RULES_FOR_THE_WHOLE_WEBPAGE,
    body_css_style:   BODY_CSS_STYLE,
    body:             body
  )
end

#title?Boolean

#

title?

#

Returns:

  • (Boolean)


70
71
72
# File 'lib/bioroebe/www/embeddable_interface.rb', line 70

def title?
  TITLE
end