bioroebe 0.10.80 → 0.12.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (301) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3946 -2817
  3. data/bin/bioroebe +13 -2
  4. data/bin/bioroebe_hash +7 -0
  5. data/bin/codon_to_aminoacid +6 -4
  6. data/bin/compacter +7 -0
  7. data/bin/plain_palindrome +7 -0
  8. data/bioroebe.gemspec +3 -3
  9. data/doc/README.gen +3918 -2793
  10. data/doc/quality_control/commandline_applications.md +3 -3
  11. data/doc/statistics/statistics.md +7 -7
  12. data/doc/todo/bioroebe_GUI_todo.md +19 -14
  13. data/doc/todo/bioroebe_java_todo.md +22 -0
  14. data/doc/todo/bioroebe_todo.md +2075 -2620
  15. data/lib/bioroebe/C++/DNA.cpp +69 -0
  16. data/lib/bioroebe/C++/RNA.cpp +58 -0
  17. data/lib/bioroebe/C++/sequence.cpp +35 -0
  18. data/lib/bioroebe/abstract/README.md +1 -0
  19. data/lib/bioroebe/abstract/features.rb +29 -0
  20. data/lib/bioroebe/aminoacids/aminoacid_substitution.rb +1 -9
  21. data/lib/bioroebe/aminoacids/codon_percentage.rb +1 -9
  22. data/lib/bioroebe/aminoacids/deduce_aminoacid_sequence.rb +1 -9
  23. data/lib/bioroebe/aminoacids/display_aminoacid_table.rb +1 -0
  24. data/lib/bioroebe/aminoacids/show_hydrophobicity.rb +1 -6
  25. data/lib/bioroebe/base/base_module/base_module.rb +36 -0
  26. data/lib/bioroebe/base/colours_for_base/colours_for_base.rb +18 -8
  27. data/lib/bioroebe/base/commandline_application/commandline_application.rb +13 -9
  28. data/lib/bioroebe/base/commandline_application/commandline_arguments.rb +24 -19
  29. data/lib/bioroebe/base/commandline_application/misc.rb +66 -49
  30. data/lib/bioroebe/base/commandline_application/opn.rb +8 -8
  31. data/lib/bioroebe/base/commandline_application/reset.rb +5 -3
  32. data/lib/bioroebe/base/internal_hash_module/internal_hash_module.rb +42 -0
  33. data/lib/bioroebe/base/misc.rb +35 -0
  34. data/lib/bioroebe/base/prototype/misc.rb +15 -9
  35. data/lib/bioroebe/base/prototype/reset.rb +10 -0
  36. data/lib/bioroebe/cleave_and_digest/digestion.rb +10 -2
  37. data/lib/bioroebe/cleave_and_digest/trypsin.rb +104 -50
  38. data/lib/bioroebe/codon_tables/frequencies/parse_frequency_table.rb +2 -10
  39. data/lib/bioroebe/codons/codons.rb +1 -1
  40. data/lib/bioroebe/codons/convert_this_codon_to_that_aminoacid.rb +208 -59
  41. data/lib/bioroebe/codons/possible_codons_for_this_aminoacid.rb +1 -9
  42. data/lib/bioroebe/codons/show_codon_tables.rb +8 -3
  43. data/lib/bioroebe/codons/show_codon_usage.rb +15 -4
  44. data/lib/bioroebe/colours/rev.rb +4 -1
  45. data/lib/bioroebe/constants/aminoacids_and_proteins.rb +1 -0
  46. data/lib/bioroebe/constants/database_constants.rb +1 -1
  47. data/lib/bioroebe/constants/files_and_directories.rb +31 -4
  48. data/lib/bioroebe/constants/misc.rb +20 -0
  49. data/lib/bioroebe/constants/nucleotides.rb +7 -0
  50. data/lib/bioroebe/conversions/dna_to_aminoacid_sequence.rb +109 -39
  51. data/lib/bioroebe/count/count_amount_of_aminoacids.rb +3 -2
  52. data/lib/bioroebe/count/count_amount_of_nucleotides.rb +3 -0
  53. data/lib/bioroebe/cpp +1 -0
  54. data/lib/bioroebe/crystal/README.md +2 -0
  55. data/lib/bioroebe/crystal/to_rna.cr +19 -0
  56. data/lib/bioroebe/data/README.md +11 -8
  57. data/lib/bioroebe/data/electron_microscopy/pos_example.pos +396 -0
  58. data/lib/bioroebe/data/electron_microscopy/test_particles.star +36 -0
  59. data/lib/bioroebe/data/fasta/human/Homo_sapiens_hemoglobin_subunit_alpha_HBB_mRNA.fasta +9 -0
  60. data/lib/bioroebe/data/fasta/human/Homo_sapiens_hemoglobin_subunit_beta_HBB_mRNA.fasta +8 -0
  61. data/lib/bioroebe/data/fasta/human/README.md +2 -0
  62. data/lib/bioroebe/dotplots/advanced_dotplot.rb +1 -1
  63. data/lib/bioroebe/electron_microscopy/coordinate_analyzer.rb +15 -18
  64. data/lib/bioroebe/{fasta_and_fastq/parse_fasta/run.rb → electron_microscopy/electron_microscopy_module.rb} +16 -8
  65. data/lib/bioroebe/electron_microscopy/fix_pos_file.rb +1 -9
  66. data/lib/bioroebe/electron_microscopy/flipy.rb +83 -0
  67. data/lib/bioroebe/electron_microscopy/parse_coordinates.rb +2 -10
  68. data/lib/bioroebe/electron_microscopy/read_file_xmd.rb +1 -9
  69. data/lib/bioroebe/electron_microscopy/simple_star_file_generator.rb +4 -9
  70. data/lib/bioroebe/enzymes/has_this_restriction_enzyme.rb +10 -3
  71. data/lib/bioroebe/enzymes/restriction_enzyme.rb +23 -1
  72. data/lib/bioroebe/enzymes/restriction_enzymes/statistics.rb +65 -0
  73. data/lib/bioroebe/fasta_and_fastq/autocorrect_the_name_of_this_fasta_file.rb +1 -9
  74. data/lib/bioroebe/fasta_and_fastq/compact_fasta_file/compact_fasta_file.rb +7 -9
  75. data/lib/bioroebe/fasta_and_fastq/fasta_defline/fasta_defline.rb +1 -5
  76. data/lib/bioroebe/fasta_and_fastq/fasta_to_yaml/fasta_to_yaml.rb +81 -0
  77. data/lib/bioroebe/fasta_and_fastq/parse_fasta/parse_fasta.rb +1518 -7
  78. data/lib/bioroebe/fasta_and_fastq/return_fasta_subsection_of_this_file.rb +11 -2
  79. data/lib/bioroebe/fasta_and_fastq/show_fasta_headers.rb +27 -12
  80. data/lib/bioroebe/fasta_and_fastq/simplify_fasta_header/simplify_fasta_header.rb +1 -5
  81. data/lib/bioroebe/fasta_and_fastq/split_this_fasta_file_into_chromosomes/constants.rb +0 -5
  82. data/lib/bioroebe/genome/README.md +4 -0
  83. data/lib/bioroebe/genome/genome.rb +130 -0
  84. data/lib/bioroebe/genomes/genome_pattern.rb +3 -9
  85. data/lib/bioroebe/gui/gtk +1 -0
  86. data/lib/bioroebe/gui/gtk3/alignment/alignment.rb +106 -137
  87. data/lib/bioroebe/gui/gtk3/aminoacid_composition/aminoacid_composition.rb +27 -61
  88. data/lib/bioroebe/gui/gtk3/aminoacid_composition/customized_dialog.rb +1 -1
  89. data/lib/bioroebe/gui/gtk3/blosum_matrix_viewer/blosum_matrix_viewer.rb +1 -2
  90. data/lib/bioroebe/gui/gtk3/calculate_cell_numbers_of_bacteria/calculate_cell_numbers_of_bacteria.rb +1 -2
  91. data/lib/bioroebe/gui/gtk3/controller/controller.rb +46 -29
  92. data/lib/bioroebe/gui/gtk3/dna_to_aminoacid_widget/dna_to_aminoacid_widget.rb +77 -52
  93. data/lib/bioroebe/gui/gtk3/dna_to_reverse_complement_widget/dna_to_reverse_complement_widget.rb +1 -2
  94. data/lib/bioroebe/gui/gtk3/fasta_table_widget/fasta_table_widget.rb +100 -23
  95. data/lib/bioroebe/gui/gtk3/format_converter/format_converter.rb +1 -2
  96. data/lib/bioroebe/gui/gtk3/gene/gene.rb +1 -2
  97. data/lib/bioroebe/gui/gtk3/hamming_distance/hamming_distance.rb +43 -30
  98. data/lib/bioroebe/gui/gtk3/levensthein_distance/levensthein_distance.rb +1 -2
  99. data/lib/bioroebe/gui/gtk3/nucleotide_analyser/nucleotide_analyser.rb +120 -73
  100. data/lib/bioroebe/gui/gtk3/primer_design_widget/primer_design_widget.rb +1 -2
  101. data/lib/bioroebe/gui/gtk3/protein_to_DNA/protein_to_DNA.rb +19 -20
  102. data/lib/bioroebe/gui/gtk3/random_sequence/random_sequence.rb +20 -13
  103. data/lib/bioroebe/gui/gtk3/restriction_enzymes/restriction_enzymes.rb +1 -2
  104. data/lib/bioroebe/gui/gtk3/show_codon_table/misc.rb +97 -22
  105. data/lib/bioroebe/gui/gtk3/show_codon_table/show_codon_table.rb +3 -73
  106. data/lib/bioroebe/gui/gtk3/show_codon_usage/show_codon_usage.rb +1 -2
  107. data/lib/bioroebe/gui/gtk3/sizeseq/sizeseq.rb +1 -2
  108. data/lib/bioroebe/gui/gtk3/three_to_one/three_to_one.rb +1 -2
  109. data/lib/bioroebe/gui/gtk3/www_finder/www_finder.rb +1 -2
  110. data/lib/bioroebe/gui/javafx/bioroebe/Bioroebe.class +0 -0
  111. data/lib/bioroebe/gui/javafx/bioroebe/Bioroebe.java +104 -0
  112. data/lib/bioroebe/gui/javafx/bioroebe.jar +0 -0
  113. data/lib/bioroebe/gui/javafx/bioroebe.mf +1 -0
  114. data/lib/bioroebe/gui/javafx/module-info.class +0 -0
  115. data/lib/bioroebe/gui/javafx/module-info.java +5 -0
  116. data/lib/bioroebe/gui/jruby/alignment/alignment.rb +165 -0
  117. data/lib/bioroebe/gui/jruby/aminoacid_composition/aminoacid_composition.rb +166 -0
  118. data/lib/bioroebe/gui/libui/alignment/alignment.rb +3 -1
  119. data/lib/bioroebe/gui/libui/controller/controller.rb +116 -0
  120. data/lib/bioroebe/gui/libui/random_sequence/random_sequence.rb +18 -2
  121. data/lib/bioroebe/gui/libui/show_codon_table/show_codon_table.rb +2 -0
  122. data/lib/bioroebe/gui/libui/three_to_one/three_to_one.rb +8 -6
  123. data/lib/bioroebe/gui/shared_code/alignment/alignment_module.rb +102 -0
  124. data/lib/bioroebe/gui/shared_code/aminoacid_composition/aminoacid_composition_module.rb +94 -0
  125. data/lib/bioroebe/gui/shared_code/levensthein_distance/levensthein_distance_module.rb +18 -16
  126. data/lib/bioroebe/gui/shared_code/protein_to_DNA/protein_to_DNA_module.rb +14 -14
  127. data/lib/bioroebe/gui/swing/three_to_one/ThreeToOne$1.class +0 -0
  128. data/lib/bioroebe/gui/swing/three_to_one/ThreeToOne$CloseListener.class +0 -0
  129. data/lib/bioroebe/gui/swing/three_to_one/ThreeToOne.class +0 -0
  130. data/lib/bioroebe/gui/swing/three_to_one/ThreeToOne.java +141 -0
  131. data/lib/bioroebe/images/FORWARD_PRIMER.png +0 -0
  132. data/lib/bioroebe/images/REVERSE_PRIMER.png +0 -0
  133. data/lib/bioroebe/images/images.html +29845 -0
  134. data/lib/bioroebe/java/README.md +5 -0
  135. data/lib/bioroebe/java/bioroebe/AllInOne.java +1 -0
  136. data/lib/bioroebe/java/bioroebe/Base.class +0 -0
  137. data/lib/bioroebe/java/bioroebe/Base.java +39 -5
  138. data/lib/bioroebe/java/bioroebe/IsPalindrome.java +23 -5
  139. data/lib/bioroebe/java/bioroebe/SanitizeNucleotideSequence.java +0 -0
  140. data/lib/bioroebe/java/bioroebe/Sequence.java +28 -3
  141. data/lib/bioroebe/java/bioroebe/ToCamelcase.class +0 -0
  142. data/lib/bioroebe/java/bioroebe/ToCamelcase.java +16 -4
  143. data/lib/bioroebe/java/bioroebe/ToRNA.java +43 -0
  144. data/lib/bioroebe/java/bioroebe/ToplevelMethods.java +6 -0
  145. data/lib/bioroebe/java/bioroebe/{BisulfiteTreatment.class → src/BisulfiteTreatment.class} +0 -0
  146. data/lib/bioroebe/java/bioroebe/{Codons.class → src/Codons.class} +0 -0
  147. data/lib/bioroebe/java/bioroebe/src/Codons.java +35 -0
  148. data/lib/bioroebe/java/bioroebe/src/Commandline.class +0 -0
  149. data/lib/bioroebe/java/bioroebe/src/Commandline.java +101 -0
  150. data/lib/bioroebe/java/bioroebe/{Esystem.class → src/Esystem.class} +0 -0
  151. data/lib/bioroebe/java/bioroebe/{Esystem.java → src/Esystem.java} +6 -1
  152. data/lib/bioroebe/java/bioroebe/{GenerateRandomDnaSequence.class → src/GenerateRandomDnaSequence.class} +0 -0
  153. data/lib/bioroebe/java/bioroebe/{GenerateRandomDnaSequence.java → src/GenerateRandomDnaSequence.java} +8 -2
  154. data/lib/bioroebe/java/bioroebe/src/PartnerNucleotide.class +0 -0
  155. data/lib/bioroebe/java/bioroebe/src/PartnerNucleotide.java +56 -0
  156. data/lib/bioroebe/java/bioroebe/{RemoveFile.java → src/RemoveFile.java} +10 -4
  157. data/lib/bioroebe/java/bioroebe/{RemoveNumbers.class → src/RemoveNumbers.class} +0 -0
  158. data/lib/bioroebe/java/bioroebe/{RemoveNumbers.java → src/RemoveNumbers.java} +1 -0
  159. data/lib/bioroebe/java/bioroebe/src/toplevel_methods/BaseComposition.class +0 -0
  160. data/lib/bioroebe/java/bioroebe/src/toplevel_methods/BaseComposition.java +75 -0
  161. data/lib/bioroebe/misc/ruler.rb +11 -2
  162. data/lib/bioroebe/nucleotides/most_likely_nucleotide_sequence_for_this_aminoacid_sequence.rb +1 -9
  163. data/lib/bioroebe/nucleotides/sanitize_nucleotide_sequence.rb +59 -18
  164. data/lib/bioroebe/nucleotides/show_nucleotide_sequence.rb +7 -7
  165. data/lib/bioroebe/parsers/genbank_parser.rb +347 -26
  166. data/lib/bioroebe/parsers/gff.rb +1 -9
  167. data/lib/bioroebe/patterns/scan_for_repeat.rb +1 -5
  168. data/lib/bioroebe/pdb/fetch_fasta_sequence_from_pdb.rb +1 -9
  169. data/lib/bioroebe/pdb/parse_mmCIF_file.rb +1 -9
  170. data/lib/bioroebe/pdb/parse_pdb_file.rb +4 -10
  171. data/lib/bioroebe/project/project.rb +1 -1
  172. data/lib/bioroebe/python/README.md +1 -0
  173. data/lib/bioroebe/python/__pycache__/mymodule.cpython-39.pyc +0 -0
  174. data/lib/bioroebe/python/gui/gtk3/all_in_one.css +4 -0
  175. data/lib/bioroebe/python/gui/gtk3/all_in_one.py +59 -0
  176. data/lib/bioroebe/python/gui/gtk3/widget1.py +20 -0
  177. data/lib/bioroebe/python/gui/tkinter/all_in_one.py +91 -0
  178. data/lib/bioroebe/python/mymodule.py +8 -0
  179. data/lib/bioroebe/python/protein_to_dna.py +33 -0
  180. data/lib/bioroebe/python/shell/shell.py +19 -0
  181. data/lib/bioroebe/python/to_rna.py +14 -0
  182. data/lib/bioroebe/python/toplevel_methods/convert_dna_to_aminoacid_sequence.py +137 -0
  183. data/lib/bioroebe/python/toplevel_methods/esystem.py +12 -0
  184. data/lib/bioroebe/python/toplevel_methods/open_in_browser.py +20 -0
  185. data/lib/bioroebe/python/toplevel_methods/palindromes.py +52 -0
  186. data/lib/bioroebe/python/toplevel_methods/rds.py +13 -0
  187. data/lib/bioroebe/python/toplevel_methods/shuffleseq.py +23 -0
  188. data/lib/bioroebe/python/toplevel_methods/three_delimiter.py +37 -0
  189. data/lib/bioroebe/python/toplevel_methods/time_and_date.py +43 -0
  190. data/lib/bioroebe/python/toplevel_methods/to_camelcase.py +21 -0
  191. data/lib/bioroebe/requires/require_cleave_and_digest.rb +3 -1
  192. data/lib/bioroebe/requires/require_the_bioroebe_project.rb +3 -1
  193. data/lib/bioroebe/sequence/alignment.rb +14 -4
  194. data/lib/bioroebe/sequence/dna.rb +1 -0
  195. data/lib/bioroebe/sequence/nucleotide_module/nucleotide_module.rb +28 -25
  196. data/lib/bioroebe/sequence/protein.rb +105 -3
  197. data/lib/bioroebe/sequence/rna.rb +220 -0
  198. data/lib/bioroebe/sequence/sequence.rb +128 -40
  199. data/lib/bioroebe/shell/menu.rb +3815 -3696
  200. data/lib/bioroebe/shell/misc.rb +9019 -3133
  201. data/lib/bioroebe/shell/readline/readline.rb +1 -1
  202. data/lib/bioroebe/shell/shell.rb +1137 -28
  203. data/lib/bioroebe/siRNA/siRNA.rb +81 -1
  204. data/lib/bioroebe/string_matching/find_longest_substring.rb +3 -2
  205. data/lib/bioroebe/string_matching/hamming_distance.rb +1 -9
  206. data/lib/bioroebe/taxonomy/class_methods.rb +3 -8
  207. data/lib/bioroebe/taxonomy/constants.rb +4 -3
  208. data/lib/bioroebe/taxonomy/edit.rb +2 -1
  209. data/lib/bioroebe/taxonomy/help/help.rb +10 -10
  210. data/lib/bioroebe/taxonomy/help/helpline.rb +2 -2
  211. data/lib/bioroebe/taxonomy/info/check_available.rb +15 -9
  212. data/lib/bioroebe/taxonomy/info/info.rb +18 -11
  213. data/lib/bioroebe/taxonomy/info/is_dna.rb +46 -36
  214. data/lib/bioroebe/taxonomy/interactive.rb +140 -104
  215. data/lib/bioroebe/taxonomy/menu.rb +27 -18
  216. data/lib/bioroebe/taxonomy/parse_fasta.rb +3 -1
  217. data/lib/bioroebe/taxonomy/shared.rb +1 -0
  218. data/lib/bioroebe/taxonomy/taxonomy.rb +1 -0
  219. data/lib/bioroebe/toplevel_methods/aminoacids_and_proteins.rb +31 -24
  220. data/lib/bioroebe/toplevel_methods/colourize_related_methods.rb +164 -0
  221. data/lib/bioroebe/toplevel_methods/databases.rb +1 -1
  222. data/lib/bioroebe/toplevel_methods/digest.rb +18 -8
  223. data/lib/bioroebe/toplevel_methods/fasta_and_fastq.rb +107 -63
  224. data/lib/bioroebe/toplevel_methods/file_and_directory_related_actions.rb +14 -2
  225. data/lib/bioroebe/toplevel_methods/frequencies.rb +8 -1
  226. data/lib/bioroebe/toplevel_methods/misc.rb +175 -11
  227. data/lib/bioroebe/toplevel_methods/nucleotides.rb +118 -46
  228. data/lib/bioroebe/toplevel_methods/open_in_browser.rb +2 -0
  229. data/lib/bioroebe/toplevel_methods/palindromes.rb +75 -47
  230. data/lib/bioroebe/toplevel_methods/taxonomy.rb +3 -3
  231. data/lib/bioroebe/toplevel_methods/to_camelcase.rb +5 -0
  232. data/lib/bioroebe/utility_scripts/align_open_reading_frames.rb +1 -9
  233. data/lib/bioroebe/utility_scripts/check_for_mismatches/check_for_mismatches.rb +1 -9
  234. data/lib/bioroebe/utility_scripts/compacter/compacter.rb +251 -0
  235. data/lib/bioroebe/utility_scripts/compseq/compseq.rb +1 -9
  236. data/lib/bioroebe/utility_scripts/consensus_sequence.rb +6 -6
  237. data/lib/bioroebe/utility_scripts/create_batch_entrez_file.rb +1 -9
  238. data/lib/bioroebe/utility_scripts/dot_alignment.rb +1 -9
  239. data/lib/bioroebe/utility_scripts/move_file_to_its_correct_location.rb +1 -4
  240. data/lib/bioroebe/utility_scripts/parse_taxonomy.rb +2 -2
  241. data/lib/bioroebe/utility_scripts/permutations.rb +36 -9
  242. data/lib/bioroebe/utility_scripts/showorf/constants.rb +0 -5
  243. data/lib/bioroebe/utility_scripts/showorf/reset.rb +1 -4
  244. data/lib/bioroebe/version/version.rb +2 -2
  245. data/lib/bioroebe/www/embeddable_interface.rb +121 -58
  246. data/lib/bioroebe/www/sinatra/sinatra.rb +186 -71
  247. data/lib/bioroebe/yaml/aminoacids/amino_acids_long_name_to_one_letter.yml +2 -2
  248. data/lib/bioroebe/yaml/aminoacids/weight_of_common_proteins.yml +17 -17
  249. data/lib/bioroebe/yaml/configuration/browser.yml +1 -1
  250. data/lib/bioroebe/yaml/configuration/temp_dir.yml +1 -1
  251. data/lib/bioroebe/yaml/consensus_sequences/consensus_sequences.yml +1 -0
  252. data/lib/bioroebe/yaml/genomes/README.md +3 -4
  253. data/lib/bioroebe/yaml/nucleotides/nucleotides.yml +5 -0
  254. data/lib/bioroebe/yaml/restriction_enzymes/restriction_enzymes.yml +57 -57
  255. data/spec/README.md +6 -0
  256. data/spec/project_wide_specification/classes.md +5 -0
  257. metadata +107 -70
  258. data/doc/setup.rb +0 -1655
  259. data/lib/bioroebe/fasta_and_fastq/parse_fasta/constants.rb +0 -50
  260. data/lib/bioroebe/fasta_and_fastq/parse_fasta/initialize.rb +0 -86
  261. data/lib/bioroebe/fasta_and_fastq/parse_fasta/menu.rb +0 -117
  262. data/lib/bioroebe/fasta_and_fastq/parse_fasta/misc.rb +0 -981
  263. data/lib/bioroebe/fasta_and_fastq/parse_fasta/report.rb +0 -156
  264. data/lib/bioroebe/fasta_and_fastq/parse_fasta/reset.rb +0 -128
  265. data/lib/bioroebe/genbank/genbank_parser.rb +0 -291
  266. data/lib/bioroebe/java/bioroebe/AllInOne.class +0 -0
  267. data/lib/bioroebe/java/bioroebe/Cat.class +0 -0
  268. data/lib/bioroebe/java/bioroebe/Codons.java +0 -22
  269. data/lib/bioroebe/java/bioroebe/IsPalindrome.class +0 -0
  270. data/lib/bioroebe/java/bioroebe/PartnerNucleotide.class +0 -0
  271. data/lib/bioroebe/java/bioroebe/PartnerNucleotide.java +0 -19
  272. data/lib/bioroebe/java/bioroebe/SanitizeNucleotideSequence.class +0 -0
  273. data/lib/bioroebe/java/bioroebe/ToplevelMethods.class +0 -0
  274. data/lib/bioroebe/java/bioroebe.jar +0 -0
  275. data/lib/bioroebe/shell/add.rb +0 -108
  276. data/lib/bioroebe/shell/assign.rb +0 -360
  277. data/lib/bioroebe/shell/chop_and_cut.rb +0 -281
  278. data/lib/bioroebe/shell/constants.rb +0 -166
  279. data/lib/bioroebe/shell/download.rb +0 -335
  280. data/lib/bioroebe/shell/enable_and_disable.rb +0 -158
  281. data/lib/bioroebe/shell/enzymes.rb +0 -310
  282. data/lib/bioroebe/shell/fasta.rb +0 -345
  283. data/lib/bioroebe/shell/gtk.rb +0 -76
  284. data/lib/bioroebe/shell/history.rb +0 -132
  285. data/lib/bioroebe/shell/initialize.rb +0 -217
  286. data/lib/bioroebe/shell/loop.rb +0 -74
  287. data/lib/bioroebe/shell/prompt.rb +0 -107
  288. data/lib/bioroebe/shell/random.rb +0 -289
  289. data/lib/bioroebe/shell/reset.rb +0 -335
  290. data/lib/bioroebe/shell/scan_and_parse.rb +0 -135
  291. data/lib/bioroebe/shell/search.rb +0 -337
  292. data/lib/bioroebe/shell/sequences.rb +0 -200
  293. data/lib/bioroebe/shell/show_report_and_display.rb +0 -2901
  294. data/lib/bioroebe/shell/startup.rb +0 -127
  295. data/lib/bioroebe/shell/taxonomy.rb +0 -14
  296. data/lib/bioroebe/shell/tk.rb +0 -23
  297. data/lib/bioroebe/shell/user_input.rb +0 -88
  298. data/lib/bioroebe/shell/xorg.rb +0 -45
  299. data/lib/bioroebe/utility_scripts/compacter.rb +0 -131
  300. /data/lib/bioroebe/java/bioroebe/{BisulfiteTreatment.java → src/BisulfiteTreatment.java} +0 -0
  301. /data/lib/bioroebe/java/bioroebe/{RemoveFile.class → src/RemoveFile.class} +0 -0
