bioroebe 0.10.80 → 0.11.12

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bioroebe might be problematic. Click here for more details.

Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +507 -310
  3. data/bioroebe.gemspec +3 -3
  4. data/doc/README.gen +506 -309
  5. data/doc/todo/bioroebe_todo.md +29 -40
  6. data/lib/bioroebe/aminoacids/display_aminoacid_table.rb +1 -0
  7. data/lib/bioroebe/base/colours_for_base/colours_for_base.rb +18 -8
  8. data/lib/bioroebe/base/commandline_application/commandline_arguments.rb +13 -11
  9. data/lib/bioroebe/base/commandline_application/misc.rb +18 -8
  10. data/lib/bioroebe/base/prototype/misc.rb +1 -1
  11. data/lib/bioroebe/codons/show_codon_tables.rb +6 -2
  12. data/lib/bioroebe/constants/aminoacids_and_proteins.rb +1 -0
  13. data/lib/bioroebe/constants/files_and_directories.rb +8 -1
  14. data/lib/bioroebe/count/count_amount_of_nucleotides.rb +3 -0
  15. data/lib/bioroebe/gui/gtk3/protein_to_DNA/protein_to_DNA.rb +18 -18
  16. data/lib/bioroebe/gui/shared_code/protein_to_DNA/protein_to_DNA_module.rb +14 -14
  17. data/lib/bioroebe/parsers/genbank_parser.rb +353 -24
  18. data/lib/bioroebe/python/README.md +1 -0
  19. data/lib/bioroebe/python/__pycache__/mymodule.cpython-39.pyc +0 -0
  20. data/lib/bioroebe/python/gui/gtk3/widget1.py +22 -0
  21. data/lib/bioroebe/python/mymodule.py +8 -0
  22. data/lib/bioroebe/python/protein_to_dna.py +30 -0
  23. data/lib/bioroebe/python/shell/shell.py +19 -0
  24. data/lib/bioroebe/python/to_rna.py +14 -0
  25. data/lib/bioroebe/python/toplevel_methods/to_camelcase.py +11 -0
  26. data/lib/bioroebe/sequence/nucleotide_module/nucleotide_module.rb +28 -25
  27. data/lib/bioroebe/sequence/sequence.rb +54 -2
  28. data/lib/bioroebe/shell/menu.rb +3336 -3304
  29. data/lib/bioroebe/shell/readline/readline.rb +1 -1
  30. data/lib/bioroebe/shell/shell.rb +11233 -28
  31. data/lib/bioroebe/siRNA/siRNA.rb +81 -1
  32. data/lib/bioroebe/string_matching/find_longest_substring.rb +3 -2
  33. data/lib/bioroebe/toplevel_methods/aminoacids_and_proteins.rb +31 -24
  34. data/lib/bioroebe/toplevel_methods/nucleotides.rb +22 -5
  35. data/lib/bioroebe/toplevel_methods/open_in_browser.rb +2 -0
  36. data/lib/bioroebe/toplevel_methods/to_camelcase.rb +5 -0
  37. data/lib/bioroebe/version/version.rb +2 -2
  38. data/lib/bioroebe/yaml/configuration/browser.yml +1 -1
  39. data/lib/bioroebe/yaml/restriction_enzymes/restriction_enzymes.yml +3 -3
  40. metadata +17 -36
  41. data/doc/setup.rb +0 -1655
  42. data/lib/bioroebe/genbank/genbank_parser.rb +0 -291
  43. data/lib/bioroebe/shell/add.rb +0 -108
  44. data/lib/bioroebe/shell/assign.rb +0 -360
  45. data/lib/bioroebe/shell/chop_and_cut.rb +0 -281
  46. data/lib/bioroebe/shell/constants.rb +0 -166
  47. data/lib/bioroebe/shell/download.rb +0 -335
  48. data/lib/bioroebe/shell/enable_and_disable.rb +0 -158
  49. data/lib/bioroebe/shell/enzymes.rb +0 -310
  50. data/lib/bioroebe/shell/fasta.rb +0 -345
  51. data/lib/bioroebe/shell/gtk.rb +0 -76
  52. data/lib/bioroebe/shell/history.rb +0 -132
  53. data/lib/bioroebe/shell/initialize.rb +0 -217
  54. data/lib/bioroebe/shell/loop.rb +0 -74
  55. data/lib/bioroebe/shell/misc.rb +0 -4341
  56. data/lib/bioroebe/shell/prompt.rb +0 -107
  57. data/lib/bioroebe/shell/random.rb +0 -289
  58. data/lib/bioroebe/shell/reset.rb +0 -335
  59. data/lib/bioroebe/shell/scan_and_parse.rb +0 -135
  60. data/lib/bioroebe/shell/search.rb +0 -337
  61. data/lib/bioroebe/shell/sequences.rb +0 -200
  62. data/lib/bioroebe/shell/show_report_and_display.rb +0 -2901
  63. data/lib/bioroebe/shell/startup.rb +0 -127
  64. data/lib/bioroebe/shell/taxonomy.rb +0 -14
  65. data/lib/bioroebe/shell/tk.rb +0 -23
  66. data/lib/bioroebe/shell/user_input.rb +0 -88
  67. data/lib/bioroebe/shell/xorg.rb +0 -45
