bioroebe 0.10.80 → 0.12.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3946 -2817
- data/bin/bioroebe +13 -2
- data/bin/bioroebe_hash +7 -0
- data/bin/codon_to_aminoacid +6 -4
- data/bin/compacter +7 -0
- data/bin/plain_palindrome +7 -0
- data/bioroebe.gemspec +3 -3
- data/doc/README.gen +3918 -2793
- data/doc/quality_control/commandline_applications.md +3 -3
- data/doc/statistics/statistics.md +7 -7
- data/doc/todo/bioroebe_GUI_todo.md +19 -14
- data/doc/todo/bioroebe_java_todo.md +22 -0
- data/doc/todo/bioroebe_todo.md +2075 -2620
- data/lib/bioroebe/C++/DNA.cpp +69 -0
- data/lib/bioroebe/C++/RNA.cpp +58 -0
- data/lib/bioroebe/C++/sequence.cpp +35 -0
- data/lib/bioroebe/abstract/README.md +1 -0
- data/lib/bioroebe/abstract/features.rb +29 -0
- 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/base_module/base_module.rb +36 -0
- data/lib/bioroebe/base/colours_for_base/colours_for_base.rb +18 -8
- data/lib/bioroebe/base/commandline_application/commandline_application.rb +13 -9
- data/lib/bioroebe/base/commandline_application/commandline_arguments.rb +24 -19
- data/lib/bioroebe/base/commandline_application/misc.rb +66 -49
- data/lib/bioroebe/base/commandline_application/opn.rb +8 -8
- data/lib/bioroebe/base/commandline_application/reset.rb +5 -3
- data/lib/bioroebe/base/internal_hash_module/internal_hash_module.rb +42 -0
- data/lib/bioroebe/base/misc.rb +35 -0
- data/lib/bioroebe/base/prototype/misc.rb +15 -9
- data/lib/bioroebe/base/prototype/reset.rb +10 -0
- data/lib/bioroebe/cleave_and_digest/digestion.rb +10 -2
- data/lib/bioroebe/cleave_and_digest/trypsin.rb +104 -50
- data/lib/bioroebe/codon_tables/frequencies/parse_frequency_table.rb +2 -10
- data/lib/bioroebe/codons/codons.rb +1 -1
- data/lib/bioroebe/codons/convert_this_codon_to_that_aminoacid.rb +208 -59
- data/lib/bioroebe/codons/possible_codons_for_this_aminoacid.rb +1 -9
- data/lib/bioroebe/codons/show_codon_tables.rb +8 -3
- data/lib/bioroebe/codons/show_codon_usage.rb +15 -4
- data/lib/bioroebe/colours/rev.rb +4 -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/constants/nucleotides.rb +7 -0
- data/lib/bioroebe/conversions/dna_to_aminoacid_sequence.rb +109 -39
- data/lib/bioroebe/count/count_amount_of_aminoacids.rb +3 -2
- data/lib/bioroebe/count/count_amount_of_nucleotides.rb +3 -0
- data/lib/bioroebe/cpp +1 -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/data/fasta/human/Homo_sapiens_hemoglobin_subunit_alpha_HBB_mRNA.fasta +9 -0
- data/lib/bioroebe/data/fasta/human/Homo_sapiens_hemoglobin_subunit_beta_HBB_mRNA.fasta +8 -0
- data/lib/bioroebe/data/fasta/human/README.md +2 -0
- data/lib/bioroebe/dotplots/advanced_dotplot.rb +1 -1
- 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/enzymes/has_this_restriction_enzyme.rb +10 -3
- data/lib/bioroebe/enzymes/restriction_enzyme.rb +23 -1
- data/lib/bioroebe/enzymes/restriction_enzymes/statistics.rb +65 -0
- 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 +1518 -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 +130 -0
- data/lib/bioroebe/genomes/genome_pattern.rb +3 -9
- data/lib/bioroebe/gui/gtk +1 -0
- data/lib/bioroebe/gui/gtk3/alignment/alignment.rb +106 -137
- data/lib/bioroebe/gui/gtk3/aminoacid_composition/aminoacid_composition.rb +27 -61
- data/lib/bioroebe/gui/gtk3/aminoacid_composition/customized_dialog.rb +1 -1
- data/lib/bioroebe/gui/gtk3/blosum_matrix_viewer/blosum_matrix_viewer.rb +1 -2
- data/lib/bioroebe/gui/gtk3/calculate_cell_numbers_of_bacteria/calculate_cell_numbers_of_bacteria.rb +1 -2
- data/lib/bioroebe/gui/gtk3/controller/controller.rb +46 -29
- data/lib/bioroebe/gui/gtk3/dna_to_aminoacid_widget/dna_to_aminoacid_widget.rb +77 -52
- data/lib/bioroebe/gui/gtk3/dna_to_reverse_complement_widget/dna_to_reverse_complement_widget.rb +1 -2
- data/lib/bioroebe/gui/gtk3/fasta_table_widget/fasta_table_widget.rb +100 -23
- data/lib/bioroebe/gui/gtk3/format_converter/format_converter.rb +1 -2
- data/lib/bioroebe/gui/gtk3/gene/gene.rb +1 -2
- data/lib/bioroebe/gui/gtk3/hamming_distance/hamming_distance.rb +43 -30
- data/lib/bioroebe/gui/gtk3/levensthein_distance/levensthein_distance.rb +1 -2
- data/lib/bioroebe/gui/gtk3/nucleotide_analyser/nucleotide_analyser.rb +120 -73
- data/lib/bioroebe/gui/gtk3/primer_design_widget/primer_design_widget.rb +1 -2
- data/lib/bioroebe/gui/gtk3/protein_to_DNA/protein_to_DNA.rb +19 -20
- data/lib/bioroebe/gui/gtk3/random_sequence/random_sequence.rb +20 -13
- data/lib/bioroebe/gui/gtk3/restriction_enzymes/restriction_enzymes.rb +1 -2
- data/lib/bioroebe/gui/gtk3/show_codon_table/misc.rb +97 -22
- data/lib/bioroebe/gui/gtk3/show_codon_table/show_codon_table.rb +3 -73
- data/lib/bioroebe/gui/gtk3/show_codon_usage/show_codon_usage.rb +1 -2
- data/lib/bioroebe/gui/gtk3/sizeseq/sizeseq.rb +1 -2
- data/lib/bioroebe/gui/gtk3/three_to_one/three_to_one.rb +1 -2
- data/lib/bioroebe/gui/gtk3/www_finder/www_finder.rb +1 -2
- data/lib/bioroebe/gui/javafx/bioroebe/Bioroebe.class +0 -0
- data/lib/bioroebe/gui/javafx/bioroebe/Bioroebe.java +104 -0
- data/lib/bioroebe/gui/javafx/bioroebe.jar +0 -0
- data/lib/bioroebe/gui/javafx/bioroebe.mf +1 -0
- data/lib/bioroebe/gui/javafx/module-info.class +0 -0
- data/lib/bioroebe/gui/javafx/module-info.java +5 -0
- data/lib/bioroebe/gui/jruby/alignment/alignment.rb +165 -0
- data/lib/bioroebe/gui/jruby/aminoacid_composition/aminoacid_composition.rb +166 -0
- data/lib/bioroebe/gui/libui/alignment/alignment.rb +3 -1
- data/lib/bioroebe/gui/libui/controller/controller.rb +116 -0
- data/lib/bioroebe/gui/libui/random_sequence/random_sequence.rb +18 -2
- data/lib/bioroebe/gui/libui/show_codon_table/show_codon_table.rb +2 -0
- data/lib/bioroebe/gui/libui/three_to_one/three_to_one.rb +8 -6
- data/lib/bioroebe/gui/shared_code/alignment/alignment_module.rb +102 -0
- data/lib/bioroebe/gui/shared_code/aminoacid_composition/aminoacid_composition_module.rb +94 -0
- data/lib/bioroebe/gui/shared_code/levensthein_distance/levensthein_distance_module.rb +18 -16
- 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/images/FORWARD_PRIMER.png +0 -0
- data/lib/bioroebe/images/REVERSE_PRIMER.png +0 -0
- data/lib/bioroebe/images/images.html +29845 -0
- data/lib/bioroebe/java/README.md +5 -0
- data/lib/bioroebe/java/bioroebe/AllInOne.java +1 -0
- data/lib/bioroebe/java/bioroebe/Base.class +0 -0
- data/lib/bioroebe/java/bioroebe/Base.java +39 -5
- data/lib/bioroebe/java/bioroebe/IsPalindrome.java +23 -5
- data/lib/bioroebe/java/bioroebe/SanitizeNucleotideSequence.java +0 -0
- data/lib/bioroebe/java/bioroebe/Sequence.java +28 -3
- data/lib/bioroebe/java/bioroebe/ToCamelcase.class +0 -0
- data/lib/bioroebe/java/bioroebe/ToCamelcase.java +16 -4
- data/lib/bioroebe/java/bioroebe/ToRNA.java +43 -0
- data/lib/bioroebe/java/bioroebe/ToplevelMethods.java +6 -0
- data/lib/bioroebe/java/bioroebe/{BisulfiteTreatment.class → src/BisulfiteTreatment.class} +0 -0
- data/lib/bioroebe/java/bioroebe/{Codons.class → src/Codons.class} +0 -0
- data/lib/bioroebe/java/bioroebe/src/Codons.java +35 -0
- data/lib/bioroebe/java/bioroebe/src/Commandline.class +0 -0
- data/lib/bioroebe/java/bioroebe/src/Commandline.java +101 -0
- data/lib/bioroebe/java/bioroebe/{Esystem.class → src/Esystem.class} +0 -0
- data/lib/bioroebe/java/bioroebe/{Esystem.java → src/Esystem.java} +6 -1
- data/lib/bioroebe/java/bioroebe/{GenerateRandomDnaSequence.class → src/GenerateRandomDnaSequence.class} +0 -0
- data/lib/bioroebe/java/bioroebe/{GenerateRandomDnaSequence.java → src/GenerateRandomDnaSequence.java} +8 -2
- data/lib/bioroebe/java/bioroebe/src/PartnerNucleotide.class +0 -0
- data/lib/bioroebe/java/bioroebe/src/PartnerNucleotide.java +56 -0
- data/lib/bioroebe/java/bioroebe/{RemoveFile.java → src/RemoveFile.java} +10 -4
- data/lib/bioroebe/java/bioroebe/{RemoveNumbers.class → src/RemoveNumbers.class} +0 -0
- data/lib/bioroebe/java/bioroebe/{RemoveNumbers.java → src/RemoveNumbers.java} +1 -0
- data/lib/bioroebe/java/bioroebe/src/toplevel_methods/BaseComposition.class +0 -0
- data/lib/bioroebe/java/bioroebe/src/toplevel_methods/BaseComposition.java +75 -0
- data/lib/bioroebe/misc/ruler.rb +11 -2
- data/lib/bioroebe/nucleotides/most_likely_nucleotide_sequence_for_this_aminoacid_sequence.rb +1 -9
- data/lib/bioroebe/nucleotides/sanitize_nucleotide_sequence.rb +59 -18
- 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 +4 -10
- 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/convert_dna_to_aminoacid_sequence.py +137 -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 +52 -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_cleave_and_digest.rb +3 -1
- data/lib/bioroebe/requires/require_the_bioroebe_project.rb +3 -1
- data/lib/bioroebe/sequence/alignment.rb +14 -4
- data/lib/bioroebe/sequence/dna.rb +1 -0
- data/lib/bioroebe/sequence/nucleotide_module/nucleotide_module.rb +28 -25
- data/lib/bioroebe/sequence/protein.rb +105 -3
- data/lib/bioroebe/sequence/rna.rb +220 -0
- data/lib/bioroebe/sequence/sequence.rb +128 -40
- data/lib/bioroebe/shell/menu.rb +3815 -3696
- data/lib/bioroebe/shell/misc.rb +9019 -3133
- data/lib/bioroebe/shell/readline/readline.rb +1 -1
- data/lib/bioroebe/shell/shell.rb +1137 -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/help/helpline.rb +2 -2
- 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/digest.rb +18 -8
- 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/frequencies.rb +8 -1
- data/lib/bioroebe/toplevel_methods/misc.rb +175 -11
- data/lib/bioroebe/toplevel_methods/nucleotides.rb +118 -46
- data/lib/bioroebe/toplevel_methods/open_in_browser.rb +2 -0
- data/lib/bioroebe/toplevel_methods/palindromes.rb +75 -47
- data/lib/bioroebe/toplevel_methods/taxonomy.rb +3 -3
- 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/compacter.rb +251 -0
- data/lib/bioroebe/utility_scripts/compseq/compseq.rb +1 -9
- data/lib/bioroebe/utility_scripts/consensus_sequence.rb +6 -6
- 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/parse_taxonomy.rb +2 -2
- data/lib/bioroebe/utility_scripts/permutations.rb +36 -9
- 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 +121 -58
- data/lib/bioroebe/www/sinatra/sinatra.rb +186 -71
- data/lib/bioroebe/yaml/aminoacids/amino_acids_long_name_to_one_letter.yml +2 -2
- data/lib/bioroebe/yaml/aminoacids/weight_of_common_proteins.yml +17 -17
- data/lib/bioroebe/yaml/configuration/browser.yml +1 -1
- data/lib/bioroebe/yaml/configuration/temp_dir.yml +1 -1
- data/lib/bioroebe/yaml/consensus_sequences/consensus_sequences.yml +1 -0
- data/lib/bioroebe/yaml/genomes/README.md +3 -4
- data/lib/bioroebe/yaml/nucleotides/nucleotides.yml +5 -0
- data/lib/bioroebe/yaml/restriction_enzymes/restriction_enzymes.yml +57 -57
- data/spec/README.md +6 -0
- data/spec/project_wide_specification/classes.md +5 -0
- metadata +107 -70
- 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/AllInOne.class +0 -0
- data/lib/bioroebe/java/bioroebe/Cat.class +0 -0
- data/lib/bioroebe/java/bioroebe/Codons.java +0 -22
- data/lib/bioroebe/java/bioroebe/IsPalindrome.class +0 -0
- data/lib/bioroebe/java/bioroebe/PartnerNucleotide.class +0 -0
- data/lib/bioroebe/java/bioroebe/PartnerNucleotide.java +0 -19
- data/lib/bioroebe/java/bioroebe/SanitizeNucleotideSequence.class +0 -0
- data/lib/bioroebe/java/bioroebe/ToplevelMethods.class +0 -0
- 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
- data/lib/bioroebe/utility_scripts/compacter.rb +0 -131
- /data/lib/bioroebe/java/bioroebe/{BisulfiteTreatment.java → src/BisulfiteTreatment.java} +0 -0
- /data/lib/bioroebe/java/bioroebe/{RemoveFile.class → src/RemoveFile.class} +0 -0
@@ -23,15 +23,8 @@ class AminoacidComposition < ::Gtk::Box # === Bioroebe::GUI::Gtk::AminoacidCompo
|
|
23
23
|
require 'gtk_paradise/requires/require_the_base_module.rb'
|
24
24
|
include ::Gtk::BaseModule
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
# ========================================================================= #
|
29
|
-
NAMESPACE = inspect
|
30
|
-
|
31
|
-
# ========================================================================= #
|
32
|
-
# === TITLE
|
33
|
-
# ========================================================================= #
|
34
|
-
TITLE = 'Aminoacid Composition'
|
26
|
+
require 'bioroebe/gui/shared_code/aminoacid_composition/aminoacid_composition_module.rb'
|
27
|
+
include Bioroebe::GUI::AminoacidCompositionModule
|
35
28
|
|
36
29
|
# ========================================================================= #
|
37
30
|
# === WIDTH
|
@@ -53,11 +46,6 @@ class AminoacidComposition < ::Gtk::Box # === Bioroebe::GUI::Gtk::AminoacidCompo
|
|
53
46
|
# ========================================================================= #
|
54
47
|
USE_THIS_SLIGHTLY_SMALLER_FONT = :dejavu_condensed_16
|
55
48
|
|
56
|
-
# ========================================================================= #
|
57
|
-
# === FILE_MOLECULAR_WEIGHT
|
58
|
-
# ========================================================================= #
|
59
|
-
FILE_MOLECULAR_WEIGHT = Bioroebe.file_molecular_weight
|
60
|
-
|
61
49
|
# ========================================================================= #
|
62
50
|
# === initialize
|
63
51
|
# ========================================================================= #
|
@@ -78,10 +66,11 @@ class AminoacidComposition < ::Gtk::Box # === Bioroebe::GUI::Gtk::AminoacidCompo
|
|
78
66
|
# ========================================================================= #
|
79
67
|
def reset
|
80
68
|
reset_the_internal_variables
|
69
|
+
infer_the_namespace
|
81
70
|
# ======================================================================= #
|
82
71
|
# === @configuration
|
83
72
|
# ======================================================================= #
|
84
|
-
@configuration = [true, __dir__,
|
73
|
+
@configuration = [true, __dir__, namespace?]
|
85
74
|
title_width_height_font(TITLE, WIDTH, HEIGHT, USE_THIS_FONT)
|
86
75
|
handle_CSS_rules
|
87
76
|
infer_the_size_automatically
|
@@ -261,28 +250,6 @@ EOF
|
|
261
250
|
minimal(header, 2)
|
262
251
|
end
|
263
252
|
|
264
|
-
# ========================================================================= #
|
265
|
-
# === calculated_weight?
|
266
|
-
#
|
267
|
-
# This method will calculate the weight.
|
268
|
-
# ========================================================================= #
|
269
|
-
def calculated_weight?(i)
|
270
|
-
dataset = YAML.load_file(FILE_MOLECULAR_WEIGHT)
|
271
|
-
weight = 0
|
272
|
-
if i.is_a?(String) and !i.empty?
|
273
|
-
chars = i.chars.sort
|
274
|
-
chars.each {|this_char|
|
275
|
-
value = dataset[this_char]
|
276
|
-
weight += value if value
|
277
|
-
}
|
278
|
-
end
|
279
|
-
# ======================================================================= #
|
280
|
-
# Must deduct water too.
|
281
|
-
# ======================================================================= #
|
282
|
-
weight -= (18.0 * (i.size - 1))
|
283
|
-
return weight.round(2)
|
284
|
-
end
|
285
|
-
|
286
253
|
# ========================================================================= #
|
287
254
|
# === update_label_cursor_position
|
288
255
|
# ========================================================================= #
|
@@ -320,26 +287,6 @@ EOF
|
|
320
287
|
'fasta/aminoacid_sequence.fasta'
|
321
288
|
end
|
322
289
|
|
323
|
-
# ========================================================================= #
|
324
|
-
# === return_widget_containing_the_toolbox_images
|
325
|
-
# ========================================================================= #
|
326
|
-
def return_widget_containing_the_toolbox_images
|
327
|
-
hbox = gtk_hbox
|
328
|
-
@event_box1 = gtk_event_box(
|
329
|
-
image_folder_visiting_symbolic
|
330
|
-
)
|
331
|
-
@event_box1.hint = 'Click on this image to create a new local '\
|
332
|
-
'.fasta file with that sequence. The location will be '\
|
333
|
-
'at: <b>'+
|
334
|
-
path_to_the_fasta_file?+
|
335
|
-
'</b>'
|
336
|
-
@event_box1.on_clicked {
|
337
|
-
do_create_a_new_fasta_file
|
338
|
-
}
|
339
|
-
hbox.minimal(@event_box1, 4)
|
340
|
-
return hbox
|
341
|
-
end
|
342
|
-
|
343
290
|
# ========================================================================= #
|
344
291
|
# === do_open_a_local_FASTA_file
|
345
292
|
# ========================================================================= #
|
@@ -410,7 +357,7 @@ EOF
|
|
410
357
|
# ======================================================================= #
|
411
358
|
# First weed out all invalid aminoacids:
|
412
359
|
# ======================================================================= #
|
413
|
-
_ =
|
360
|
+
_ = filter_away_invalid_aminoacids(_)
|
414
361
|
@entry_input_sequence.set_text(_)
|
415
362
|
fill_the_table_data_with_this_sequence(_)
|
416
363
|
@label_n_aminoacids.set_text(
|
@@ -464,10 +411,10 @@ EOF
|
|
464
411
|
@entry_input_sequence.on_enter {
|
465
412
|
simulate_enter_click
|
466
413
|
}
|
467
|
-
scrolled_window =
|
414
|
+
scrolled_window = create_scrolled_window(@treeview) { :always }
|
468
415
|
scrolled_window.width_height(300, 600)
|
469
416
|
scrolled_window.bblack1
|
470
|
-
scrolled_window.
|
417
|
+
scrolled_window.pad2px
|
471
418
|
@label_n_aminoacids = left_aligned_text
|
472
419
|
small_vbox = gtk_vbox
|
473
420
|
small_vbox.pad4px
|
@@ -487,7 +434,7 @@ EOF
|
|
487
434
|
# === create_the_treeview
|
488
435
|
# ========================================================================= #
|
489
436
|
def create_the_treeview
|
490
|
-
@treeview =
|
437
|
+
@treeview = create_tree_view(@list_store) { :clickable_headers }
|
491
438
|
@treeview.set_name('custom_treeview')
|
492
439
|
@treeview.headers('Aminoacid','n times')
|
493
440
|
@treeview.clickable_headers
|
@@ -495,6 +442,25 @@ EOF
|
|
495
442
|
@treeview.set_reorderable(true)
|
496
443
|
end
|
497
444
|
|
445
|
+
# ========================================================================= #
|
446
|
+
# === return_widget_containing_the_toolbox_images
|
447
|
+
# ========================================================================= #
|
448
|
+
def return_widget_containing_the_toolbox_images
|
449
|
+
hbox = create_hbox
|
450
|
+
@event_box1 = create_event_box(
|
451
|
+
image_folder_visiting_symbolic
|
452
|
+
)
|
453
|
+
@event_box1.hint =
|
454
|
+
"Click on this image to create a new local "\
|
455
|
+
".fasta file with that sequence.\n\nThe location will be "\
|
456
|
+
"at: <b>#{path_to_the_fasta_file?}</b>"
|
457
|
+
@event_box1.on_clicked {
|
458
|
+
do_create_a_new_fasta_file
|
459
|
+
}
|
460
|
+
hbox.minimal(@event_box1, 4)
|
461
|
+
return hbox
|
462
|
+
end
|
463
|
+
|
498
464
|
# ========================================================================= #
|
499
465
|
# === run (run tag)
|
500
466
|
# ========================================================================= #
|
@@ -185,8 +185,7 @@ class BlosumMatrixViewer < ::Gtk::Box # === Bioroebe::GUI::Gtk::BlosumMatrixView
|
|
185
185
|
_ = ::Bioroebe::GUI::Gtk::BlosumMatrixViewer.new(i)
|
186
186
|
r = ::Gtk.run
|
187
187
|
r << _
|
188
|
-
r.
|
189
|
-
r.top_left_then_run
|
188
|
+
r.automatic_top_left_then_run
|
190
189
|
end
|
191
190
|
|
192
191
|
end; end; end; end
|
data/lib/bioroebe/gui/gtk3/calculate_cell_numbers_of_bacteria/calculate_cell_numbers_of_bacteria.rb
CHANGED
@@ -93,9 +93,8 @@ class CalculateCellNumbersOfBacteria < ::Gtk::Box # === Bioroebe::GUI::Gtk::Calc
|
|
93
93
|
r = ::Gtk.run
|
94
94
|
r << _
|
95
95
|
r.background_colour :white
|
96
|
-
r.automatic_size_then_automatic_title
|
97
96
|
r.easy_exit
|
98
|
-
r.
|
97
|
+
r.automatic_top_left_then_run
|
99
98
|
end; self.instance_eval { alias run_gtk3_widget run } # === Bioroebe::GUI::Gtk::CalculateCellNumbersOfBacteria.run_gtk3_widget
|
100
99
|
self.instance_eval { alias start_gui_application run } # === Bioroebe::GUI::Gtk::CalculateCellNumbersOfBacteria.start_gui_application
|
101
100
|
|
@@ -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
|
#
|
@@ -371,10 +376,9 @@ class Controller < ::Gtk::Box # === Bioroebe::GUI::Gtk::Controller
|
|
371
376
|
_.enable_these_key_combinations(
|
372
377
|
HASH_DESIGNATED_KEY_COMBINATIONS
|
373
378
|
)
|
374
|
-
r.automatic_size_then_automatic_title
|
375
379
|
r.enable_quick_exit
|
376
380
|
r.maximize
|
377
|
-
r.
|
381
|
+
r.automatic_top_left_then_run
|
378
382
|
end
|
379
383
|
|
380
384
|
# ========================================================================= #
|
@@ -388,8 +392,21 @@ class Controller < ::Gtk::Box # === Bioroebe::GUI::Gtk::Controller
|
|
388
392
|
if @protein_to_DNA.respond_to? :do_determine_the_DNA_sequence
|
389
393
|
@protein_to_DNA.do_determine_the_DNA_sequence
|
390
394
|
end
|
395
|
+
# ======================================================================= #
|
396
|
+
# Also update the nucleotide-analyser next:
|
397
|
+
# ======================================================================= #
|
398
|
+
@nucleotide_analyser.set_dna_sequence(
|
399
|
+
main_dna_sequence?.delete(' ')
|
400
|
+
)
|
391
401
|
end
|
392
402
|
|
403
|
+
# ========================================================================= #
|
404
|
+
# === main_dna_sequence?
|
405
|
+
# ========================================================================= #
|
406
|
+
def main_dna_sequence?
|
407
|
+
@dna_to_aminoacid_widget.dna_sequence?
|
408
|
+
end; alias main_DNA_sequence? main_dna_sequence? # === main_DNA_sequence?
|
409
|
+
|
393
410
|
end; end; end
|
394
411
|
|
395
412
|
# =========================================================================== #
|
@@ -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
|
|
@@ -598,8 +624,7 @@ class DnaToAminoacidWidget < ::Gtk::Box # === Bioroebe::GUI::Gtk::DnaToAminoacid
|
|
598
624
|
_ = ::Bioroebe::GUI::Gtk::DnaToAminoacidWidget.new(i)
|
599
625
|
r = ::Gtk.run
|
600
626
|
r << _
|
601
|
-
r.
|
602
|
-
r.top_left_then_run
|
627
|
+
r.automatic_top_left_then_run
|
603
628
|
end; self.instance_eval { alias run_gtk3_widget run } # === Bioroebe::GUI::Gtk::DnaToAminoacidWidget.run_gtk3_widget
|
604
629
|
|
605
630
|
end; end; end; end
|
data/lib/bioroebe/gui/gtk3/dna_to_reverse_complement_widget/dna_to_reverse_complement_widget.rb
CHANGED
@@ -177,9 +177,8 @@ class DnaToReverseComplementWidget < ::Gtk::Box # === Bioroebe::GUI::Gtk::DnaToR
|
|
177
177
|
_ = ::Bioroebe::GUI::Gtk::DnaToReverseComplementWidget.new(i)
|
178
178
|
r = ::Gtk.run
|
179
179
|
r << _
|
180
|
-
r.automatic_size_then_automatic_title
|
181
180
|
r.enable_quick_exit
|
182
|
-
r.
|
181
|
+
r.automatic_top_left_then_run
|
183
182
|
end; self.instance_eval { alias run_gtk3_widget run } # === Bioroebe::GUI::Gtk::DnaToReverseComplementWidget.run_gtk3_widget
|
184
183
|
|
185
184
|
end; end; end; end
|