@@ -52,13 +52,11 @@ class Interactive < ::Bioroebe::CommandlineApplication # === Bioroebe::Taxonomy:
52
52
  Roebe::SqlParadise::Commands.set_temp_dir ::Bioroebe.log_dir?
53
53
  rescue LoadError; end
54
54
 
55
- # ========================================================================= #
56
- # === NAMESPACE
57
- # ========================================================================= #
58
- NAMESPACE = inspect
59
-
60
55
  # ========================================================================= #
61
56
  # === FASTA_SQL
57
+ #
58
+ # This constant will point towards a location such as
59
+ # "/home/Temp/bioroebe/autogenerated_sql_files/fasta.sql".
62
60
  # ========================================================================= #
63
61
  FASTA_SQL = AUTOGENERATED_SQL_FILES_DIR+'fasta.sql'
64
62
 
@@ -102,10 +100,7 @@ class Interactive < ::Bioroebe::CommandlineApplication # === Bioroebe::Taxonomy:
102
100
  # ========================================================================= #
103
101
  def reset
104
102
  super()
105
- # ======================================================================= #
106
- # === @namespace
107
- # ======================================================================= #
108
- @namespace = NAMESPACE
103
+ infer_the_namespace
109
104
  # ======================================================================= #
110
105
  # === @be_verbose
