bioroebe 0.10.80 → 0.11.32
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 +3209 -2618
- data/bin/bioroebe +7 -1
- data/bioroebe.gemspec +3 -3
- data/doc/README.gen +3208 -2617
- data/doc/quality_control/commandline_applications.md +3 -3
- data/doc/todo/bioroebe_todo.md +2040 -2615
- 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 +26 -9
- data/lib/bioroebe/base/commandline_application/opn.rb +8 -8
- data/lib/bioroebe/base/commandline_application/reset.rb +3 -2
- data/lib/bioroebe/base/misc.rb +35 -0
- data/lib/bioroebe/base/prototype/misc.rb +11 -1
- data/lib/bioroebe/codon_tables/frequencies/parse_frequency_table.rb +2 -10
- data/lib/bioroebe/codons/possible_codons_for_this_aminoacid.rb +1 -9
- 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 +31 -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/electron_microscopy/coordinate_analyzer.rb +15 -18
- data/lib/bioroebe/{fasta_and_fastq/parse_fasta/run.rb → electron_microscopy/electron_microscopy_module.rb} +16 -8
- data/lib/bioroebe/electron_microscopy/fix_pos_file.rb +1 -9
- data/lib/bioroebe/electron_microscopy/flipy.rb +83 -0
- data/lib/bioroebe/electron_microscopy/parse_coordinates.rb +2 -10
- data/lib/bioroebe/electron_microscopy/read_file_xmd.rb +1 -9
- data/lib/bioroebe/electron_microscopy/simple_star_file_generator.rb +4 -9
- data/lib/bioroebe/fasta_and_fastq/autocorrect_the_name_of_this_fasta_file.rb +1 -9
- data/lib/bioroebe/fasta_and_fastq/compact_fasta_file/compact_fasta_file.rb +7 -9
- data/lib/bioroebe/fasta_and_fastq/fasta_defline/fasta_defline.rb +1 -5
- data/lib/bioroebe/fasta_and_fastq/fasta_to_yaml/fasta_to_yaml.rb +81 -0
- data/lib/bioroebe/fasta_and_fastq/parse_fasta/parse_fasta.rb +1460 -7
- data/lib/bioroebe/fasta_and_fastq/return_fasta_subsection_of_this_file.rb +11 -2
- data/lib/bioroebe/fasta_and_fastq/show_fasta_headers.rb +27 -12
- data/lib/bioroebe/fasta_and_fastq/simplify_fasta_header/simplify_fasta_header.rb +1 -5
- data/lib/bioroebe/fasta_and_fastq/split_this_fasta_file_into_chromosomes/constants.rb +0 -5
- data/lib/bioroebe/genome/README.md +4 -0
- data/lib/bioroebe/genome/genome.rb +67 -0
- data/lib/bioroebe/genomes/genome_pattern.rb +3 -9
- 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/fasta_table_widget/fasta_table_widget.rb +99 -21
- 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/libui/three_to_one/three_to_one.rb +8 -6
- data/lib/bioroebe/gui/shared_code/protein_to_DNA/protein_to_DNA_module.rb +14 -14
- data/lib/bioroebe/gui/swing/three_to_one/ThreeToOne$1.class +0 -0
- data/lib/bioroebe/gui/swing/three_to_one/ThreeToOne$CloseListener.class +0 -0
- data/lib/bioroebe/gui/swing/three_to_one/ThreeToOne.class +0 -0
- data/lib/bioroebe/gui/swing/three_to_one/ThreeToOne.java +141 -0
- data/lib/bioroebe/java/README.md +4 -0
- data/lib/bioroebe/java/bioroebe/Sequence.java +25 -1
- data/lib/bioroebe/java/bioroebe/src/main/java/bioroebe/Base.class +0 -0
- data/lib/bioroebe/java/bioroebe/{Base.java → src/main/java/bioroebe/Base.java} +15 -2
- data/lib/bioroebe/java/bioroebe/{BisulfiteTreatment.class → src/main/java/bioroebe/BisulfiteTreatment.class} +0 -0
- data/lib/bioroebe/java/bioroebe/{BisulfiteTreatment.java → src/main/java/bioroebe/BisulfiteTreatment.java} +0 -0
- data/lib/bioroebe/java/bioroebe/{Codons.class → src/main/java/bioroebe/Codons.class} +0 -0
- data/lib/bioroebe/java/bioroebe/src/main/java/bioroebe/Codons.java +34 -0
- data/lib/bioroebe/java/bioroebe/src/main/java/bioroebe/Commandline.class +0 -0
- data/lib/bioroebe/java/bioroebe/src/main/java/bioroebe/Commandline.java +95 -0
- data/lib/bioroebe/java/bioroebe/{Esystem.class → src/main/java/bioroebe/Esystem.class} +0 -0
- data/lib/bioroebe/java/bioroebe/{Esystem.java → src/main/java/bioroebe/Esystem.java} +0 -0
- data/lib/bioroebe/java/bioroebe/{GenerateRandomDnaSequence.class → src/main/java/bioroebe/GenerateRandomDnaSequence.class} +0 -0
- data/lib/bioroebe/java/bioroebe/{GenerateRandomDnaSequence.java → src/main/java/bioroebe/GenerateRandomDnaSequence.java} +8 -2
- data/lib/bioroebe/java/bioroebe/{IsPalindrome.class → src/main/java/bioroebe/IsPalindrome.class} +0 -0
- data/lib/bioroebe/java/bioroebe/{IsPalindrome.java → src/main/java/bioroebe/IsPalindrome.java} +5 -1
- data/lib/bioroebe/java/bioroebe/src/main/java/bioroebe/PartnerNucleotide.class +0 -0
- data/lib/bioroebe/java/bioroebe/src/main/java/bioroebe/PartnerNucleotide.java +56 -0
- data/lib/bioroebe/java/bioroebe/{RemoveFile.class → src/main/java/bioroebe/RemoveFile.class} +0 -0
- data/lib/bioroebe/java/bioroebe/{RemoveFile.java → src/main/java/bioroebe/RemoveFile.java} +10 -4
- data/lib/bioroebe/java/bioroebe/{RemoveNumbers.class → src/main/java/bioroebe/RemoveNumbers.class} +0 -0
- data/lib/bioroebe/java/bioroebe/{RemoveNumbers.java → src/main/java/bioroebe/RemoveNumbers.java} +1 -0
- data/lib/bioroebe/java/bioroebe/{ToCamelcase.class → src/main/java/bioroebe/ToCamelcase.class} +0 -0
- data/lib/bioroebe/java/bioroebe/{ToCamelcase.java → src/main/java/bioroebe/ToCamelcase.java} +3 -3
- data/lib/bioroebe/java/bioroebe/src/main/java/bioroebe/ToRNA.class +0 -0
- data/lib/bioroebe/java/bioroebe/src/main/java/bioroebe/ToRNA.java +42 -0
- data/lib/bioroebe/java/bioroebe/toplevel_methods/BaseComposition.class +0 -0
- data/lib/bioroebe/java/bioroebe/toplevel_methods/BaseComposition.java +73 -0
- data/lib/bioroebe/misc/ruler.rb +1 -0
- data/lib/bioroebe/nucleotides/most_likely_nucleotide_sequence_for_this_aminoacid_sequence.rb +1 -9
- data/lib/bioroebe/nucleotides/show_nucleotide_sequence.rb +7 -7
- data/lib/bioroebe/parsers/genbank_parser.rb +347 -26
- data/lib/bioroebe/parsers/gff.rb +1 -9
- data/lib/bioroebe/patterns/scan_for_repeat.rb +1 -5
- data/lib/bioroebe/pdb/fetch_fasta_sequence_from_pdb.rb +1 -9
- data/lib/bioroebe/pdb/parse_mmCIF_file.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/esystem.py +12 -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/shuffleseq.py +23 -0
- data/lib/bioroebe/python/toplevel_methods/three_delimiter.py +37 -0
- data/lib/bioroebe/python/toplevel_methods/time_and_date.py +43 -0
- data/lib/bioroebe/python/toplevel_methods/to_camelcase.py +21 -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 +3819 -3713
- data/lib/bioroebe/shell/misc.rb +51 -4311
- data/lib/bioroebe/shell/readline/readline.rb +1 -1
- data/lib/bioroebe/shell/shell.rb +11250 -28
- data/lib/bioroebe/siRNA/siRNA.rb +81 -1
- data/lib/bioroebe/string_matching/find_longest_substring.rb +3 -2
- data/lib/bioroebe/string_matching/hamming_distance.rb +1 -9
- 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 +18 -11
- data/lib/bioroebe/taxonomy/info/is_dna.rb +46 -36
- data/lib/bioroebe/taxonomy/interactive.rb +140 -104
- 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/colourize_related_methods.rb +164 -0
- data/lib/bioroebe/toplevel_methods/databases.rb +1 -1
- data/lib/bioroebe/toplevel_methods/fasta_and_fastq.rb +107 -63
- data/lib/bioroebe/toplevel_methods/file_and_directory_related_actions.rb +14 -2
- data/lib/bioroebe/toplevel_methods/misc.rb +118 -11
- 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 +69 -64
- data/doc/setup.rb +0 -1655
- data/lib/bioroebe/fasta_and_fastq/parse_fasta/constants.rb +0 -50
- data/lib/bioroebe/fasta_and_fastq/parse_fasta/initialize.rb +0 -86
- data/lib/bioroebe/fasta_and_fastq/parse_fasta/menu.rb +0 -117
- data/lib/bioroebe/fasta_and_fastq/parse_fasta/misc.rb +0 -981
- data/lib/bioroebe/fasta_and_fastq/parse_fasta/report.rb +0 -156
- data/lib/bioroebe/fasta_and_fastq/parse_fasta/reset.rb +0 -128
- data/lib/bioroebe/genbank/genbank_parser.rb +0 -291
- data/lib/bioroebe/java/bioroebe/Base.class +0 -0
- data/lib/bioroebe/java/bioroebe/Codons.java +0 -22
- data/lib/bioroebe/java/bioroebe/PartnerNucleotide.class +0 -0
- data/lib/bioroebe/java/bioroebe/PartnerNucleotide.java +0 -19
- data/lib/bioroebe/java/bioroebe.jar +0 -0
- 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/tk.rb +0 -23
- data/lib/bioroebe/shell/user_input.rb +0 -88
- data/lib/bioroebe/shell/xorg.rb +0 -45
@@ -23,6 +23,7 @@ module Bioroebe
|
|
23
23
|
#
|
24
24
|
# Bioroebe.return_fasta_subsection_of_this_file("foobar.fa")
|
25
25
|
# Bioroebe.return_fasta_subsection_of_this_file("foobar.fa", :keep_it_flat)
|
26
|
+
# Bioroebe.return_fasta_subsection_of_this_file("/home/Temp/bioroebe/fasta/alu_elements.fasta", :keep_it_flat)
|
26
27
|
#
|
27
28
|
# ========================================================================= #
|
28
29
|
def self.return_fasta_subsection_of_this_file(
|
@@ -42,6 +43,8 @@ module Bioroebe
|
|
42
43
|
end
|
43
44
|
if File.exist? i
|
44
45
|
dataset = File.readlines(i)
|
46
|
+
pp 'DEBUG'
|
47
|
+
pp dataset
|
45
48
|
inner_array = []
|
46
49
|
size = dataset.size
|
47
50
|
dataset.each_with_index {|line, index|
|
@@ -55,16 +58,22 @@ module Bioroebe
|
|
55
58
|
end
|
56
59
|
inner_array.prepend(line)
|
57
60
|
else
|
61
|
+
# ================================================================= #
|
58
62
|
# This will be a FASTA body section.
|
63
|
+
# ================================================================= #
|
59
64
|
case extra_options
|
60
|
-
|
65
|
+
# ================================================================= #
|
66
|
+
# === :keep_body_together
|
67
|
+
# ================================================================= #
|
68
|
+
when :keep_body_together, # the default
|
69
|
+
:keep_it_flat
|
61
70
|
inner_array << line
|
62
71
|
else
|
63
72
|
# =============================================================== #
|
64
73
|
# Else we have to append it.
|
65
74
|
# =============================================================== #
|
66
75
|
previous_line = inner_array.last
|
67
|
-
if previous_line.start_with?
|
76
|
+
if previous_line and previous_line.start_with?('>')
|
68
77
|
inner_array << line
|
69
78
|
else
|
70
79
|
inner_array.last.strip!
|
@@ -86,17 +86,6 @@ class ShowFastaHeaders < Bioroebe::CommandlineApplication # === Biroebe::ShowFas
|
|
86
86
|
@input
|
87
87
|
end
|
88
88
|
|
89
|
-
# ========================================================================= #
|
90
|
-
# === report_this_header_from_that_file
|
91
|
-
# ========================================================================= #
|
92
|
-
def report_this_header_from_that_file(header, file)
|
93
|
-
if @be_verbose
|
94
|
-
erev "The file at #{sfile(file)}#{rev} has the following FASTA header:"
|
95
|
-
e
|
96
|
-
end
|
97
|
-
e " #{simp(header)}"
|
98
|
-
end
|
99
|
-
|
100
89
|
# ========================================================================= #
|
101
90
|
# === input_without_extension
|
102
91
|
# ========================================================================= #
|
@@ -116,13 +105,39 @@ class ShowFastaHeaders < Bioroebe::CommandlineApplication # === Biroebe::ShowFas
|
|
116
105
|
}
|
117
106
|
end
|
118
107
|
|
108
|
+
# ========================================================================= #
|
109
|
+
# === report_this_header_from_that_file
|
110
|
+
# ========================================================================= #
|
111
|
+
def report_this_header_from_that_file(header, file)
|
112
|
+
if @be_verbose
|
113
|
+
erev "The file at #{sfile(file)}#{rev} has the following FASTA header:"
|
114
|
+
e
|
115
|
+
end
|
116
|
+
e " #{simp(header)}"
|
117
|
+
if header.include? '|'
|
118
|
+
splitted = header.split('|')
|
119
|
+
if splitted.size > 2
|
120
|
+
assumed_name_of_the_organism = splitted[2].strip
|
121
|
+
if assumed_name_of_the_organism.include? 'OS='
|
122
|
+
assumed_name_of_the_organism = assumed_name_of_the_organism.scan(/ OS=(.+)/).flatten
|
123
|
+
assumed_name_of_the_organism = assumed_name_of_the_organism.first
|
124
|
+
if assumed_name_of_the_organism.include? ' ('
|
125
|
+
assumed_name_of_the_organism = assumed_name_of_the_organism.split(' (').first
|
126
|
+
end
|
127
|
+
end
|
128
|
+
erev 'The organism may be: '+
|
129
|
+
steelblue(assumed_name_of_the_organism)+rev
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
119
134
|
# ========================================================================= #
|
120
135
|
# === run (run tag)
|
121
136
|
# ========================================================================= #
|
122
137
|
def run
|
123
138
|
files = Dir[input?]
|
124
139
|
if files.empty?
|
125
|
-
opnn; e
|
140
|
+
opnn; e "No files could be found for #{input?}."
|
126
141
|
else
|
127
142
|
report_these_files(files)
|
128
143
|
end
|
@@ -29,11 +29,6 @@ class SimplifyFastaHeader < ::Bioroebe::CommandlineApplication # === Bioroebe::S
|
|
29
29
|
|
30
30
|
require 'bioroebe/fasta_and_fastq/parse_fasta/parse_fasta.rb'
|
31
31
|
|
32
|
-
# ========================================================================= #
|
33
|
-
# === NAMESPACE
|
34
|
-
# ========================================================================= #
|
35
|
-
NAMESPACE = inspect
|
36
|
-
|
37
32
|
# ========================================================================= #
|
38
33
|
# === initialize
|
39
34
|
# ========================================================================= #
|
@@ -53,6 +48,7 @@ class SimplifyFastaHeader < ::Bioroebe::CommandlineApplication # === Bioroebe::S
|
|
53
48
|
# ========================================================================= #
|
54
49
|
def reset
|
55
50
|
super()
|
51
|
+
infer_the_namespace
|
56
52
|
end
|
57
53
|
|
58
54
|
# ========================================================================= #
|
@@ -8,11 +8,6 @@ module Bioroebe
|
|
8
8
|
|
9
9
|
class SplitThisFastaFileIntoChromosomes < ::Bioroebe::CommandlineApplication # === Bioroebe::SplitThisFastaFileIntoChromosomes
|
10
10
|
|
11
|
-
# ========================================================================= #
|
12
|
-
# === NAMESPACE
|
13
|
-
# ========================================================================= #
|
14
|
-
NAMESPACE = inspect
|
15
|
-
|
16
11
|
# ========================================================================= #
|
17
12
|
# === ALLOWED_CHARACTERS
|
18
13
|
#
|
@@ -0,0 +1,67 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# === Bioroebe::Genome
|
6
|
+
#
|
7
|
+
# This class should be able to represent a genome.
|
8
|
+
#
|
9
|
+
# Usage example:
|
10
|
+
#
|
11
|
+
# Bioroebe::Genome.new(ARGV)
|
12
|
+
#
|
13
|
+
# =========================================================================== #
|
14
|
+
# require 'bioroebe/genome/genome.rb'
|
15
|
+
# =========================================================================== #
|
16
|
+
module Bioroebe
|
17
|
+
|
18
|
+
class Genome # < Base # === Bioroebe::Genome
|
19
|
+
|
20
|
+
# ========================================================================= #
|
21
|
+
# === NAMESPACE
|
22
|
+
# ========================================================================= #
|
23
|
+
NAMESPACE = inspect
|
24
|
+
|
25
|
+
# ========================================================================= #
|
26
|
+
# === initialize
|
27
|
+
# ========================================================================= #
|
28
|
+
def initialize(
|
29
|
+
commandline_arguments = nil,
|
30
|
+
run_already = true
|
31
|
+
)
|
32
|
+
reset
|
33
|
+
set_commandline_arguments(
|
34
|
+
commandline_arguments
|
35
|
+
)
|
36
|
+
run if run_already
|
37
|
+
end
|
38
|
+
|
39
|
+
# ========================================================================= #
|
40
|
+
# === reset (reset tag)
|
41
|
+
# ========================================================================= #
|
42
|
+
def reset
|
43
|
+
super()
|
44
|
+
# ======================================================================= #
|
45
|
+
# === @namespace
|
46
|
+
# ======================================================================= #
|
47
|
+
@namespace = NAMESPACE
|
48
|
+
end
|
49
|
+
|
50
|
+
# ========================================================================= #
|
51
|
+
# === run (run tag)
|
52
|
+
# ========================================================================= #
|
53
|
+
def run
|
54
|
+
end
|
55
|
+
|
56
|
+
# ========================================================================= #
|
57
|
+
# === Bioroebe::Genome[]
|
58
|
+
# ========================================================================= #
|
59
|
+
def self.[](i = '')
|
60
|
+
new(i)
|
61
|
+
end
|
62
|
+
|
63
|
+
end; end
|
64
|
+
|
65
|
+
if __FILE__ == $PROGRAM_NAME
|
66
|
+
Bioroebe::Genome.new(ARGV)
|
67
|
+
end # genome
|
@@ -28,11 +28,6 @@ class GenomePattern < ::Bioroebe::CommandlineApplication # === Bioroebe::GenomeP
|
|
28
28
|
|
29
29
|
require 'bioroebe/gene/gene.rb'
|
30
30
|
|
31
|
-
# ========================================================================= #
|
32
|
-
# === NAMESPACE
|
33
|
-
# ========================================================================= #
|
34
|
-
NAMESPACE = inspect
|
35
|
-
|
36
31
|
# ========================================================================= #
|
37
32
|
# === initialize
|
38
33
|
# ========================================================================= #
|
@@ -50,15 +45,14 @@ class GenomePattern < ::Bioroebe::CommandlineApplication # === Bioroebe::GenomeP
|
|
50
45
|
# ========================================================================= #
|
51
46
|
def reset
|
52
47
|
super()
|
53
|
-
|
54
|
-
# === @namespace
|
55
|
-
# ======================================================================= #
|
56
|
-
@namespace = NAMESPACE
|
48
|
+
infer_the_namespace
|
57
49
|
# ======================================================================= #
|
58
50
|
# === @hash
|
59
51
|
# ======================================================================= #
|
60
52
|
@hash = {}
|
53
|
+
# === :array_genes
|
61
54
|
@hash[:array_genes] = []
|
55
|
+
# === :be_verbose
|
62
56
|
@hash[:be_verbose] = true # If true then we tell the user what we will do.
|
63
57
|
end
|
64
58
|
|
@@ -0,0 +1 @@
|
|
1
|
+
gtk3
|
@@ -94,6 +94,7 @@ class Controller < ::Gtk::Box # === Bioroebe::GUI::Gtk::Controller
|
|
94
94
|
# === reset (reset tag)
|
95
95
|
# ========================================================================= #
|
96
96
|
def reset
|
97
|
+
batch_require_all_relevant_gtk3_files
|
97
98
|
reset_the_internal_variables
|
98
99
|
# ======================================================================= #
|
99
100
|
# === @configuration
|
@@ -105,6 +106,10 @@ class Controller < ::Gtk::Box # === Bioroebe::GUI::Gtk::Controller
|
|
105
106
|
title_width_height_font(TITLE, WIDTH, HEIGHT, USE_THIS_FONT)
|
106
107
|
do_handle_all_CSS_related_aspects
|
107
108
|
infer_the_size_automatically
|
109
|
+
# ======================================================================= #
|
110
|
+
# === @nucleotide_analyser
|
111
|
+
# ======================================================================= #
|
112
|
+
@nucleotide_analyser = NucleotideAnalyser.new
|
108
113
|
end
|
109
114
|
|
110
115
|
# ========================================================================= #
|
@@ -160,7 +165,7 @@ class Controller < ::Gtk::Box # === Bioroebe::GUI::Gtk::Controller
|
|
160
165
|
end
|
161
166
|
|
162
167
|
# ========================================================================= #
|
163
|
-
# === create_the_header_bar
|
168
|
+
# === create_the_header_bar (header tag, top tag)
|
164
169
|
# ========================================================================= #
|
165
170
|
def create_the_header_bar
|
166
171
|
# ======================================================================= #
|
@@ -168,7 +173,8 @@ class Controller < ::Gtk::Box # === Bioroebe::GUI::Gtk::Controller
|
|
168
173
|
# ======================================================================= #
|
169
174
|
@header_bar = default_header_bar
|
170
175
|
@header_bar.pad8px
|
171
|
-
|
176
|
+
_ = selectable_text(' 🐟 Controller 🐟 ')
|
177
|
+
@header_bar.central_element(_)
|
172
178
|
end
|
173
179
|
|
174
180
|
# ========================================================================= #
|
@@ -200,6 +206,7 @@ class Controller < ::Gtk::Box # === Bioroebe::GUI::Gtk::Controller
|
|
200
206
|
# ========================================================================= #
|
201
207
|
def batch_require_all_relevant_gtk3_files
|
202
208
|
require 'bioroebe/gui/gtk3/alignment/alignment.rb'
|
209
|
+
require 'bioroebe/gui/gtk3/nucleotide_analyser/nucleotide_analyser.rb'
|
203
210
|
require 'bioroebe/gui/gtk3/aminoacid_composition/aminoacid_composition.rb'
|
204
211
|
require 'bioroebe/gui/gtk3/blosum_matrix_viewer/blosum_matrix_viewer.rb'
|
205
212
|
require 'bioroebe/gui/gtk3/dna_to_aminoacid_widget/dna_to_aminoacid_widget.rb'
|
@@ -209,7 +216,6 @@ class Controller < ::Gtk::Box # === Bioroebe::GUI::Gtk::Controller
|
|
209
216
|
require 'bioroebe/gui/gtk3/gene/gene.rb'
|
210
217
|
require 'bioroebe/gui/gtk3/hamming_distance/hamming_distance.rb'
|
211
218
|
require 'bioroebe/gui/gtk3/levensthein_distance/levensthein_distance.rb'
|
212
|
-
require 'bioroebe/gui/gtk3/nucleotide_analyser/nucleotide_analyser.rb'
|
213
219
|
require 'bioroebe/gui/gtk3/parse_pdb_file/parse_pdb_file.rb'
|
214
220
|
require 'bioroebe/gui/gtk3/primer_design_widget/primer_design_widget.rb'
|
215
221
|
require 'bioroebe/gui/gtk3/protein_to_DNA/protein_to_DNA.rb'
|
@@ -225,33 +231,36 @@ class Controller < ::Gtk::Box # === Bioroebe::GUI::Gtk::Controller
|
|
225
231
|
# === connect_skeleton (connect tag)
|
226
232
|
# ========================================================================= #
|
227
233
|
def connect_skeleton
|
228
|
-
batch_require_all_relevant_gtk3_files
|
229
234
|
abort_on_exception
|
230
235
|
# ========================================================================= #
|
231
236
|
# === DnaToAminoacidWidget
|
232
237
|
# ========================================================================= #
|
233
238
|
@dna_to_aminoacid_widget = DnaToAminoacidWidget.new
|
234
239
|
@dna_to_aminoacid_widget.set_parent_widget(self)
|
235
|
-
@notebook.add_page('dna-to-aminoacid-widget',
|
240
|
+
@notebook.add_page('dna-to-aminoacid-widget', vbox(@dna_to_aminoacid_widget))
|
241
|
+
# ======================================================================= #
|
242
|
+
# === nucleotide-analyser
|
243
|
+
# ======================================================================= #
|
244
|
+
@notebook.add_page('nucleotide-analyser', vbox(@nucleotide_analyser))
|
236
245
|
# ======================================================================= #
|
237
246
|
# === aminoacid-composition
|
238
247
|
# ======================================================================= #
|
239
248
|
@aminoacid_composition = AminoacidComposition.new
|
240
249
|
@aminoacid_composition.set_parent_widget(self)
|
241
|
-
@notebook.add_page('aminoacid-composition',
|
250
|
+
@notebook.add_page('aminoacid-composition', vbox(@aminoacid_composition))
|
242
251
|
# ======================================================================= #
|
243
252
|
# === protein-to-DNA
|
244
253
|
# ======================================================================= #
|
245
254
|
@protein_to_DNA = ProteinToDNA.new
|
246
|
-
@notebook.add_page('protein-to-DNA',
|
255
|
+
@notebook.add_page('protein-to-DNA', vbox(@protein_to_DNA))
|
247
256
|
# ======================================================================= #
|
248
257
|
# === dna-to-reverse-complement
|
249
258
|
# ======================================================================= #
|
250
|
-
@notebook.add_page('dna-to-reverse-complement',
|
259
|
+
@notebook.add_page('dna-to-reverse-complement', vbox(DnaToReverseComplementWidget.new))
|
251
260
|
# ======================================================================= #
|
252
261
|
# === alignment
|
253
262
|
# ======================================================================= #
|
254
|
-
@notebook.add_page('alignment',
|
263
|
+
@notebook.add_page('alignment', vbox(Alignment.new))
|
255
264
|
# ======================================================================= #
|
256
265
|
# === anti-sense-strand
|
257
266
|
#
|
@@ -260,7 +269,7 @@ class Controller < ::Gtk::Box # === Bioroebe::GUI::Gtk::Controller
|
|
260
269
|
# ======================================================================= #
|
261
270
|
# === blosum-matrix-viewer
|
262
271
|
# ======================================================================= #
|
263
|
-
@notebook.add_page('blosum-matrix-viewer',
|
272
|
+
@notebook.add_page('blosum-matrix-viewer', vbox(BlosumMatrixViewer.new))
|
264
273
|
# ======================================================================= #
|
265
274
|
# === calculate_cell_numbers_of_bacteria
|
266
275
|
#
|
@@ -269,59 +278,55 @@ class Controller < ::Gtk::Box # === Bioroebe::GUI::Gtk::Controller
|
|
269
278
|
# ======================================================================= #
|
270
279
|
# === fasta-table-widget
|
271
280
|
# ======================================================================= #
|
272
|
-
@notebook.add_page('fasta-table-widget',
|
281
|
+
@notebook.add_page('fasta-table-widget', vbox(FastaTableWidget.new))
|
273
282
|
# ======================================================================= #
|
274
283
|
# === format-converter
|
275
284
|
# ======================================================================= #
|
276
|
-
@notebook.add_page('format-converter',
|
285
|
+
@notebook.add_page('format-converter', vbox(FormatConverter.new))
|
277
286
|
# ======================================================================= #
|
278
287
|
# === gene
|
279
288
|
# ======================================================================= #
|
280
|
-
@notebook.add_page('gene',
|
289
|
+
@notebook.add_page('gene', vbox(Gene.new))
|
281
290
|
# ======================================================================= #
|
282
291
|
# === hamming-distance
|
283
292
|
# ======================================================================= #
|
284
|
-
@notebook.add_page('hamming-distance',
|
293
|
+
@notebook.add_page('hamming-distance', vbox(HammingDistance.new))
|
285
294
|
# ======================================================================= #
|
286
295
|
# === levensthein-distance
|
287
296
|
# ======================================================================= #
|
288
|
-
@notebook.add_page('levensthein-distance',
|
289
|
-
# ======================================================================= #
|
290
|
-
# === nucleotide-analyser
|
291
|
-
# ======================================================================= #
|
292
|
-
@notebook.add_page('nucleotide-analyser', gtk_vbox(NucleotideAnalyser.new))
|
297
|
+
@notebook.add_page('levensthein-distance', vbox(LevenstheinDistance.new))
|
293
298
|
# ======================================================================= #
|
294
299
|
# === parse-pdb-file
|
295
300
|
# ======================================================================= #
|
296
|
-
@notebook.add_page('parse-pdb-file',
|
301
|
+
@notebook.add_page('parse-pdb-file', vbox(ParsePdbFile.new))
|
297
302
|
# ======================================================================= #
|
298
303
|
# === primer-design-widget
|
299
304
|
# ======================================================================= #
|
300
|
-
@notebook.add_page('primer-design-widget',
|
305
|
+
@notebook.add_page('primer-design-widget', vbox(PrimerDesignWidget.new))
|
301
306
|
# ======================================================================= #
|
302
307
|
# === random-sequence
|
303
308
|
# ======================================================================= #
|
304
|
-
@notebook.add_page('random-sequence',
|
309
|
+
@notebook.add_page('random-sequence', vbox(RandomSequence.new))
|
305
310
|
# ======================================================================= #
|
306
311
|
# === restriction-enzymes
|
307
312
|
# ======================================================================= #
|
308
|
-
@notebook.add_page('restriction-enzymes',
|
313
|
+
@notebook.add_page('restriction-enzymes', vbox(RestrictionEnzymes.new))
|
309
314
|
# ======================================================================= #
|
310
315
|
# === show-codon-table
|
311
316
|
# ======================================================================= #
|
312
|
-
@notebook.add_page('show-codon-table',
|
317
|
+
@notebook.add_page('show-codon-table', vbox(ShowCodonTable.new))
|
313
318
|
# ======================================================================= #
|
314
319
|
# === show-codon-usage
|
315
320
|
# ======================================================================= #
|
316
|
-
@notebook.add_page('show-codon-usage',
|
321
|
+
@notebook.add_page('show-codon-usage', vbox(ShowCodonUsage.new))
|
317
322
|
# ======================================================================= #
|
318
323
|
# === sizeseq
|
319
324
|
# ======================================================================= #
|
320
|
-
@notebook.add_page('sizeseq',
|
325
|
+
@notebook.add_page('sizeseq', vbox(Sizeseq.new))
|
321
326
|
# ======================================================================= #
|
322
327
|
# === three-to-one
|
323
328
|
# ======================================================================= #
|
324
|
-
@notebook.add_page('three-to-one',
|
329
|
+
@notebook.add_page('three-to-one', vbox(ThreeToOne.new))
|
325
330
|
# ======================================================================= #
|
326
331
|
# === www-finder
|
327
332
|
#
|
@@ -388,8 +393,21 @@ class Controller < ::Gtk::Box # === Bioroebe::GUI::Gtk::Controller
|
|
388
393
|
if @protein_to_DNA.respond_to? :do_determine_the_DNA_sequence
|
389
394
|
@protein_to_DNA.do_determine_the_DNA_sequence
|
390
395
|
end
|
396
|
+
# ======================================================================= #
|
397
|
+
# Also update the nucleotide-analyser next:
|
398
|
+
# ======================================================================= #
|
399
|
+
@nucleotide_analyser.set_dna_sequence(
|
400
|
+
main_dna_sequence?.delete(' ')
|
401
|
+
)
|
391
402
|
end
|
392
403
|
|
404
|
+
# ========================================================================= #
|
405
|
+
# === main_dna_sequence?
|
406
|
+
# ========================================================================= #
|
407
|
+
def main_dna_sequence?
|
408
|
+
@dna_to_aminoacid_widget.dna_sequence?
|
409
|
+
end; alias main_DNA_sequence? main_dna_sequence? # === main_DNA_sequence?
|
410
|
+
|
393
411
|
end; end; end
|
394
412
|
|
395
413
|
# =========================================================================== #
|
@@ -157,10 +157,17 @@ class DnaToAminoacidWidget < ::Gtk::Box # === Bioroebe::GUI::Gtk::DnaToAminoacid
|
|
157
157
|
# === sync_the_entries_back_onto_the_two_main_strings
|
158
158
|
# ========================================================================= #
|
159
159
|
def sync_the_entries_back_onto_the_two_main_strings
|
160
|
-
@dna_sequence =
|
160
|
+
@dna_sequence = return_the_main_DNA_sequence
|
161
161
|
@aminoacid_sequence = right_entry?.text.to_s
|
162
162
|
end
|
163
163
|
|
164
|
+
# ========================================================================= #
|
165
|
+
# === dna_sequence?
|
166
|
+
# ========================================================================= #
|
167
|
+
def dna_sequence?
|
168
|
+
left_entry?.text.to_s
|
169
|
+
end; alias return_the_main_DNA_sequence dna_sequence? # === return_the_main_DNA_sequence
|
170
|
+
|
164
171
|
# ========================================================================= #
|
165
172
|
# === create_the_entries (entries tag)
|
166
173
|
# ========================================================================= #
|
@@ -228,7 +235,7 @@ class DnaToAminoacidWidget < ::Gtk::Box # === Bioroebe::GUI::Gtk::DnaToAminoacid
|
|
228
235
|
# === sanitized_half_width
|
229
236
|
# ========================================================================= #
|
230
237
|
def sanitized_half_width
|
231
|
-
(@width / 2)- 30
|
238
|
+
(@width / 2) - 30
|
232
239
|
end
|
233
240
|
|
234
241
|
# ========================================================================= #
|
@@ -238,6 +245,17 @@ class DnaToAminoacidWidget < ::Gtk::Box # === Bioroebe::GUI::Gtk::DnaToAminoacid
|
|
238
245
|
@left_entry
|
239
246
|
end
|
240
247
|
|
248
|
+
# ========================================================================= #
|
249
|
+
# === do_properly_space_the_top_left_entry
|
250
|
+
# ========================================================================= #
|
251
|
+
def do_properly_space_the_top_left_entry
|
252
|
+
old_text = @left_entry.text?.delete(' ')
|
253
|
+
_ = old_text.
|
254
|
+
gsub(/(.{3})/,' \1').
|
255
|
+
lstrip
|
256
|
+
@left_entry.set_text(_)
|
257
|
+
end
|
258
|
+
|
241
259
|
# ========================================================================= #
|
242
260
|
# === entry_for_the_codon_table?
|
243
261
|
# ========================================================================= #
|
@@ -264,7 +282,7 @@ class DnaToAminoacidWidget < ::Gtk::Box # === Bioroebe::GUI::Gtk::DnaToAminoacid
|
|
264
282
|
# ========================================================================= #
|
265
283
|
def update_the_dna_sequence_then_do_the_conversion
|
266
284
|
set_dna_sequence(
|
267
|
-
left_entry?.text
|
285
|
+
left_entry?.text.upcase # Upcasing this is more elegant, in my opinion.
|
268
286
|
)
|
269
287
|
do_the_conversion
|
270
288
|
end
|
@@ -289,33 +307,6 @@ class DnaToAminoacidWidget < ::Gtk::Box # === Bioroebe::GUI::Gtk::DnaToAminoacid
|
|
289
307
|
# @right_entry.on_click_event { :select_text }
|
290
308
|
end
|
291
309
|
|
292
|
-
# ========================================================================= #
|
293
|
-
# === create_button_trigger_conversion
|
294
|
-
# ========================================================================= #
|
295
|
-
def create_button_trigger_conversion
|
296
|
-
# ======================================================================= #
|
297
|
-
# === @button_trigger_conversion
|
298
|
-
# ======================================================================= #
|
299
|
-
@button_trigger_conversion = gtk_bold_button('_Trigger Conversion')
|
300
|
-
@button_trigger_conversion.disallow_resizing
|
301
|
-
@button_trigger_conversion.set_size_request(125, 40)
|
302
|
-
@button_trigger_conversion.lightgreen
|
303
|
-
@button_trigger_conversion.set_background_colour :whitesmoke
|
304
|
-
@button_trigger_conversion.on_clicked {
|
305
|
-
update_the_dna_sequence_then_do_the_conversion
|
306
|
-
}
|
307
|
-
@button_trigger_conversion.bblack2
|
308
|
-
# ======================================================================= #
|
309
|
-
# Use a tooltip as well for our button:
|
310
|
-
# ======================================================================= #
|
311
|
-
@button_trigger_conversion.hint =
|
312
|
-
"Clicking on this button will convert from a <b>DNA</b> "\
|
313
|
-
"<b>sequence</b> \n(on the left hand side) to the <b>corresponding "\
|
314
|
-
"Aminoacid sequence</b>.\n\nMake sure you input the DNA sequence "\
|
315
|
-
"on the left hand side. The space character, aka ' ', will "\
|
316
|
-
"be ignored."
|
317
|
-
end
|
318
|
-
|
319
310
|
# ========================================================================= #
|
320
311
|
# === connect_skeleton (connect tag)
|
321
312
|
# ========================================================================= #
|
@@ -325,9 +316,9 @@ class DnaToAminoacidWidget < ::Gtk::Box # === Bioroebe::GUI::Gtk::DnaToAminoacid
|
|
325
316
|
# The two top labels denote which widget is the one for the DNA
|
326
317
|
# sequence, and which one is for the aminoacid sequence.
|
327
318
|
# ======================================================================= #
|
328
|
-
dna_sequence_label =
|
319
|
+
dna_sequence_label = bold_label('DNA sequence')
|
329
320
|
dna_sequence_label.set_size_request(sanitized_half_width, 42)
|
330
|
-
aminoacid_sequence_label =
|
321
|
+
aminoacid_sequence_label = bold_label('Aminoacid sequence')
|
331
322
|
aminoacid_sequence_label.set_size_request(sanitized_half_width, 42)
|
332
323
|
# ======================================================================= #
|
333
324
|
# API for .attach() is:
|
@@ -357,6 +348,7 @@ class DnaToAminoacidWidget < ::Gtk::Box # === Bioroebe::GUI::Gtk::DnaToAminoacid
|
|
357
348
|
dropdown_box.use_this_font = SMALLER_FONT
|
358
349
|
dropdown_box.first_element_is_active
|
359
350
|
dropdown_box.bblack1
|
351
|
+
dropdown_box.pad5px
|
360
352
|
dropdown_box.hint = 'When a new codon table is assigned, via the '\
|
361
353
|
'drop-down menu, then any assigned DNA sequence will be automatically '\
|
362
354
|
'translated to its corresponding amino acid sequence.'
|
@@ -370,11 +362,16 @@ class DnaToAminoacidWidget < ::Gtk::Box # === Bioroebe::GUI::Gtk::DnaToAminoacid
|
|
370
362
|
hbox.minimal(dropdown_box, 3)
|
371
363
|
add(hbox)
|
372
364
|
vbox = gtk_vbox
|
373
|
-
|
365
|
+
# ======================================================================= #
|
366
|
+
# === @label_n_DNA_nucleotides
|
367
|
+
# ======================================================================= #
|
368
|
+
@label_n_DNA_nucleotides = bold_label('n DNA nucleotides: ')
|
374
369
|
@label_n_DNA_nucleotides.align_left
|
370
|
+
@label_n_DNA_nucleotides.make_selectable
|
375
371
|
vbox.add(@label_n_DNA_nucleotides)
|
376
|
-
@label_n_aminoacids =
|
372
|
+
@label_n_aminoacids = bold_label('n aminoacids: ')
|
377
373
|
@label_n_aminoacids.align_left
|
374
|
+
@label_n_aminoacids.make_selectable
|
378
375
|
vbox.add(@label_n_aminoacids)
|
379
376
|
minimal(vbox)
|
380
377
|
end
|
@@ -388,7 +385,7 @@ class DnaToAminoacidWidget < ::Gtk::Box # === Bioroebe::GUI::Gtk::DnaToAminoacid
|
|
388
385
|
@header_bar.bblack1
|
389
386
|
button_open_file = icon_theme(:open_file)
|
390
387
|
button_open_file.hint = 'Click on this button to open a '\
|
391
|
-
|
388
|
+
'local FASTA file.'
|
392
389
|
button_open_file.on_clicked {
|
393
390
|
result = do_pick_a_local_file
|
394
391
|
if result and File.file?(result) and result.end_with?('.fasta','.fa')
|
@@ -410,9 +407,9 @@ class DnaToAminoacidWidget < ::Gtk::Box # === Bioroebe::GUI::Gtk::DnaToAminoacid
|
|
410
407
|
current_folder: ::Bioroebe.log_dir?,
|
411
408
|
additional_directories: [
|
412
409
|
::Bioroebe.log_dir?,
|
413
|
-
ENV['PC'],
|
414
|
-
ENV['MY_TEMP'],
|
415
|
-
ENV['RSRC']
|
410
|
+
ENV['PC'].to_s,
|
411
|
+
ENV['MY_TEMP'].to_s,
|
412
|
+
ENV['RSRC'].to_s
|
416
413
|
]
|
417
414
|
}}
|
418
415
|
_ = ::Gtk.main_file?.to_s
|
@@ -505,17 +502,6 @@ class DnaToAminoacidWidget < ::Gtk::Box # === Bioroebe::GUI::Gtk::DnaToAminoacid
|
|
505
502
|
set_dna_sequence(i)
|
506
503
|
end
|
507
504
|
|
508
|
-
# ========================================================================= #
|
509
|
-
# === create_skeleton (create tag)
|
510
|
-
# ========================================================================= #
|
511
|
-
def create_skeleton
|
512
|
-
create_the_header_bar
|
513
|
-
create_grid
|
514
|
-
create_button_trigger_conversion
|
515
|
-
create_the_entries
|
516
|
-
create_the_event_box
|
517
|
-
end
|
518
|
-
|
519
505
|
# ========================================================================= #
|
520
506
|
# === set_aminoacid_sequence
|
521
507
|
# ========================================================================= #
|
@@ -573,6 +559,46 @@ class DnaToAminoacidWidget < ::Gtk::Box # === Bioroebe::GUI::Gtk::DnaToAminoacid
|
|
573
559
|
alias do_trigger_the_conversion do_the_conversion # === do_trigger_the_conversion
|
574
560
|
alias do_determine_the_aminoacid_sequence do_the_conversion # === do_determine_the_aminoacid_sequence
|
575
561
|
|
562
|
+
# ========================================================================= #
|
563
|
+
# === create_skeleton (create tag)
|
564
|
+
# ========================================================================= #
|
565
|
+
def create_skeleton
|
566
|
+
create_the_header_bar
|
567
|
+
create_grid
|
568
|
+
create_button_trigger_conversion
|
569
|
+
create_the_entries
|
570
|
+
create_the_event_box
|
571
|
+
end
|
572
|
+
|
573
|
+
# ========================================================================= #
|
574
|
+
# === create_button_trigger_conversion
|
575
|
+
# ========================================================================= #
|
576
|
+
def create_button_trigger_conversion
|
577
|
+
# ======================================================================= #
|
578
|
+
# === @button_trigger_conversion
|
579
|
+
# ======================================================================= #
|
580
|
+
@button_trigger_conversion = bold_button('_Trigger Conversion')
|
581
|
+
@button_trigger_conversion.clear_background
|
582
|
+
@button_trigger_conversion.disallow_resizing
|
583
|
+
@button_trigger_conversion.set_size_request(125, 40)
|
584
|
+
@button_trigger_conversion.set_background_colour :whitesmoke
|
585
|
+
@button_trigger_conversion.on_hover(:lightgreen)
|
586
|
+
@button_trigger_conversion.on_clicked {
|
587
|
+
update_the_dna_sequence_then_do_the_conversion
|
588
|
+
do_properly_space_the_top_left_entry
|
589
|
+
}
|
590
|
+
@button_trigger_conversion.bblack2
|
591
|
+
# ======================================================================= #
|
592
|
+
# Use a tooltip as well for our button:
|
593
|
+
# ======================================================================= #
|
594
|
+
@button_trigger_conversion.hint =
|
595
|
+
"Clicking on this button will convert from a <b>DNA</b> "\
|
596
|
+
"<b>sequence</b> \n(on the left hand side) to the <b>corresponding "\
|
597
|
+
"Aminoacid sequence</b>.\n\nMake sure you input the DNA sequence "\
|
598
|
+
"on the left hand side. The space character, aka ' ', will "\
|
599
|
+
"be ignored."
|
600
|
+
end
|
601
|
+
|
576
602
|
# ========================================================================= #
|
577
603
|
# === run (run tag)
|
578
604
|
# ========================================================================= #
|
@@ -584,7 +610,7 @@ class DnaToAminoacidWidget < ::Gtk::Box # === Bioroebe::GUI::Gtk::DnaToAminoacid
|
|
584
610
|
# ========================================================================= #
|
585
611
|
# === Bioroebe::GUI::Gtk::DnaToAminoacidWidget[]
|
586
612
|
# ========================================================================= #
|
587
|
-
def self.[](i =
|
613
|
+
def self.[](i = ARGV)
|
588
614
|
new(i)
|
589
615
|
end
|
590
616
|
|