Module: Bioroebe::EmbeddableInterface
- Includes:
- Colours, Colours::E
- Defined in:
- lib/bioroebe/www/embeddable_interface.rb
Constant Summary collapse
- USE_THIS_PORT =
'4567'
- CSS_STYLE_FOR_THE_FORMS =
#
CSS_STYLE_FOR_THE_FORMS
#
'style="margin-left:2em; margin-top:2px"'
- 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
-
.localhost_to_use? ⇒ Boolean
# === Bioroebe::EmbeddableInterface.localhost_to_use? ========================================================================= #.
-
.routes? ⇒ Boolean
# === Bioroebe::EmbeddableInterface.routes?.
Instance Method Summary collapse
-
#erev(i = '') ⇒ Object
# === erev ========================================================================= #.
-
#method_codon_frequency_of_this_string ⇒ Object
# === method_codon_frequency_of_this_string ========================================================================= #.
-
#method_codon_frequency_per_thousand ⇒ Object
# === method_codon_frequency_per_thousand ========================================================================= #.
-
#method_random_aminoacids ⇒ Object
# === method_random_aminoacids ========================================================================= #.
-
#method_reverse_complement ⇒ Object
# === method_reverse_complement ========================================================================= #.
-
#method_shuffleseq ⇒ Object
# === method_shuffleseq ========================================================================= #.
-
#not_yet_implemented ⇒ Object
# === not_yet_implemented.
-
#return_default_submit_button ⇒ Object
# === return_default_submit_button ========================================================================= #.
-
#return_explanation_of_how_to_use_the_aminoacid_conversion ⇒ Object
# === return_explanation_of_how_to_use_the_aminoacid_conversion ========================================================================= #.
-
#return_form_for_blosum_action(route_to_this_action = '/blosum/') ⇒ Object
# === return_form_for_blosum_action ========================================================================= #.
-
#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 ========================================================================= #.
-
#return_form_for_compseq_action(route_to_this_action = '/compseq/') ⇒ Object
# === return_form_for_compseq_action ========================================================================= #.
-
#return_form_for_is_a_palindrome_action(route_to_this_action = '/is_palindrome/') ⇒ Object
# === return_form_for_is_a_palindrome_action ========================================================================= #.
-
#return_form_for_mirror_repeat_action(route_to_this_action = '/mirror/') ⇒ Object
# === return_form_for_mirror_repeat_action.
-
#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 ========================================================================= #.
-
#return_form_for_palindromes_action(route_to_this_action = '/palindromes/') ⇒ Object
# === return_form_for_palindromes_action ========================================================================= #.
-
#return_form_for_reverse_complement_action(route_to_this_action = '/reverse_complement/') ⇒ Object
# === return_form_for_reverse_complement_action ========================================================================= #.
-
#return_form_for_shuffleseq_action(route_to_this_action = '/shuffleseq/') ⇒ Object
# === return_form_for_shuffleseq_action ========================================================================= #.
-
#return_form_for_to_aa_action(route_to_this_action = '/to_aa/') ⇒ Object
# === return_form_for_to_aa_action ========================================================================= #.
-
#return_form_for_to_dna_action(route_to_this_action = '/to_dna/*') ⇒ Object
# === return_form_for_to_dna_action.
-
#return_header_codon_frequency_of_this_string ⇒ Object
# === return_header_codon_frequency_of_this_string ========================================================================= #.
-
#return_header_for_palindromes(title_to_use = 'Palindromes') ⇒ Object
# === return_header_for_palindromes ========================================================================= #.
-
#return_header_random_aminoacids ⇒ Object
# === return_header_random_aminoacids ========================================================================= #.
-
#return_header_to_aminoacid_conversion ⇒ Object
# === return_header_to_aminoacid_conversion ========================================================================= #.
-
#return_header_to_chunked_display ⇒ Object
# === return_header_to_chunked_display ========================================================================= #.
-
#return_index_of_hyperlinks ⇒ Object
(also: #return_the_hyperlinks)
# === return_index_of_hyperlinks.
-
#return_intro_for_blosum ⇒ Object
# === return_intro_for_blosum =========================================================================== #.
-
#return_intro_for_compseq ⇒ Object
# === return_intro_for_compseq =========================================================================== #.
-
#return_intro_for_mirror_repeat_conversion ⇒ Object
# === return_intro_for_mirror_repeat_conversion =========================================================================== #.
-
#return_intro_for_n_stop_codons_in_this_sequence ⇒ Object
# === return_intro_for_n_stop_codons_in_this_sequence =========================================================================== #.
-
#return_intro_for_reverse_complement_conversion ⇒ Object
# === return_intro_for_reverse_complement_conversion =========================================================================== #.
-
#return_intro_for_shuffleseq ⇒ Object
# === return_intro_for_shuffleseq =========================================================================== #.
-
#return_intro_for_to_dna_conversion(i = '(<b>2</b>) ') ⇒ Object
# === return_intro_for_to_dna_conversion =========================================================================== #.
-
#return_paragraph_of_hyperlinks ⇒ Object
(also: #footer, #hyperlink_paragraph, #hyperlinks_paragraph)
# === return_paragraph_of_hyperlinks ========================================================================= #.
-
#return_sinatra_method_for_compseq ⇒ Object
# === return_sinatra_method_for_compseq ========================================================================= #.
-
#return_sinatra_to_chunked ⇒ Object
# === return_sinatra_to_chunked.
-
#return_sinatra_to_chunked_with_arguments(i = web_params_as_string? ) ⇒ Object
# === return_sinatra_to_chunked_with_arguments.
-
#return_sinatra_to_dna ⇒ Object
# === return_sinatra_to_dna.
-
#return_sinatra_to_dna_with_arguments(i = web_params_as_string? ) ⇒ Object
# === return_sinatra_to_dna_with_arguments.
-
#return_sinatra_to_rna_with_arguments(i = web_params_as_string? ) ⇒ Object
# === return_sinatra_to_rna_with_arguments.
-
#return_view_string ⇒ Object
(also: #return_root_string)
# === return_view_string ========================================================================= #.
-
#title? ⇒ Boolean
# === title? ========================================================================= #.
Class Method Details
.localhost_to_use? ⇒ Boolean
#
Bioroebe::EmbeddableInterface.localhost_to_use?
#
193 194 195 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 193 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.
#
106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 106 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
#
176 177 178 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 176 def erev(i = '') ::Bioroebe.erev(i) end |
#method_codon_frequency_of_this_string ⇒ Object
#
method_codon_frequency_of_this_string
#
699 700 701 702 703 704 705 706 707 708 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 699 def method_codon_frequency_of_this_string Cyberweb::HtmlTemplate[ title: 'Codon Frequence of this string', 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.')+ ].to_s end |
#method_codon_frequency_per_thousand ⇒ Object
#
method_codon_frequency_per_thousand
#
713 714 715 716 717 718 719 720 721 722 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 713 def method_codon_frequency_per_thousand Cyberweb::HtmlTemplate[ title: 'Codon Frequence per thousand', 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.')+ ].to_s end |
#method_random_aminoacids ⇒ Object
#
method_random_aminoacids
#
644 645 646 647 648 649 650 651 652 653 654 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 644 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>.')+ ].to_s end |
#method_reverse_complement ⇒ Object
#
method_reverse_complement
#
628 629 630 631 632 633 634 635 636 637 638 639 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 628 def method_reverse_complement return_intro_for_reverse_complement_conversion+ HtmlTags.p( 'You can reverse complement a DNA sequence through this API.' )+ HtmlTags.p( 'Simply input the nucleotide String, such as "ATGCT", '\ 'without the "" quotes.' )+ return_form_for_reverse_complement_action+ hyperlink_paragraph end |
#method_shuffleseq ⇒ Object
#
method_shuffleseq
#
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 350 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_implemented ⇒ Object
#
not_yet_implemented
This can be added as a placeholder for future changes.
#
472 473 474 475 476 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 472 def not_yet_implemented HtmlTags.p( "Not yet implemented." ) end |
#return_default_submit_button ⇒ Object
#
return_default_submit_button
#
257 258 259 260 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 257 def '<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_conversion ⇒ Object
#
return_explanation_of_how_to_use_the_aminoacid_conversion
#
522 523 524 525 526 527 528 529 530 531 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 522 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
#
245 246 247 248 249 250 251 252 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 245 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+ +' </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
#
687 688 689 690 691 692 693 694 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 687 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+ +' </form>' end |
#return_form_for_compseq_action(route_to_this_action = '/compseq/') ⇒ Object
#
return_form_for_compseq_action
#
233 234 235 236 237 238 239 240 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 233 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+ +' </form>' end |
#return_form_for_is_a_palindrome_action(route_to_this_action = '/is_palindrome/') ⇒ Object
#
return_form_for_is_a_palindrome_action
#
446 447 448 449 450 451 452 453 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 446 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+ +' </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.
#
616 617 618 619 620 621 622 623 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 616 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+ +' </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
#
163 164 165 166 167 168 169 170 171 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 163 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+ +' </form>' end |
#return_form_for_palindromes_action(route_to_this_action = '/palindromes/') ⇒ Object
#
return_form_for_palindromes_action
#
434 435 436 437 438 439 440 441 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 434 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+ +' </form>' end |
#return_form_for_reverse_complement_action(route_to_this_action = '/reverse_complement/') ⇒ Object
#
return_form_for_reverse_complement_action
#
675 676 677 678 679 680 681 682 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 675 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+ +' </form>' end |
#return_form_for_shuffleseq_action(route_to_this_action = '/shuffleseq/') ⇒ Object
#
return_form_for_shuffleseq_action
#
379 380 381 382 383 384 385 386 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 379 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+ +' </form>' end |
#return_form_for_to_aa_action(route_to_this_action = '/to_aa/') ⇒ Object
#
return_form_for_to_aa_action
#
536 537 538 539 540 541 542 543 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 536 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+ +' </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.
#
267 268 269 270 271 272 273 274 275 276 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 267 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+ +' </form>' end |
#return_header_codon_frequency_of_this_string ⇒ Object
#
return_header_codon_frequency_of_this_string
#
667 668 669 670 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 667 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
#
458 459 460 461 462 463 464 465 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 458 def return_header_for_palindromes( title_to_use = 'Palindromes' ) HtmlTags.h1( title_to_use, css_style: 'margin-left:0.25em;' ) end |
#return_header_random_aminoacids ⇒ Object
#
return_header_random_aminoacids
#
659 660 661 662 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 659 def return_header_random_aminoacids HtmlTags.h1('Random aminoacids', css_style: 'margin-left:0.25em;') end |
#return_header_to_aminoacid_conversion ⇒ Object
#
return_header_to_aminoacid_conversion
#
592 593 594 595 596 597 598 599 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 592 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_display ⇒ Object
#
return_header_to_chunked_display
#
491 492 493 494 495 496 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 491 def return_header_to_chunked_display HtmlTags.h1( 'To chunked-display', css_style: 'margin-left:0.25em;' ) end |
#return_index_of_hyperlinks ⇒ Object Also known as: return_the_hyperlinks
#
return_index_of_hyperlinks
This method will bundle together the different indices containing the hyperlinks that will be shown on the root-directory.
#
284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 284 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_blosum ⇒ Object
#
return_intro_for_blosum
#
604 605 606 607 608 609 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 604 def return_intro_for_blosum HtmlTags.h1( '(<b>16</b>) Blosum', css_style: 'margin-left:0.25em;' ) end |
#return_intro_for_compseq ⇒ Object
#
return_intro_for_compseq
#
481 482 483 484 485 486 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 481 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_conversion ⇒ Object
#
return_intro_for_mirror_repeat_conversion
#
369 370 371 372 373 374 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 369 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_sequence ⇒ Object
#
return_intro_for_n_stop_codons_in_this_sequence
#
153 154 155 156 157 158 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 153 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_conversion ⇒ Object
#
return_intro_for_reverse_complement_conversion
#
183 184 185 186 187 188 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 183 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_shuffleseq ⇒ Object
#
return_intro_for_shuffleseq
#
424 425 426 427 428 429 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 424 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
#
409 410 411 412 413 414 415 416 417 418 419 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 409 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 |
#return_paragraph_of_hyperlinks ⇒ Object Also known as: hyperlink_paragraph, hyperlinks_paragraph ,
#
return_paragraph_of_hyperlinks
#
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 548 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_compseq ⇒ Object
#
return_sinatra_method_for_compseq
#
501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 501 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_chunked ⇒ Object
340 341 342 343 344 345 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 340 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
#
396 397 398 399 400 401 402 403 404 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 396 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_dna ⇒ Object
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 202 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::HtmlTemplate[ title: 'Convert to DNA', body: _+ HtmlTags.p( 'You can "convert" a RNA sequence into DNA through this API.' )+ HtmlTags.p( 'Simply input the nucleotide String, such as "ATGCT", '\ 'without the "" quotes.' )+ return_form_for_to_dna_action+ hyperlink_paragraph ].to_s 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
#
324 325 326 327 328 329 330 331 332 333 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 324 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
#
306 307 308 309 310 311 312 313 314 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 306 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_string ⇒ Object Also known as: return_root_string
#
return_view_string
#
573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 573 def return_view_string body = HtmlTags.h1( 'Bioroebe sinatra-interface!', css_style: 'margin-left:0.25em;' )+ HtmlTags.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>)." )+ return_index_of_hyperlinks Cyberweb::HtmlTemplate[ title: title?, body: body ].to_s end |
#title? ⇒ Boolean
#
title?
#
226 227 228 |
# File 'lib/bioroebe/www/embeddable_interface.rb', line 226 def title? 'BioRoebe Web-API' end |