111
106
  # ======================================================================= #
@@ -124,6 +119,69 @@ class Interactive < ::Bioroebe::CommandlineApplication # === Bioroebe::Taxonomy:
124
119
  @run_standalone = true
125
120
  end
126
121
 
122
+ # ========================================================================= #
123
+ # === create_fasta_table
124
+ #
125
+ # This method generates the fasta table into either postgresql or
126
+ # whatever else you stored things into.
127
+ # ========================================================================= #
128
+ def create_fasta_table
129
+ remove(FASTA_SQL)
130
+ # e 'Now storing into fasta.sql (Fasta-Format).'
131
+ create_and_save_table(:default_fasta, true) # true for verbose
132
+ cat FASTA_SQL # Also display it, after creation.
133
+ # Next, drop the old Fasta table. But we must set the password before.
134
+ e 'Trying to drop the fasta table next.'
135
+ drop_table :fasta
136
+ # And now, read in the new one.
137
+ read_sql :fasta
138
+ end
139
+
140
+ # ========================================================================= #
141
+ # === create_and_save_table
142
+ # ========================================================================= #
143
+ def create_and_save_table(
144
+ i, be_verbose = false
145
+ )
146
+ case i
147
+ # ======================================================================= #
148
+ # === :default_fasta
149
+ # ======================================================================= #
150
+ when :default_fasta
151
+ i = FASTA_SQL
152
+ end
153
+ require 'roebe/sql_paradise/commands.rb'
154
+ Roebe::SqlParadise::Commands.create_and_save_table(i, be_verbose)
155
+ end
156
+
157
+ # ========================================================================= #
158
+ # === update_local_localomes
159
+ #
160
+ # Update the local collection. This will overwrite the old dataset
161
+ # completely, so be careful when using this.
162
+ #
163
+ # To invoke this method via the interactive menu, do:
164
+ #
165
+ # update databases
166
+ #
167
+ # ========================================================================= #
168
+ def update_local_localomes
169
+ show_current_time
170
+ create_fasta_table # Get in a new, fresh table.
171
+ _ = get_all_info_entries_with_tax_id
172
+ show_current_time
173
+ _.each {|entry|
174
+ e "Next working on `#{sfile(entry)}`."
175
+ create_sql_file_from_local_fasta_entry(entry)
176
+ }
177
+ report_how_many_info_files_exist_and_how_many_lack_taxonomy_id
178
+ old_time = @time
179
+ show_time_now # Show the end time.
180
+ new_time = @time
181
+ difference = Time.parse(new_time) - Time.parse(old_time)
182
+ report_how_long_it_took_us(difference, 'localome table')
183
+ end
184
+
127
185
  # ========================================================================= #