@@ -188,6 +188,20 @@ class Sequence < ::Bioroebe::RawSequence
188
188
  @internal_hash[:type]
189
189
  end; alias type type? # === type
190
190
 
191
+ # ========================================================================= #
192
+ # === index
193
+ # ========================================================================= #
194
+ def index(i)
195
+ @sequence.index(i)
196
+ end
197
+
198
+ # ========================================================================= #
199
+ # === size?
200
+ # ========================================================================= #
201
+ def size?
202
+ @sequence.size
203
+ end
204
+
191
205
  # ========================================================================= #
192
206
  # === to_regexp
193
207
  #
@@ -334,7 +348,7 @@ class Sequence < ::Bioroebe::RawSequence
334
348
  # ===================================================================== #
335
349
  sequence?.tr!('T','U') if sequence?
336
350
  end
337
- end
351
+ end; alias normalize sanitize_dataset # === normalize
338
352
 
339
353
  # ========================================================================= #
340
354
  # === set_type
@@ -484,7 +498,8 @@ class Sequence < ::Bioroebe::RawSequence
484
498
  # ===================================================================== #
485
499
  # === :do_not_downcase
486
500
  # ===================================================================== #
487
- when :do_not_downcase
501
+ when :do_not_downcase,
502
+ :make_no_modification
488
503
  # Make no modification in this case.
489
504
  # ===================================================================== #
490
505
  # === :do_upcase
@@ -526,6 +541,16 @@ class Sequence < ::Bioroebe::RawSequence
526
541
  end; alias set_rna_type set_rna # === set_rna_type
527
542
  alias convert_to_rna set_rna # === convert_to_rna
528
543
 
544
+ # ========================================================================= #
545
+ # === automatic_support_for_nucleotides
546
+ #
547
+ # This adds automatic support for RNA and DNA to this sequence object.
548
+ # ========================================================================= #
549
+ def automatic_support_for_nucleotides
550
+ require 'bioroebe/sequence/nucleotide_module/nucleotide_module.rb'
551
+ extend(Bioroebe::NucleotideModule)
552
+ end
553
+
529
554
  # ========================================================================= #
530
555
  # === set_dna
531
556
  # ========================================================================= #
@@ -544,6 +569,33 @@ class Sequence < ::Bioroebe::RawSequence
544
569
  }.join
545
570
  end
546
571
 
572
+ # ========================================================================= #
573
+ # === remove_invalid_entries_from_the_dna_sequence!
574
+ # ========================================================================= #
575
+ def remove_invalid_entries_from_the_dna_sequence!(i = sequence?)
576
+ result = i.chars.select {|character|
577
+ DNA_NUCLEOTIDES.include? character.upcase
578
+ }.join
579
+ set_sequence(result)
580
+ end
581
+
582
+ # ========================================================================= #
583
+ # === randomize
584
+ #
585
+ # Usage example:
586
+ #
587
+ # x = Bioroebe::Sequence.new; x.randomize
588
+ #
589
+ # ========================================================================= #
590
+ def randomize(
591
+ i = { 'A'=>1,'C'=>2,'G'=>3,'T'=>4 }
592
+ )
593
+ if i.is_a? Hash
594
+ i = i.map{|key, value| "#{key * value}" }.join
595
+ end
596
+ ::Bioroebe.random_dna(size?, i) # => "GGTAGGGGGGGGTAGGGGGG"
597
+ end
598
+
547
599
  # ========================================================================= #
548
600
  # === Bioroebe::Sequence.sequence_from_file
549
601
  #