bioroebe 0.10.80 → 0.11.25
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.
- checksums.yaml +4 -4
- data/README.md +3117 -2645
- data/bioroebe.gemspec +3 -3
- data/doc/README.gen +3116 -2644
- data/doc/todo/bioroebe_todo.md +418 -387
- data/lib/bioroebe/aminoacids/aminoacid_substitution.rb +1 -9
- data/lib/bioroebe/aminoacids/codon_percentage.rb +1 -9
- data/lib/bioroebe/aminoacids/deduce_aminoacid_sequence.rb +1 -9
- data/lib/bioroebe/aminoacids/display_aminoacid_table.rb +1 -0
- data/lib/bioroebe/aminoacids/show_hydrophobicity.rb +1 -6
- data/lib/bioroebe/base/colours_for_base/colours_for_base.rb +18 -8
- data/lib/bioroebe/base/commandline_application/commandline_arguments.rb +13 -11
- data/lib/bioroebe/base/commandline_application/misc.rb +18 -8
- data/lib/bioroebe/base/misc.rb +16 -0
- data/lib/bioroebe/base/prototype/misc.rb +1 -1
- data/lib/bioroebe/codons/show_codon_tables.rb +6 -2
- data/lib/bioroebe/codons/show_codon_usage.rb +2 -1
- data/lib/bioroebe/constants/aminoacids_and_proteins.rb +1 -0
- data/lib/bioroebe/constants/database_constants.rb +1 -1
- data/lib/bioroebe/constants/files_and_directories.rb +24 -4
- data/lib/bioroebe/constants/misc.rb +20 -0
- data/lib/bioroebe/count/count_amount_of_nucleotides.rb +3 -0
- data/lib/bioroebe/crystal/README.md +2 -0
- data/lib/bioroebe/crystal/to_rna.cr +19 -0
- data/lib/bioroebe/data/README.md +11 -8
- data/lib/bioroebe/data/electron_microscopy/pos_example.pos +396 -0
- data/lib/bioroebe/data/electron_microscopy/test_particles.star +36 -0
- data/lib/bioroebe/{shell/tk.rb → electron_microscopy/electron_microscopy_module.rb} +15 -10
- data/lib/bioroebe/electron_microscopy/simple_star_file_generator.rb +4 -9
- data/lib/bioroebe/fasta_and_fastq/show_fasta_headers.rb +27 -12
- data/lib/bioroebe/genome/README.md +4 -0
- data/lib/bioroebe/genome/genome.rb +67 -0
- data/lib/bioroebe/gui/gtk +1 -0
- data/lib/bioroebe/gui/gtk3/controller/controller.rb +45 -27
- data/lib/bioroebe/gui/gtk3/dna_to_aminoacid_widget/dna_to_aminoacid_widget.rb +76 -50
- data/lib/bioroebe/gui/gtk3/hamming_distance/hamming_distance.rb +42 -28
- data/lib/bioroebe/gui/gtk3/nucleotide_analyser/nucleotide_analyser.rb +119 -71
- data/lib/bioroebe/gui/gtk3/protein_to_DNA/protein_to_DNA.rb +18 -18
- data/lib/bioroebe/gui/gtk3/random_sequence/random_sequence.rb +19 -11
- data/lib/bioroebe/gui/shared_code/protein_to_DNA/protein_to_DNA_module.rb +14 -14
- data/lib/bioroebe/misc/ruler.rb +1 -0
- data/lib/bioroebe/parsers/genbank_parser.rb +353 -24
- data/lib/bioroebe/parsers/gff.rb +1 -9
- data/lib/bioroebe/pdb/parse_pdb_file.rb +1 -9
- data/lib/bioroebe/project/project.rb +1 -1
- data/lib/bioroebe/python/README.md +1 -0
- data/lib/bioroebe/python/__pycache__/mymodule.cpython-39.pyc +0 -0
- data/lib/bioroebe/python/gui/gtk3/all_in_one.css +4 -0
- data/lib/bioroebe/python/gui/gtk3/all_in_one.py +59 -0
- data/lib/bioroebe/python/gui/gtk3/widget1.py +20 -0
- data/lib/bioroebe/python/gui/tkinter/all_in_one.py +91 -0
- data/lib/bioroebe/python/mymodule.py +8 -0
- data/lib/bioroebe/python/protein_to_dna.py +33 -0
- data/lib/bioroebe/python/shell/shell.py +19 -0
- data/lib/bioroebe/python/to_rna.py +14 -0
- data/lib/bioroebe/python/toplevel_methods/open_in_browser.py +20 -0
- data/lib/bioroebe/python/toplevel_methods/palindromes.py +42 -0
- data/lib/bioroebe/python/toplevel_methods/rds.py +13 -0
- data/lib/bioroebe/python/toplevel_methods/three_delimiter.py +34 -0
- data/lib/bioroebe/python/toplevel_methods/time_and_date.py +43 -0
- data/lib/bioroebe/python/toplevel_methods/to_camelcase.py +11 -0
- data/lib/bioroebe/requires/require_the_bioroebe_project.rb +3 -1
- data/lib/bioroebe/sequence/nucleotide_module/nucleotide_module.rb +28 -25
- data/lib/bioroebe/sequence/protein.rb +105 -3
- data/lib/bioroebe/sequence/sequence.rb +61 -2
- data/lib/bioroebe/shell/menu.rb +3752 -3667
- data/lib/bioroebe/shell/misc.rb +51 -4311
- data/lib/bioroebe/shell/readline/readline.rb +1 -1
- data/lib/bioroebe/shell/shell.rb +11199 -28
- data/lib/bioroebe/siRNA/siRNA.rb +81 -1
- data/lib/bioroebe/string_matching/find_longest_substring.rb +3 -2
- data/lib/bioroebe/taxonomy/class_methods.rb +3 -8
- data/lib/bioroebe/taxonomy/constants.rb +4 -3
- data/lib/bioroebe/taxonomy/edit.rb +2 -1
- data/lib/bioroebe/taxonomy/help/help.rb +10 -10
- data/lib/bioroebe/taxonomy/info/check_available.rb +15 -9
- data/lib/bioroebe/taxonomy/info/info.rb +17 -2
- data/lib/bioroebe/taxonomy/info/is_dna.rb +46 -36
- data/lib/bioroebe/taxonomy/interactive.rb +139 -95
- data/lib/bioroebe/taxonomy/menu.rb +27 -18
- data/lib/bioroebe/taxonomy/parse_fasta.rb +3 -1
- data/lib/bioroebe/taxonomy/shared.rb +1 -0
- data/lib/bioroebe/taxonomy/taxonomy.rb +1 -0
- data/lib/bioroebe/toplevel_methods/aminoacids_and_proteins.rb +31 -24
- data/lib/bioroebe/toplevel_methods/databases.rb +1 -1
- data/lib/bioroebe/toplevel_methods/fasta_and_fastq.rb +101 -63
- data/lib/bioroebe/toplevel_methods/misc.rb +17 -16
- data/lib/bioroebe/toplevel_methods/nucleotides.rb +22 -5
- data/lib/bioroebe/toplevel_methods/open_in_browser.rb +2 -0
- data/lib/bioroebe/toplevel_methods/palindromes.rb +1 -2
- data/lib/bioroebe/toplevel_methods/taxonomy.rb +2 -2
- data/lib/bioroebe/toplevel_methods/to_camelcase.rb +5 -0
- data/lib/bioroebe/utility_scripts/align_open_reading_frames.rb +1 -9
- data/lib/bioroebe/utility_scripts/check_for_mismatches/check_for_mismatches.rb +1 -9
- data/lib/bioroebe/utility_scripts/compacter.rb +1 -9
- data/lib/bioroebe/utility_scripts/compseq/compseq.rb +1 -9
- data/lib/bioroebe/utility_scripts/create_batch_entrez_file.rb +1 -9
- data/lib/bioroebe/utility_scripts/dot_alignment.rb +1 -9
- data/lib/bioroebe/utility_scripts/move_file_to_its_correct_location.rb +1 -4
- data/lib/bioroebe/utility_scripts/showorf/constants.rb +0 -5
- data/lib/bioroebe/utility_scripts/showorf/reset.rb +1 -4
- data/lib/bioroebe/version/version.rb +2 -2
- data/lib/bioroebe/www/embeddable_interface.rb +101 -52
- data/lib/bioroebe/www/sinatra/sinatra.rb +186 -70
- data/lib/bioroebe/yaml/aminoacids/amino_acids_long_name_to_one_letter.yml +2 -2
- data/lib/bioroebe/yaml/configuration/browser.yml +1 -1
- data/lib/bioroebe/yaml/genomes/README.md +3 -4
- data/lib/bioroebe/yaml/restriction_enzymes/restriction_enzymes.yml +3 -3
- metadata +33 -35
- data/doc/setup.rb +0 -1655
- data/lib/bioroebe/genbank/genbank_parser.rb +0 -291
- data/lib/bioroebe/shell/add.rb +0 -108
- data/lib/bioroebe/shell/assign.rb +0 -360
- data/lib/bioroebe/shell/chop_and_cut.rb +0 -281
- data/lib/bioroebe/shell/constants.rb +0 -166
- data/lib/bioroebe/shell/download.rb +0 -335
- data/lib/bioroebe/shell/enable_and_disable.rb +0 -158
- data/lib/bioroebe/shell/enzymes.rb +0 -310
- data/lib/bioroebe/shell/fasta.rb +0 -345
- data/lib/bioroebe/shell/gtk.rb +0 -76
- data/lib/bioroebe/shell/history.rb +0 -132
- data/lib/bioroebe/shell/initialize.rb +0 -217
- data/lib/bioroebe/shell/loop.rb +0 -74
- data/lib/bioroebe/shell/prompt.rb +0 -107
- data/lib/bioroebe/shell/random.rb +0 -289
- data/lib/bioroebe/shell/reset.rb +0 -335
- data/lib/bioroebe/shell/scan_and_parse.rb +0 -135
- data/lib/bioroebe/shell/search.rb +0 -337
- data/lib/bioroebe/shell/sequences.rb +0 -200
- data/lib/bioroebe/shell/show_report_and_display.rb +0 -2901
- data/lib/bioroebe/shell/startup.rb +0 -127
- data/lib/bioroebe/shell/taxonomy.rb +0 -14
- data/lib/bioroebe/shell/user_input.rb +0 -88
- data/lib/bioroebe/shell/xorg.rb +0 -45
@@ -49,68 +49,6 @@ module Bioroebe
|
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
|
-
# ========================================================================= #
|
53
|
-
# === Bioroebe.colourize_this_fasta_dna_sequence
|
54
|
-
#
|
55
|
-
# This toplevel method can be used to colourize a FASTA (DNA)
|
56
|
-
# sequence, e. g. "ATGCGCGTATTA" and so forth.
|
57
|
-
#
|
58
|
-
# Note that this is intended for the commandline, that is to be
|
59
|
-
# displayed on e. g. a KDE Konsole terminal.
|
60
|
-
#
|
61
|
-
# Usage example:
|
62
|
-
#
|
63
|
-
# puts Bioroebe.colourize_this_fasta_dna_sequence('ATGCGCATGCGCGTATTAGTATTAATGCGCGTATTAATGCGCGTATTA')
|
64
|
-
#
|
65
|
-
# ========================================================================= #
|
66
|
-
def self.colourize_this_fasta_dna_sequence(
|
67
|
-
i = nil
|
68
|
-
)
|
69
|
-
if i.nil?
|
70
|
-
e 'Please provide a valid FASTA sequence as input to '\
|
71
|
-
'Bioroebe.colourize_this_fasta_dna_sequence()'
|
72
|
-
return
|
73
|
-
end
|
74
|
-
if i.is_a? Array
|
75
|
-
# ===================================================================== #
|
76
|
-
# Arrays will be joined together.
|
77
|
-
# ===================================================================== #
|
78
|
-
i = i.join(' ').strip
|
79
|
-
end
|
80
|
-
if i.is_a? String
|
81
|
-
# ===================================================================== #
|
82
|
-
# The colours are either defined in a file called
|
83
|
-
# 'colourize_fasta_sequences.yml' or they are simply hardcoded.
|
84
|
-
#
|
85
|
-
# The preferred (and thus default) way is to simply make use
|
86
|
-
# of that .yml file. That works on my home system, so it
|
87
|
-
# should work for other people as well.
|
88
|
-
# ===================================================================== #
|
89
|
-
if use_colours?
|
90
|
-
i = i.dup if i.frozen?
|
91
|
-
this_file = FILE_COLOURIZE_FASTA_SEQUENCES
|
92
|
-
if File.exist? this_file
|
93
|
-
dataset_for_the_colours = YAML.load_file(this_file)
|
94
|
-
dataset_for_the_colours.each_pair {|this_nucleotide, this_colour_to_be_used|
|
95
|
-
i.gsub!(
|
96
|
-
/#{this_nucleotide}/,
|
97
|
-
send(this_colour_to_be_used, this_nucleotide)+
|
98
|
-
rev
|
99
|
-
)
|
100
|
-
}
|
101
|
-
else
|
102
|
-
i.gsub!(/A/, "#{teal('A')}#{rev}")
|
103
|
-
i.gsub!(/C/, "#{slateblue('C')}#{rev}")
|
104
|
-
i.gsub!(/G/, "#{royalblue('G')}#{rev}")
|
105
|
-
i.gsub!(/T/, "#{steelblue('T')}#{rev}")
|
106
|
-
i.gsub!(/U/, "#{steelblue('U')}#{rev}") # Uracil is just the same as Thymine.
|
107
|
-
end
|
108
|
-
end
|
109
|
-
end
|
110
|
-
i
|
111
|
-
end; self.instance_eval { alias colourize_this_fasta_sequence colourize_this_fasta_dna_sequence } # === Bioroebe.colourize_this_fasta_sequence
|
112
|
-
self.instance_eval { alias colourized_parse_fasta colourize_this_fasta_dna_sequence } # === Bioroebe.colourized_parse_fasta
|
113
|
-
|
114
52
|
# ========================================================================= #
|
115
53
|
# === Bioroebe.calculate_weight_of_the_aminoacids_in_this_fasta_file
|
116
54
|
#
|
@@ -317,13 +255,113 @@ module Bioroebe
|
|
317
255
|
end
|
318
256
|
end
|
319
257
|
|
258
|
+
# ========================================================================= #
|
259
|
+
# === Bioroebe.colourize_this_fasta_dna_sequence
|
260
|
+
#
|
261
|
+
# This toplevel method can be used to colourize a FASTA (DNA)
|
262
|
+
# sequence, e. g. "ATGCGCGTATTA" and so forth.
|
263
|
+
#
|
264
|
+
# Note that this is intended for the commandline, that is to be
|
265
|
+
# displayed on e. g. a KDE Konsole terminal.
|
266
|
+
#
|
267
|
+
# Usage examples:
|
268
|
+
#
|
269
|
+
# puts Bioroebe.colourize_this_fasta_dna_sequence('ATGCGCATGCGCGTATTAGTATTAATGCGCGTATTAATGCGCGTATTA')
|
270
|
+
# puts Bioroebe.colourize_this_fasta_dna_sequence('ATGCGCATGCGCGTATTAGTATTAATGCGCGTATTAATGCGCGTATTA') { :with_ruler }
|
271
|
+
# puts Bioroebe.colourize_this_fasta_dna_sequence('TGCGCGTATTAGTATTAATGCGCGTATTAATGCGCGTATTA') { :with_ruler_steelblue_colour }
|
272
|
+
#
|
273
|
+
# ========================================================================= #
|
274
|
+
def self.colourize_this_fasta_dna_sequence(
|
275
|
+
i = nil,
|
276
|
+
&block
|
277
|
+
)
|
278
|
+
unless ::Bioroebe.respond_to?(:ruler_return_as_string_without_colours)
|
279
|
+
require 'bioroebe/misc/ruler.rb'
|
280
|
+
end
|
281
|
+
if i.nil?
|
282
|
+
e 'Please provide a valid FASTA sequence as input to '\
|
283
|
+
'Bioroebe.colourize_this_fasta_dna_sequence()'
|
284
|
+
return
|
285
|
+
end
|
286
|
+
if i.is_a? Array
|
287
|
+
# ===================================================================== #
|
288
|
+
# Arrays will be joined together.
|
289
|
+
# ===================================================================== #
|
290
|
+
i = i.join(' ').strip
|
291
|
+
end
|
292
|
+
original_input = i.dup
|
293
|
+
i = i.dup # Always dup it here.
|
294
|
+
if i.is_a? String
|
295
|
+
# ===================================================================== #
|
296
|
+
# The colours are either defined in a file called
|
297
|
+
# 'colourize_fasta_sequences.yml' or they are simply hardcoded.
|
298
|
+
#
|
299
|
+
# The preferred (and thus default) way is to simply make use
|
300
|
+
# of that .yml file. That works on my home system, so it
|
301
|
+
# should work for other people as well.
|
302
|
+
# ===================================================================== #
|
303
|
+
if use_colours?
|
304
|
+
this_file = FILE_COLOURIZE_FASTA_SEQUENCES
|
305
|
+
if File.exist? this_file
|
306
|
+
dataset_for_the_colours = YAML.load_file(this_file)
|
307
|
+
dataset_for_the_colours.each_pair {|this_nucleotide, this_colour_to_be_used|
|
308
|
+
i.gsub!(
|
309
|
+
/#{this_nucleotide}/,
|
310
|
+
send(this_colour_to_be_used, this_nucleotide)+
|
311
|
+
rev
|
312
|
+
)
|
313
|
+
}
|
314
|
+
else
|
315
|
+
i.gsub!(/A/, "#{teal('A')}#{rev}")
|
316
|
+
i.gsub!(/C/, "#{slateblue('C')}#{rev}")
|
317
|
+
i.gsub!(/G/, "#{royalblue('G')}#{rev}")
|
318
|
+
i.gsub!(/T/, "#{steelblue('T')}#{rev}")
|
319
|
+
i.gsub!(/U/, "#{steelblue('U')}#{rev}") # Uracil is just the same as Thymine.
|
320
|
+
end
|
321
|
+
end
|
322
|
+
end
|
323
|
+
# ======================================================================= #
|
324
|
+
# === Handle blocks next
|
325
|
+
# ======================================================================= #
|
326
|
+
if block_given?
|
327
|
+
yielded = yield
|
328
|
+
case yielded
|
329
|
+
# ===================================================================== #
|
330
|
+
# === with_ruler
|
331
|
+
# ===================================================================== #
|
332
|
+
when :with_ruler,
|
333
|
+
:add_ruler,
|
334
|
+
:ruler
|
335
|
+
i.prepend(
|
336
|
+
::Bioroebe.ruler_return_as_string_without_colours(original_input)+
|
337
|
+
"\n"
|
338
|
+
)
|
339
|
+
else # Assume something like:
|
340
|
+
# :with_ruler_steelblue_colour
|
341
|
+
if yielded.to_s.include? 'colo' # This assumes "colour" or "color".
|
342
|
+
use_this_colour = yielded.to_s.sub(/_colou?r/,'').
|
343
|
+
sub(/with_ruler_/,'')
|
344
|
+
this_string = send(use_this_colour,
|
345
|
+
::Bioroebe.ruler_return_as_string_without_colours(original_input)+
|
346
|
+
"\n"
|
347
|
+
)
|
348
|
+
i.prepend(this_string)
|
349
|
+
end
|
350
|
+
end
|
351
|
+
end
|
352
|
+
return i
|
353
|
+
end; self.instance_eval { alias colourize_this_fasta_sequence colourize_this_fasta_dna_sequence } # === Bioroebe.colourize_this_fasta_sequence
|
354
|
+
self.instance_eval { alias colourized_parse_fasta colourize_this_fasta_dna_sequence } # === Bioroebe.colourized_parse_fasta
|
355
|
+
|
320
356
|
# ========================================================================= #
|
321
357
|
# === Bioroebe.show_fasta_header
|
322
358
|
#
|
323
359
|
# This ad-hoc method can be used to quickly show the first line of an
|
324
360
|
# assumed .fasta file.
|
325
361
|
# ========================================================================= #
|
326
|
-
def self.show_fasta_header(
|
362
|
+
def self.show_fasta_header(
|
363
|
+
of_this_file
|
364
|
+
)
|
327
365
|
if of_this_file.is_a? Array
|
328
366
|
of_this_file = of_this_file.first
|
329
367
|
end
|
@@ -15,22 +15,6 @@ module Bioroebe
|
|
15
15
|
require 'bioroebe/toplevel_methods/esystem.rb'
|
16
16
|
require 'bioroebe/toplevel_methods/extract.rb'
|
17
17
|
|
18
|
-
# ========================================================================= #
|
19
|
-
# === Bioroebe.thousand_percentage
|
20
|
-
#
|
21
|
-
# This method is solely a helper-method for Bioroebe.frequency_per_thousand().
|
22
|
-
# ========================================================================= #
|
23
|
-
def self.thousand_percentage(
|
24
|
-
this_codon_n_times = 1,
|
25
|
-
total_n_elements = 1000
|
26
|
-
)
|
27
|
-
result = (
|
28
|
-
(this_codon_n_times * 1000.0) / total_n_elements.to_f
|
29
|
-
).round(1)
|
30
|
-
padded_result = result.to_s.rjust(5, ' ')
|
31
|
-
return padded_result
|
32
|
-
end
|
33
|
-
|
34
18
|
# ========================================================================= #
|
35
19
|
# === Bioroebe.frequency_per_thousand
|
36
20
|
#
|
@@ -86,6 +70,7 @@ EOF
|
|
86
70
|
# Usage example:
|
87
71
|
#
|
88
72
|
# Bioroebe.codon_frequency_of_this_string
|
73
|
+
# Bioroebe.codon_frequency_of_this_string 'ATTCGTACGATCGACTACTACT' # => {"UAC"=>2, "GAC"=>1, "AUC"=>1, "ACG"=>1, "CGU"=>1, "AUU"=>1}
|
89
74
|
#
|
90
75
|
# ========================================================================= #
|
91
76
|
def self.codon_frequency_of_this_string(
|
@@ -107,6 +92,22 @@ EOF
|
|
107
92
|
return sorted_hash
|
108
93
|
end
|
109
94
|
|
95
|
+
# ========================================================================= #
|
96
|
+
# === Bioroebe.thousand_percentage
|
97
|
+
#
|
98
|
+
# This method is solely a helper-method for Bioroebe.frequency_per_thousand().
|
99
|
+
# ========================================================================= #
|
100
|
+
def self.thousand_percentage(
|
101
|
+
this_codon_n_times = 1,
|
102
|
+
total_n_elements = 1000
|
103
|
+
)
|
104
|
+
result = (
|
105
|
+
(this_codon_n_times * 1000.0) / total_n_elements.to_f
|
106
|
+
).round(1)
|
107
|
+
padded_result = result.to_s.rjust(5, ' ')
|
108
|
+
return padded_result
|
109
|
+
end
|
110
|
+
|
110
111
|
# ========================================================================= #
|
111
112
|
# === Bioroebe.align_this_string_via_multiple_sequence_alignment
|
112
113
|
#
|
@@ -270,12 +270,19 @@ module Bioroebe
|
|
270
270
|
# Bioroebe.random_dna 15 # => "TTGGTAAGCTCTTTA"
|
271
271
|
# Bioroebe.random_dna 25 # => "TTAGCACAAGCATGGACGGACCAGA"
|
272
272
|
# Bioroebe.random_dna(50, { A: 10, T: 10, C: 10, G: 70}) # => "GGGGTGGGGAGGGTATGCGGAGGAAGGGCGGGAAGGGCGGGGGCTGGGCG"
|
273
|
+
# Bioroebe.random_dna(20, 'ATGGGGGGGG') # => "TGAGGGGGGGGGTGGGAGGG"
|
274
|
+
# Bioroebe.random_dna(20, 'ATGGGGGGGG') # => "GGTAGGGGGGGGTAGGGGGG"
|
273
275
|
#
|
274
276
|
# ========================================================================= #
|
275
277
|
def self.generate_random_dna_sequence(
|
276
|
-
i
|
277
|
-
optional_hash_with_the_frequencies = {}
|
278
|
+
i = ARGV,
|
279
|
+
optional_hash_with_the_frequencies = {} # ← This may be a String too, mind you.
|
278
280
|
)
|
281
|
+
# ======================================================================= #
|
282
|
+
# First define our result-String. This one will be returned by this
|
283
|
+
# method.
|
284
|
+
# ======================================================================= #
|
285
|
+
result = ''.dup
|
279
286
|
_ = Bioroebe::DNA_NUCLEOTIDES # Get a handle to the four DNA nucleotides.
|
280
287
|
if i.is_a? Array
|
281
288
|
i = i.join.strip
|
@@ -284,9 +291,19 @@ module Bioroebe
|
|
284
291
|
when :default
|
285
292
|
i = 250
|
286
293
|
end
|
287
|
-
i = i.to_i
|
288
|
-
|
289
|
-
|
294
|
+
i = i.to_i # This is "n times".
|
295
|
+
# ======================================================================= #
|
296
|
+
# First handle the case where the user passed a String:
|
297
|
+
# ======================================================================= #
|
298
|
+
if optional_hash_with_the_frequencies.is_a? String
|
299
|
+
pool = optional_hash_with_the_frequencies.dup.chars.shuffle
|
300
|
+
i.times {
|
301
|
+
if pool.size == 0
|
302
|
+
pool = optional_hash_with_the_frequencies.dup.chars.shuffle
|
303
|
+
end
|
304
|
+
result << pool.pop
|
305
|
+
}
|
306
|
+
elsif optional_hash_with_the_frequencies.empty?
|
290
307
|
# ===================================================================== #
|
291
308
|
# This is the default clause.
|
292
309
|
# ===================================================================== #
|
@@ -18,6 +18,8 @@ module Bioroebe
|
|
18
18
|
# This constant specifies the default browser to use for the
|
19
19
|
# bioroebe-project.
|
20
20
|
# ========================================================================= #
|
21
|
+
# /home/x/programming/ruby/src/bioroebe/lib/bioroebe/yaml/configuration/browser.yml
|
22
|
+
# ========================================================================= #
|
21
23
|
if File.exist? "#{project_yaml_directory?}browser.yml"
|
22
24
|
USE_THIS_BROWSER = YAML.load_file(FILE_BROWSER)
|
23
25
|
elsif ENV['BROWSER']
|
@@ -115,8 +115,7 @@ module Bioroebe
|
|
115
115
|
end
|
116
116
|
|
117
117
|
if __FILE__ == $PROGRAM_NAME
|
118
|
-
pp Bioroebe.every_reverse_palindrome_in_this_string(ARGV)
|
119
|
-
exit
|
118
|
+
pp Bioroebe.every_reverse_palindrome_in_this_string(ARGV)
|
120
119
|
if ARGV.empty?
|
121
120
|
p 'GAATTC: '+Bioroebe.is_palindrome?('GAATTC').to_s # => true
|
122
121
|
p 'GAATTCCC: '+Bioroebe.is_palindrome?('GAATTCCC').to_s # => false
|
@@ -141,8 +141,8 @@ module Taxonomy # === Bioroebe::Taxonomy
|
|
141
141
|
end
|
142
142
|
end
|
143
143
|
if be_verbose
|
144
|
-
e
|
145
|
-
::Bioroebe.sdir(this_dir)
|
144
|
+
e "Now trying to change to the base directory at "\
|
145
|
+
"#{::Bioroebe.sdir(this_dir)}."
|
146
146
|
end
|
147
147
|
cd this_dir
|
148
148
|
e N+'We will next attempt to download the file `'+
|
@@ -11,6 +11,11 @@ module Bioroebe
|
|
11
11
|
# === Bioroebe.to_camelcase
|
12
12
|
#
|
13
13
|
# Convert the given String (the input) into a camelcased variant.
|
14
|
+
#
|
15
|
+
# Usage example:
|
16
|
+
#
|
17
|
+
# Bioroebe.to_camelcase('foo_bar') # => "FooBar"
|
18
|
+
#
|
14
19
|
# ========================================================================= #
|
15
20
|
def self.to_camelcase(i)
|
16
21
|
if i.is_a? Array
|
@@ -35,11 +35,6 @@ class AlignOpenReadingFrames < ::Bioroebe::CommandlineApplication # === Bioroebe
|
|
35
35
|
require 'bioroebe/regexes/regexes.rb'
|
36
36
|
require 'bioroebe/codons/codons.rb'
|
37
37
|
|
38
|
-
# ========================================================================= #
|
39
|
-
# === NAMESPACE
|
40
|
-
# ========================================================================= #
|
41
|
-
NAMESPACE = inspect
|
42
|
-
|
43
38
|
# ========================================================================= #
|
44
39
|
# === START_CODON
|
45
40
|
# ========================================================================= #
|
@@ -67,10 +62,7 @@ class AlignOpenReadingFrames < ::Bioroebe::CommandlineApplication # === Bioroebe
|
|
67
62
|
# ========================================================================= #
|
68
63
|
def reset
|
69
64
|
super()
|
70
|
-
|
71
|
-
# === @namespace
|
72
|
-
# ======================================================================= #
|
73
|
-
@namespace = NAMESPACE
|
65
|
+
infer_the_namespace
|
74
66
|
end
|
75
67
|
|
76
68
|
# ========================================================================= #
|
@@ -19,11 +19,6 @@ module Bioroebe
|
|
19
19
|
|
20
20
|
class CheckForMismatches < ::Bioroebe::CommandlineApplication # === Bioroebe::CheckForMismatches
|
21
21
|
|
22
|
-
# ========================================================================= #
|
23
|
-
# === NAMESPACE
|
24
|
-
# ========================================================================= #
|
25
|
-
NAMESPACE = inspect
|
26
|
-
|
27
22
|
# ========================================================================= #
|
28
23
|
# === COLOUR_TO_BE_USED_FOR_A_MISMATCH
|
29
24
|
#
|
@@ -49,10 +44,7 @@ class CheckForMismatches < ::Bioroebe::CommandlineApplication # === Bioroebe::Ch
|
|
49
44
|
# ========================================================================= #
|
50
45
|
def reset
|
51
46
|
super()
|
52
|
-
|
53
|
-
# === @namespace
|
54
|
-
# ======================================================================= #
|
55
|
-
@namespace = NAMESPACE
|
47
|
+
infer_the_namespace
|
56
48
|
# ======================================================================= #
|
57
49
|
# === @first_sequence
|
58
50
|
# ======================================================================= #
|
@@ -21,11 +21,6 @@ module Bioroebe
|
|
21
21
|
|
22
22
|
class Compacter < ::Bioroebe::CommandlineApplication # === Bioroebe::Compacter
|
23
23
|
|
24
|
-
# ========================================================================= #
|
25
|
-
# === NAMESPACE
|
26
|
-
# ========================================================================= #
|
27
|
-
NAMESPACE = inspect
|
28
|
-
|
29
24
|
# ========================================================================= #
|
30
25
|
# === initialize
|
31
26
|
# ========================================================================= #
|
@@ -52,10 +47,7 @@ class Compacter < ::Bioroebe::CommandlineApplication # === Bioroebe::Compacter
|
|
52
47
|
# ========================================================================= #
|
53
48
|
def reset
|
54
49
|
super()
|
55
|
-
|
56
|
-
# === @namespace
|
57
|
-
# ======================================================================= #
|
58
|
-
@namespace = NAMESPACE
|
50
|
+
infer_the_namespace
|
59
51
|
# ======================================================================= #
|
60
52
|
# === @ask_for_user_input
|
61
53
|
# ======================================================================= #
|
@@ -47,11 +47,6 @@ class Compseq < ::Bioroebe::CommandlineApplication # === Bioroebe::Compseq
|
|
47
47
|
# ========================================================================= #
|
48
48
|
COLOURIZE_CpG_ISLANDS = true
|
49
49
|
|
50
|
-
# ========================================================================= #
|
51
|
-
# === NAMESPACE
|
52
|
-
# ========================================================================= #
|
53
|
-
NAMESPACE = inspect
|
54
|
-
|
55
50
|
# ========================================================================= #
|
56
51
|
# === EXPECTED_FREQUENCY
|
57
52
|
# ========================================================================= #
|
@@ -108,10 +103,7 @@ class Compseq < ::Bioroebe::CommandlineApplication # === Bioroebe::Compseq
|
|
108
103
|
# ========================================================================= #
|
109
104
|
def reset
|
110
105
|
super()
|
111
|
-
|
112
|
-
# === @namespace
|
113
|
-
# ======================================================================= #
|
114
|
-
@namespace = NAMESPACE
|
106
|
+
infer_the_namespace
|
115
107
|
# ======================================================================= #
|
116
108
|
# === @identifier
|
117
109
|
# ======================================================================= #
|
@@ -44,11 +44,6 @@ https://www.ncbi.nlm.nih.gov/nuccore/NZ_CP007215.2
|
|
44
44
|
https://www.ncbi.nlm.nih.gov/nuccore/NC_003197.2
|
45
45
|
'
|
46
46
|
|
47
|
-
# ========================================================================= #
|
48
|
-
# === NAMESPACE
|
49
|
-
# ========================================================================= #
|
50
|
-
NAMESPACE = inspect
|
51
|
-
|
52
47
|
# ========================================================================= #
|
53
48
|
# === initialize
|
54
49
|
# ========================================================================= #
|
@@ -66,10 +61,7 @@ https://www.ncbi.nlm.nih.gov/nuccore/NC_003197.2
|
|
66
61
|
# ========================================================================= #
|
67
62
|
def reset
|
68
63
|
super()
|
69
|
-
|
70
|
-
# === @namespace
|
71
|
-
# ======================================================================= #
|
72
|
-
@namespace = NAMESPACE
|
64
|
+
infer_the_namespace
|
73
65
|
end
|
74
66
|
|
75
67
|
# ========================================================================= #
|
@@ -21,11 +21,6 @@ module Bioroebe
|
|
21
21
|
|
22
22
|
class DotAlignment < ::Bioroebe::CommandlineApplication # === Bioroebe::DotAlignment
|
23
23
|
|
24
|
-
# ========================================================================= #
|
25
|
-
# === NAMESPACE
|
26
|
-
# ========================================================================= #
|
27
|
-
NAMESPACE = inspect
|
28
|
-
|
29
24
|
# ========================================================================= #
|
30
25
|
# === initialize
|
31
26
|
# ========================================================================= #
|
@@ -43,10 +38,7 @@ class DotAlignment < ::Bioroebe::CommandlineApplication # === Bioroebe::DotAlign
|
|
43
38
|
# ========================================================================= #
|
44
39
|
def reset
|
45
40
|
super()
|
46
|
-
|
47
|
-
# === @namespace
|
48
|
-
# ======================================================================= #
|
49
|
-
@namespace = NAMESPACE
|
41
|
+
infer_the_namespace
|
50
42
|
# ======================================================================= #
|
51
43
|
# === @may_we_continue
|
52
44
|
# ======================================================================= #
|
@@ -42,10 +42,7 @@ class MoveFileToItsCorrectLocation < ::Bioroebe::CommandlineApplication
|
|
42
42
|
# ========================================================================= #
|
43
43
|
def reset
|
44
44
|
super()
|
45
|
-
|
46
|
-
# === @namespace
|
47
|
-
# ======================================================================= #
|
48
|
-
@namespace = NAMESPACE
|
45
|
+
infer_the_namespace
|
49
46
|
# ======================================================================= #
|
50
47
|
# === @try_to_relocate_the_file_to_an_appropriate_subdirectory
|
51
48
|
#
|
@@ -6,11 +6,6 @@ module Bioroebe
|
|
6
6
|
|
7
7
|
class ShowOrf < ::Bioroebe::CommandlineApplication
|
8
8
|
|
9
|
-
# ========================================================================= #
|
10
|
-
# === NAMESPACE
|
11
|
-
# ========================================================================= #
|
12
|
-
NAMESPACE = inspect
|
13
|
-
|
14
9
|
# ========================================================================= #
|
15
10
|
# === COLOURIZE_VERTICAL_TOKEN
|
16
11
|
# ========================================================================= #
|
@@ -11,10 +11,7 @@ class ShowOrf < ::Bioroebe::CommandlineApplication
|
|
11
11
|
# ========================================================================= #
|
12
12
|
def reset
|
13
13
|
super()
|
14
|
-
|
15
|
-
# === @namespace
|
16
|
-
# ======================================================================= #
|
17
|
-
@namespace = NAMESPACE
|
14
|
+
infer_the_namespace
|
18
15
|
# ======================================================================= #
|
19
16
|
# === @show_these_frames
|
20
17
|
#
|
@@ -9,7 +9,7 @@ module Bioroebe
|
|
9
9
|
# ========================================================================= #
|
10
10
|
# === VERSION
|
11
11
|
# ========================================================================= #
|
12
|
-
VERSION = '0.
|
12
|
+
VERSION = '0.11.25'
|
13
13
|
|
14
14
|
# ========================================================================= #
|
15
15
|
# === LAST_UPDATE
|
@@ -17,7 +17,7 @@ module Bioroebe
|
|
17
17
|
# This variable keeps track as to when the bioroebe project was last
|
18
18
|
# updated. The notation is: DD.MM.YYYY
|
19
19
|
# ========================================================================= #
|
20
|
-
LAST_UPDATE = '
|
20
|
+
LAST_UPDATE = '18.08.2022'
|
21
21
|
|
22
22
|
# ========================================================================= #
|
23
23
|
# === URL_TO_THE_DOCUMENTATION
|