128
186
  # === get (get tag)
129
187
  #
@@ -204,34 +262,13 @@ class Interactive < ::Bioroebe::CommandlineApplication # === Bioroebe::Taxonomy:
204
262
  end
205
263
  end
206
264
 
207
- # ========================================================================= #
208
- # === update_local_localomes
209
- #
210
- # Update the local collection. This will overwrite the old dataset
211
- # completely, so be careful when using this.
212
- # ========================================================================= #
213
- def update_local_localomes
214
- show_current_time
215
- create_fasta_table # Get in a new, fresh table.
216
- _ = get_all_info_entries_with_tax_id
217
- show_current_time
218
- _.each {|entry|
219
- e 'Next working on '+sfile(entry)
220
- create_sql_file_from_local_fasta_entry(entry)
221
- }
222
- report_how_many_info_files_exist_and_how_many_lack_taxonomy_id
223
- old_time = @time
224
- show_time_now # Show the end time.
225
- new_time = @time
226
- difference = Time.parse(new_time) - Time.parse(old_time)
227
- report_how_long_it_took_us(difference, 'localome table')
228
- end
229
-
230
265
  # ========================================================================= #
231
266
  # === try_to_display_the_status
232
267
  # ========================================================================= #
233
- def try_to_display_the_status(i = nil)
234
- if i # if an argument was provided
268
+ def try_to_display_the_status(
269
+ i = nil
270
+ )
271
+ if i and !i.empty? # if an argument was provided
235
272
  StatFile.new(i) if Object.const_defined?(:StatFile)
236
273
  else
237
274
  Taxonomy.status?
@@ -333,6 +370,42 @@ class Interactive < ::Bioroebe::CommandlineApplication # === Bioroebe::Taxonomy:
333
370
  end
334
371
  end
335
372
 
373
+ # ========================================================================= #
374
+ # === download
375
+ #
376
+ # This method can be used to download the ncbi database.
377
+ # ========================================================================= #
378
+ def download(i = f?)
379
+ i = i.to_s
380
+ case i # case tag
381
+ # ======================================================================= #
382
+ # === --help
383
+ # ======================================================================= #
384
+ when 'HELP','?','--help'
385
+ e 'Currently we can download only the NCBI database.'
386
+ e
387
+ e 'To do so, do:'
388
+ e ' download ncbi'
389
+ # ======================================================================= #
390
+ # === download --ncbi
391
+ # ======================================================================= #
392
+ when /^-?-?ncbi/i,
393
+ 'database','1','' # '' is also a default here.
394
+ download_ncbi_database
395
+ if be_verbose?
396
+ e
397
+ e 'If all went well then you could now try to update the '+
398
+ 'database, by issuing:'
399
+ e
400
+ efancy ' update databases'
401
+ e
402
+ end
403
+ else
404
+ e 'In the method download(), we do not know the given '+
405
+ 'input `'+simp(i.to_s)+'`.'
406
+ end
407
+ end
408
+
336
409
  # ========================================================================= #
337
410
  # === report_lineage_ids_and_lineage_scientific_name
338
411
  # ========================================================================= #
@@ -378,24 +451,34 @@ class Interactive < ::Bioroebe::CommandlineApplication # === Bioroebe::Taxonomy:
378
451
  # the localomes entry.
379
452
  # ========================================================================= #
380
453
  def lupdate(i = :ncbi)
381
- i = i.to_s
454
+ i = i.to_s # Use a String past this point.
382
455
  case i
383
- when 'all','everything','both'
384
- update_ncbi_database
385
- update_local_localomes
386
- update_lineage
456
+ # ======================================================================= #
457
+ # === localomes
458
+ # ======================================================================= #
459
+ when 'localomes',
460
+ 'local','loc','localome','2',
461
+ 'fasta',
462
+ 'database',
463
+ 'databases'
464
+ update_local_localomes # This will overwrite the old dataset completely, be careful.
387
465
  # ======================================================================= #
388
466
  # === ncbi_database
389
467
  # ======================================================================= #
390
- when /^ncbi(-|_| )?database$/, 'ncbi','1',
468
+ when /^ncbi(-|_| )?database$/,
469
+ 'ncbi',
470
+ '1',
391
471
  'update_ncbi'
392
472
  update_ncbi_database
393
473
  # ======================================================================= #
394
- # === localomes
474
+ # === lupdate all
395
475
  # ======================================================================= #
396
- when 'localomes','local','loc','localome','2',
397
- 'fasta','database','databases'
398
- update_local_localomes # This will overwrite the old dataset completely, be careful.
476
+ when 'all',
477
+ 'everything',
478
+ 'both'
479
+ update_ncbi_database
480
+ update_local_localomes
481
+ update_lineage
399
482
  # ======================================================================= #
400
483
  # === lineage
401
484
  # ======================================================================= #
@@ -478,8 +561,9 @@ class Interactive < ::Bioroebe::CommandlineApplication # === Bioroebe::Taxonomy:
478
561
  # ========================================================================= #
479
562
  # === update_ncbi_database
480
563
  #
481
- # We will update the NCBI Taxonomy database with this method. This
482
- # includes a download, extracting it, generating the .sql files,
564
+ # This method can be used to update the NCBI Taxonomy database.
565
+ #
566
+ # This includes a download, extracting it, generating the .sql files,
483
567
  # and then populating the postgresql database.
484
568
  # ========================================================================= #
485
569
  def update_ncbi_database
@@ -673,7 +757,9 @@ class Interactive < ::Bioroebe::CommandlineApplication # === Bioroebe::Taxonomy:
673
757
  def show_login_information
674
758
  e 'The login information is stored in the file '
675
759
  e
676
- e ' '+sfile(PROJECT_BASE_DIR2+'databases/postgresql_login_command.rb')
760
+ e ' '+sfile(
761
+ Bioroebe::Taxonomy.project_base_dir?+'databases/postgresql_login_command.rb'
762
+ )
677
763
  e
678
764
  show_port # Show the port as well here.
679
765
  end
@@ -682,7 +768,7 @@ class Interactive < ::Bioroebe::CommandlineApplication # === Bioroebe::Taxonomy:
682
768
  # === return_shared_code
683
769
  # ========================================================================= #
684
770
  def return_shared_code
685
- return PROJECT_BASE_DIR2+'shared/shared'
771
+ return Bioroebe::Taxonomy.project_base_dir?+'shared/shared'
686
772
  end
687
773
 
688
774
  # ========================================================================= #
@@ -698,7 +784,7 @@ class Interactive < ::Bioroebe::CommandlineApplication # === Bioroebe::Taxonomy:
698
784
  # === return_login_file
699
785
  # ========================================================================= #
700
786
  def return_login_file
701
- return PROJECT_BASE_DIR2+'postgresql_login_command.rb'
787
+ return Bioroebe::Taxonomy.project_base_dir?+'postgresql_login_command.rb'
702
788
  end
703
789
 
704
790
  # ========================================================================= #
@@ -974,18 +1060,21 @@ class Interactive < ::Bioroebe::CommandlineApplication # === Bioroebe::Taxonomy:
974
1060
  return result
975
1061
  end; alias get_lineage_ids_and_lineage_scientific_name obtain_full_lineage_for
976
1062
 
1063
+ require 'bioroebe/constants/database_constants.rb'
977
1064
  # ========================================================================= #
978
1065
  # === drop_table (drop tag)
979
1066
  #
980
1067
  # Use this method when you wish to drop a table.
981
1068
  # ========================================================================= #
982
- def drop_table(i = DROP_FASTA_TABLE)
1069
+ def drop_table(
1070
+ i = Bioroebe::Postgresql::DROP_FASTA_TABLE
1071
+ )
983
1072
  case i.to_s
984
1073
  when 'nodes'
985
1074
  when 'fasta',
986
1075
  'localomes',
987
1076
  'localome'
988
- i = DROP_FASTA_TABLE
1077
+ i = Bioroebe::Postgresql::DROP_FASTA_TABLE
989
1078
  end
990
1079
  ::Bioroebe.run_sql_query(i)
991
1080
  end
@@ -1645,24 +1734,6 @@ class Interactive < ::Bioroebe::CommandlineApplication # === Bioroebe::Taxonomy:
1645
1734
  end
1646
1735
  end
1647
1736
 
1648
- # ========================================================================= #
1649
- # === create_fasta_table
1650
- #
1651
- # This method generates the fasta table into either postgresql or
1652
- # whatever else you stored things into.
1653
- # ========================================================================= #
1654
- def create_fasta_table
1655
- remove(FASTA_SQL)
1656
- # e 'Now storing into fasta.sql (Fasta-Format).'
1657
- create_and_save_table('fasta', true) # true for verbose
1658
- cat FASTA_SQL # Also display it, after creation.
1659
- # Next, drop the old Fasta table. But we must set the password before.
1660
- e 'Trying to drop the fasta table next.'
1661
- drop_table :fasta
1662
- # And now, read in the new one.
1663
- read_sql :fasta
1664
- end
1665
-
1666
1737
  # ========================================================================= #
1667
1738
  # === set_commandline_arguments
1668
1739
  # ========================================================================= #
@@ -1846,41 +1917,6 @@ class Interactive < ::Bioroebe::CommandlineApplication # === Bioroebe::Taxonomy:
1846
1917
  end
1847
1918
  end
1848
1919
 
1849
- # ========================================================================= #
1850
- # === download
1851
- #
1852
- # This method can be used to download the ncbi database.
1853
- # ========================================================================= #
1854
- def download(i = f?)
1855
- i = i.to_s
1856
- case i # case tag
1857
- # ======================================================================= #
1858
- # === --help
1859
- # ======================================================================= #
1860
- when 'HELP','?','--help'
1861
- e 'Currently we can download only the NCBI database.'
1862
- e
1863
- e 'To do so, do:'
1864
- e ' download ncbi'
1865
- # ======================================================================= #
1866
- # === --ncbi
1867
- # ======================================================================= #
1868
- when 'ncbi','--ncbi','database','1','' # '' is also a default here.
1869
- download_ncbi_database
1870
- if be_verbose?
1871
- e
1872
- e 'If all went well then you could now try to update the '+
1873
- 'database, by issuing:'
1874
- e
1875
- efancy ' update databases'
1876
- e
1877
- end
1878
- else
1879
- e 'In the method download(), we do not know the given '+
1880
- 'input `'+simp(i.to_s)+'`.'
1881
- end
1882
- end
1883
-
1884
1920
  # ========================================================================= #
1885
1921
  # === download_ncbi_database
1886
1922
  # ========================================================================= #
@@ -44,6 +44,28 @@ class Interactive < ::Bioroebe::CommandlineApplication
44
44
  record_last_command(i, first_argument?) # Record the last command.
45
45
  case i # (case tag)
46
46
  # ======================================================================= #
47
+ # === update
48
+ # ======================================================================= #
49
+ when 'update',
50
+ 'lupdate',
51
+ 'upd'
52
+ lupdate(f)
53
+ # ======================================================================= #
54
+ # === download
55
+ # ======================================================================= #
56
+ when 'download'
57
+ download(f)
58
+ # ======================================================================= #
59
+ # === status?
60
+ # ======================================================================= #
61
+ when 'status?',
62
+ 'status',
63
+ 'stat',
64
+ 'stats',
65
+ 'data?',
66
+ 'try_to_display_the_status'
67
+ try_to_display_the_status(f)
68
+ # ======================================================================= #
47
69
  # === disable_colours
48
70
  # ======================================================================= #
49
71
  when 'disable_colours',
@@ -65,11 +87,6 @@ class Interactive < ::Bioroebe::CommandlineApplication
65
87
  when /^download(_|-)?database$/i,'ncbi_down'
66
88
  download_ncbi_database
67
89
  # ======================================================================= #
68
- # === download
69
- # ======================================================================= #
70
- when 'download'
71
- download(f)
72
- # ======================================================================= #
73
90
  # === exit
74
91
  # ======================================================================= #
75
92
  when *VALID_WAYS_TO_EXIT
@@ -448,11 +465,6 @@ class Interactive < ::Bioroebe::CommandlineApplication
448
465
  # ======================================================================= #
449
466
  # ===
450
467
  # ======================================================================= #
451
- when 'update','lupdate','upd'
452
- lupdate(f)
453
- # ======================================================================= #
454
- # ===
455
- # ======================================================================= #
456
468
  when 'be'
457
469
  be(f)
458
470
  # ======================================================================= #
@@ -589,12 +601,6 @@ class Interactive < ::Bioroebe::CommandlineApplication
589
601
  # ======================================================================= #
590
602
  # ===
591
603
  # ======================================================================= #
592
- when 'status?','status','stat','stats','data?',
593
- 'try_to_display_the_status'
594
- try_to_display_the_status(f)
595
- # ======================================================================= #
596
- # ===
597
- # ======================================================================= #
598
604
  when 'remove','remove_taxid_from_localome_table',
599
605
  'remove_id'
600
606
  remove_taxid_from_localome_table(f)
@@ -647,7 +653,9 @@ class Interactive < ::Bioroebe::CommandlineApplication
647
653
  # ======================================================================= #
648
654
  when 'lafo','loadup_localomes','loaduplocalomes','goloc',
649
655
  'localomes_go','localomesgo','golocal','goloco',
650
- 'localgo','update_local_localomes','update2',
656
+ 'localgo',
657
+ 'update_local_localomes',
658
+ 'update2',
651
659
  'default'
652
660
  update_local_localomes
653
661
  # ======================================================================= #
@@ -796,7 +804,8 @@ class Interactive < ::Bioroebe::CommandlineApplication
796
804
  # === update_database
797
805
  # ======================================================================= #
798
806
  when 'update_database','ud','updatedatabases','update_databases',
799
- 'update_ncbi_database','updatencbidatabase','update_ncbi',
807
+ 'update_ncbi_database',
808
+ 'updatencbidatabase','update_ncbi',
800
809
  'main' # This is the main action (main tag).
801
810
  update_ncbi_database
802
811
  # ======================================================================= #
@@ -111,7 +111,9 @@ class ParseFasta < ::Bioroebe::CommandlineApplication # === Bioroebe::Taxonomy::
111
111
  # ========================================================================= #
112
112
  # === try_to_locate_info_file
113
113
  # ========================================================================= #
114
- def try_to_locate_info_file(i = @location)
114
+ def try_to_locate_info_file(
115
+ i = @location
116
+ )
115
117
  i = File.basename(i)
116
118
  # chop away the extname.
117
119
  i.gsub!(/#{File.extname(i)}/, '')
@@ -16,6 +16,7 @@
16
16
  # include this module here.
17
17
  # =========================================================================== #
18
18
  # require 'bioroebe/taxonomy/shared/shared.rb'
19
+ # =========================================================================== #
19
20
  require 'bioroebe/base/commandline_application/commandline_application.rb'
20
21
 
21
22
  module Bioroebe # === Bioroebe::Taxonomy::Shared
@@ -16,6 +16,7 @@ module Taxonomy
16
16
  require 'bioroebe/taxonomy/class_methods.rb'
17
17
  require 'bioroebe/taxonomy/chart.rb'
18
18
  require 'bioroebe/taxonomy/node.rb'
19
+ require 'bioroebe/constants/misc.rb'
19
20
 
20
21
  require 'bioroebe/toplevel_methods/databases.rb'
21
22
  require 'bioroebe/toplevel_methods/file_and_directory_related_actions.rb'
@@ -129,29 +129,6 @@ module Bioroebe
129
129
  return _
130
130
  end
131
131
 
132
- # ========================================================================= #
133
- # === Bioroebe.remove_invalid_aminoacids
134
- #
135
- # This method will filter away invalid aminoacids such as "U".
136
- # "U" is not a valid aminoacid.
137
- #
138
- # Usage example:
139
- #
140
- # Bioroebe.remove_invalid_aminoacids('LKLSUSURZZZ')
141
- #
142
- # ========================================================================= #
143
- def self.remove_invalid_aminoacids(from_this_string)
144
- if from_this_string.is_a? Array
145
- from_this_string = from_this_string.first
146
- end
147
- all_valid_aminoacids = YAML.load_file(Bioroebe.file_amino_acids).keys
148
- new_result = ''.dup
149
- from_this_string.chars.each {|entry|
150
- new_result << entry if all_valid_aminoacids.include?(entry)
151
- }
152
- return new_result
153
- end
154
-
155
132
  # ========================================================================= #
156
133
  # === Bioroebe.colourize_aa
157
134
  #
@@ -664,6 +641,36 @@ module Bioroebe
664
641
  end
665
642
  end
666
643
 
644
+ # ========================================================================= #
645
+ # === Bioroebe.remove_invalid_aminoacids
646
+ #
647
+ # This method will filter away invalid aminoacids such as "U".
648
+ # "U" is not a valid aminoacid. It requires the data stored
649
+ # in the yaml file at:
650
+ #
651
+ # "/home/Programs/Ruby/3.1.2/lib/ruby/site_ruby/3.1.0/bioroebe/yaml/aminoacids/amino_acids.yml"
652
+ #
653
+ # Note that U is a valid aminoacid - it is selenocysteine.
654
+ #
655
+ # Usage example:
656
+ #
657
+ # Bioroebe.remove_invalid_aminoacids('LKLSUSURZZZ')
658
+ #
659
+ # ========================================================================= #
660
+ def self.remove_invalid_aminoacids(
661
+ from_this_string
662
+ )
663
+ if from_this_string.is_a? Array
664
+ from_this_string = from_this_string.first
665
+ end
666
+ all_valid_aminoacids = YAML.load_file(Bioroebe.file_amino_acids).keys
667
+ new_result = ''.dup
668
+ from_this_string.chars.each {|entry|
669
+ new_result << entry if all_valid_aminoacids.include?(entry)
670
+ }
671
+ return new_result
672
+ end
673
+
667
674
  end
668
675
 
669
676
  if __FILE__ == $PROGRAM_NAME
@@ -682,7 +689,7 @@ if __FILE__ == $PROGRAM_NAME
682
689
  input = ARGV.join(' ').strip
683
690
  end
684
691
 
685
- puts 'From '+input+' to: '+Bioroebe.three_to_one(input) # => "TRH"
692
+ e 'From '+input+' to: '+Bioroebe.three_to_one(input) # => "TRH"
686
693
  # And more tests:
687
694
  # p Bioroebe.is_aminoacid? 'Tryptophan' # => true
688
695
  # p Bioroebe.is_aminoacid? 'Glycine' # => true