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
@@ -1,289 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby -w
|
2
|
-
# Encoding: UTF-8
|
3
|
-
# frozen_string_literal: true
|
4
|
-
# =========================================================================== #
|
5
|
-
# require 'bioroebe/shell/random.rb'
|
6
|
-
# =========================================================================== #
|
7
|
-
module Bioroebe
|
8
|
-
|
9
|
-
class Shell < ::Bioroebe::CommandlineApplication
|
10
|
-
|
11
|
-
require 'bioroebe/constants/files_and_directories.rb'
|
12
|
-
|
13
|
-
# ========================================================================= #
|
14
|
-
# === random (random tag, rand tag)
|
15
|
-
#
|
16
|
-
# This will generate a random DNA sequence or a random aminoacid
|
17
|
-
# sequence.
|
18
|
-
#
|
19
|
-
# The first argument tells us how many nucleotides or amino acids
|
20
|
-
# should be part of that sequence.
|
21
|
-
#
|
22
|
-
# If a second argument was given, we will generate AA. Otherwise we
|
23
|
-
# will generate DNA (which is the default).
|
24
|
-
#
|
25
|
-
# Usage examples:
|
26
|
-
#
|
27
|
-
# random dna
|
28
|
-
# random dna 20
|
29
|
-
# random 2552
|
30
|
-
# random 2552 aa
|
31
|
-
#
|
32
|
-
# ========================================================================= #
|
33
|
-
def random(
|
34
|
-
n_elements = default_length?,
|
35
|
-
dna_or_amino_acid = :dna,
|
36
|
-
do_report_the_sequence = false
|
37
|
-
)
|
38
|
-
# ====================================================================== #
|
39
|
-
# === First handle Arrays
|
40
|
-
# ====================================================================== #
|
41
|
-
if dna_or_amino_acid.is_a? Array
|
42
|
-
dna_or_amino_acid = dna_or_amino_acid.first
|
43
|
-
end
|
44
|
-
case n_elements.to_s
|
45
|
-
# ====================================================================== #
|
46
|
-
# === aminoacids
|
47
|
-
# ====================================================================== #
|
48
|
-
when 'aminoacids',
|
49
|
-
/^aa$/i
|
50
|
-
five_steps_array = [] # An array from 5 to 50, in 5 steps.
|
51
|
-
5.step(50, 5) { |entry| five_steps_array << entry }
|
52
|
-
n_elements = 200+five_steps_array.sample
|
53
|
-
dna_or_amino_acid = :aminoacids
|
54
|
-
# ====================================================================== #
|
55
|
-
# === do_not_show_the_string
|
56
|
-
# ====================================================================== #
|
57
|
-
when 'do_not_show_the_string'
|
58
|
-
dna_or_amino_acid = :dna
|
59
|
-
n_elements = default_length?
|
60
|
-
do_report_the_sequence = false
|
61
|
-
# ====================================================================== #
|
62
|
-
# === dna
|
63
|
-
# ====================================================================== #
|
64
|
-
when 'dna','' # This also handles nil.
|
65
|
-
n_elements = default_length?
|
66
|
-
if only_numbers?(dna_or_amino_acid)
|
67
|
-
n_elements = dna_or_amino_acid.to_i
|
68
|
-
end
|
69
|
-
dna_or_amino_acid = :dna
|
70
|
-
# ====================================================================== #
|
71
|
-
# === nil
|
72
|
-
# ====================================================================== #
|
73
|
-
when nil
|
74
|
-
n_elements = default_length? # defaults to 1000.
|
75
|
-
end
|
76
|
-
# ====================================================================== #
|
77
|
-
# If input has NOT only numbers alone:
|
78
|
-
# ====================================================================== #
|
79
|
-
if n_elements.to_s !~ /^\d+$/
|
80
|
-
n_elements = default_length?
|
81
|
-
end
|
82
|
-
dna_or_amino_acid = dna_or_amino_acid.to_s
|
83
|
-
# ====================================================================== #
|
84
|
-
# === Handle DNA or amino acid as input next
|
85
|
-
# ====================================================================== #
|
86
|
-
case dna_or_amino_acid
|
87
|
-
# ====================================================================== #
|
88
|
-
# === dna
|
89
|
-
# ====================================================================== #
|
90
|
-
when 'dna',
|
91
|
-
'd',
|
92
|
-
'default',
|
93
|
-
''
|
94
|
-
# '' is also the default for this.
|
95
|
-
erev 'Generating some DNA of length '+
|
96
|
-
simp(n_elements.to_s)+rev+'.'
|
97
|
-
if seq_object?.type?.nil?
|
98
|
-
seq_object?.is_DNA_now
|
99
|
-
require 'bioroebe/sequence/nucleotide_module/nucleotide_module.rb'
|
100
|
-
seq_object?.extend(Bioroebe::NucleotideModule)
|
101
|
-
else
|
102
|
-
unless seq_object?.respond_to? :n_random_dna
|
103
|
-
require 'bioroebe/sequence/nucleotide_module/nucleotide_module.rb'
|
104
|
-
seq_object?.extend(Bioroebe::NucleotideModule)
|
105
|
-
end
|
106
|
-
end
|
107
|
-
sequence = seq_object?.n_random_dna(n_elements)
|
108
|
-
set_dna_sequence(sequence)
|
109
|
-
# ====================================================================== #
|
110
|
-
# === aminoacids
|
111
|
-
# ====================================================================== #
|
112
|
-
when 'aminoacids',
|
113
|
-
'aminoacid',
|
114
|
-
'aa'
|
115
|
-
e 'Generating some ('+sfancy(n_elements.to_s)+rev+') AminoAcids next.'
|
116
|
-
_ = set_aminoacids(:generate, n_elements, :be_silent) # We are silent here because we report lateron anyway.
|
117
|
-
output = _
|
118
|
-
end
|
119
|
-
# ======================================================================= #
|
120
|
-
# Next, show this string if we also wish to report the sequence.
|
121
|
-
# ======================================================================= #
|
122
|
-
show_string(output) if do_report_the_sequence
|
123
|
-
return _ # Last but not least, return it.
|
124
|
-
end
|
125
|
-
|
126
|
-
# ========================================================================= #
|
127
|
-
# === generate_random_dna_sequence_with_variable_length_and_variable_composition
|
128
|
-
#
|
129
|
-
# This method will generate a random DNA sequence of variable
|
130
|
-
# length and composition.
|
131
|
-
# ========================================================================= #
|
132
|
-
def generate_random_dna_sequence_with_variable_length_and_variable_composition
|
133
|
-
e 'Input the desired length of your DNA string:'
|
134
|
-
length = $stdin.gets.chomp.to_i
|
135
|
-
e 'Input the percentage of Adenine, Thymin, Cytosine and Guanosine. You can'
|
136
|
-
e 'omit this, in which case we will default to 25% each.'
|
137
|
-
e 'Use a / as delimiter please, as in '+
|
138
|
-
orange('30 / 30 / 20 / 20')+rev+'.'
|
139
|
-
e
|
140
|
-
print 'Adenine / Thymin / Cytosine / Guanosine: '
|
141
|
-
composition = $stdin.gets.chomp
|
142
|
-
if composition.include? '/'
|
143
|
-
splitted = composition.split('/').
|
144
|
-
map(&:strip).map(&:to_f)
|
145
|
-
else
|
146
|
-
splitted = [25,25,25,25]
|
147
|
-
end
|
148
|
-
# ======================================================================= #
|
149
|
-
# Next, we fill in our pool of nucleotides.
|
150
|
-
# ======================================================================= #
|
151
|
-
pool_of_nucleotides = []
|
152
|
-
# ======================================================================= #
|
153
|
-
# Next, we must determine how many we will use. The percentage value
|
154
|
-
# tells us this.
|
155
|
-
# The entries are e. g. 35%. So we first must calculate how much is
|
156
|
-
# 1%, then we multiply this.
|
157
|
-
# ======================================================================= #
|
158
|
-
n_A = (length.to_f / 100) * splitted[0].to_f
|
159
|
-
n_T = (length.to_f / 100) * splitted[1].to_f
|
160
|
-
n_C = (length.to_f / 100) * splitted[2].to_f
|
161
|
-
n_G = (length.to_f / 100) * splitted[3].to_f
|
162
|
-
pool_of_nucleotides << (['A'] * n_A)
|
163
|
-
pool_of_nucleotides << (['T'] * n_T)
|
164
|
-
pool_of_nucleotides << (['C'] * n_C)
|
165
|
-
pool_of_nucleotides << (['G'] * n_G)
|
166
|
-
pool_of_nucleotides.flatten!
|
167
|
-
_ = ''.dup # This is the return string.
|
168
|
-
_ << pool_of_nucleotides.shuffle.join
|
169
|
-
return _
|
170
|
-
end
|
171
|
-
|
172
|
-
# ========================================================================= #
|
173
|
-
# === return_random_nucleotide
|
174
|
-
#
|
175
|
-
# Here we return a random nucleotide.
|
176
|
-
# ========================================================================= #
|
177
|
-
def return_random_nucleotide
|
178
|
-
Bioroebe.return_random_nucleotide
|
179
|
-
end; alias add_nucleotide return_random_nucleotide # === add_nucleotide
|
180
|
-
|
181
|
-
# ========================================================================= #
|
182
|
-
# === random_dna_sequence
|
183
|
-
#
|
184
|
-
# Generate a random DNA sequence. Note that this will return a String -
|
185
|
-
# if you wish to put this onto a Sequence object then you have to
|
186
|
-
# handle this situation on your own.
|
187
|
-
#
|
188
|
-
# The argument shall be how many DNA nucleotides you want to have.
|
189
|
-
# ========================================================================= #
|
190
|
-
def random_dna_sequence(
|
191
|
-
length = 250
|
192
|
-
)
|
193
|
-
::Bioroebe.generate_random_dna_sequence(length)
|
194
|
-
end
|
195
|
-
|
196
|
-
# ========================================================================= #
|
197
|
-
# === random_insert
|
198
|
-
#
|
199
|
-
# Use this method to do a random insert into your main DNA sequence.
|
200
|
-
#
|
201
|
-
# The input should be a nucleotide sequence such as ATGCCA, but it can
|
202
|
-
# also be a number - see the examples below for that.
|
203
|
-
#
|
204
|
-
# Note that this method will insert the given input into ONE random
|
205
|
-
# position of our main sequence.
|
206
|
-
#
|
207
|
-
# To use this, try:
|
208
|
-
#
|
209
|
-
# random 15; rinsert ATTGGGCCC
|
210
|
-
# random 15; rinsert 5
|
211
|
-
# random 15; rinsert 15
|
212
|
-
#
|
213
|
-
# ========================================================================= #
|
214
|
-
def random_insert(i)
|
215
|
-
i = i.join if i.is_a? Array
|
216
|
-
i.delete!(' ')
|
217
|
-
if i =~ /\d+$/ # If it has at the least one number.
|
218
|
-
_ = ''
|
219
|
-
i.to_i.times { _ << return_random_nucleotide }
|
220
|
-
e "The #{simp(i.to_i.to_s)}#{rev} nucleotides to be added "\
|
221
|
-
"will be `#{sfancy(_)}#{rev}`."
|
222
|
-
i = _
|
223
|
-
end
|
224
|
-
# ======================================================================= #
|
225
|
-
# We need to determine the insert position. The insert_position can
|
226
|
-
# be 0 zoo.
|
227
|
-
# ======================================================================= #
|
228
|
-
insert_position = rand(sequence?.size)
|
229
|
-
n_nucleotides = i.size.to_s
|
230
|
-
e 'Inserting '+sfancy(n_nucleotides.to_s)+rev+' nucleotides at '\
|
231
|
-
'nucleotide position '+simp(insert_position.to_s)+rev+'.'
|
232
|
-
old_size = @sequence.size
|
233
|
-
@sequence[insert_position+1, 0] = i
|
234
|
-
e 'The old size was '+sfancy(old_size.to_s)+rev+'. The new '\
|
235
|
-
'size is '+sfancy(@sequence.size.to_s)+rev+'.'
|
236
|
-
end
|
237
|
-
|
238
|
-
# ========================================================================= #
|
239
|
-
# === create_n_random_amino_acids
|
240
|
-
# ========================================================================= #
|
241
|
-
def create_n_random_amino_acids(n = 1000)
|
242
|
-
set_aminoacids :random, n, :be_verbose
|
243
|
-
end
|
244
|
-
|
245
|
-
# ========================================================================= #
|
246
|
-
# === set_aminoacids
|
247
|
-
#
|
248
|
-
# Simply delegate to set_aminoacids.
|
249
|
-
# ========================================================================= #
|
250
|
-
def set_random_aminoacids
|
251
|
-
set_aminoacids :random
|
252
|
-
end
|
253
|
-
|
254
|
-
# ========================================================================= #
|
255
|
-
# === generate_random_protein_sequence_with_variable_length_and_variable_composition
|
256
|
-
#
|
257
|
-
# Use this method to generate a random protein sequence with variable
|
258
|
-
# length and variable composition.
|
259
|
-
# ========================================================================= #
|
260
|
-
def generate_random_protein_sequence_with_variable_length_and_variable_composition
|
261
|
-
_ = {} # This is our hash.
|
262
|
-
e 'You can generate a random protein sequence next. First, input the'
|
263
|
-
print 'target length of the protein in question: '
|
264
|
-
length = $stdin.gets.chomp.to_i
|
265
|
-
e
|
266
|
-
e 'Next, you have to input the percentage for the respective amino '\
|
267
|
-
'acids, separated via the token '+orange('/')+rev+'.'
|
268
|
-
e
|
269
|
-
e 'This can be quite tedious though. Unfortunately, there is not a'
|
270
|
-
e 'much simpler way possible on the commandline, so here we go:'
|
271
|
-
e
|
272
|
-
print 'Glycine Alanine Valine: '
|
273
|
-
glycine_alanine_valine = $stdin.gets.chomp
|
274
|
-
glycine, alanine, valine = glycine_alanine_valine.split('/').map(&:strip)
|
275
|
-
_['glycine'] = glycine
|
276
|
-
_['alanine'] = alanine
|
277
|
-
_['valine'] = valine
|
278
|
-
e 'The length of the target protein is '+simp(length.to_s)+'.'
|
279
|
-
e swarn('!!! THE ABOVE CODE ^^^ IS UNFINISHED !!!!!')+rev
|
280
|
-
end
|
281
|
-
|
282
|
-
# ========================================================================= #
|
283
|
-
# === return_random_aminoacid
|
284
|
-
# ========================================================================= #
|
285
|
-
def return_random_aminoacid
|
286
|
-
Bioroebe.return_random_aminoacid
|
287
|
-
end
|
288
|
-
|
289
|
-
end; end
|
data/lib/bioroebe/shell/reset.rb
DELETED
@@ -1,335 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby -w
|
2
|
-
# Encoding: UTF-8
|
3
|
-
# frozen_string_literal: true
|
4
|
-
# =========================================================================== #
|
5
|
-
# require 'bioroebe/shell/reset.rb'
|
6
|
-
# =========================================================================== #
|
7
|
-
module Bioroebe
|
8
|
-
|
9
|
-
class Shell < ::Bioroebe::CommandlineApplication
|
10
|
-
|
11
|
-
require 'bioroebe/raw_sequence/raw_sequence.rb'
|
12
|
-
require 'bioroebe/nucleotides/show_nucleotide_sequence.rb'
|
13
|
-
|
14
|
-
# ========================================================================= #
|
15
|
-
# === reset (reset tag)
|
16
|
-
# ========================================================================= #
|
17
|
-
def reset(
|
18
|
-
be_verbose = true
|
19
|
-
)
|
20
|
-
super()
|
21
|
-
# ======================================================================= #
|
22
|
-
# First we try to enable the configuration.
|
23
|
-
# ======================================================================= #
|
24
|
-
enable_configuration
|
25
|
-
reset_to_initial_state(be_verbose)
|
26
|
-
set_default_length # Set the default length of 1000 here.
|
27
|
-
# ======================================================================= #
|
28
|
-
# Make sure that the base directories exist.
|
29
|
-
# ======================================================================= #
|
30
|
-
ensure_that_the_base_directories_exist
|
31
|
-
if defined? DEFAULT_DNA_INPUT_YAML_FILE # Main DNA string.
|
32
|
-
set_string(DEFAULT_DNA_INPUT_YAML_FILE)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
require 'bioroebe/sequence/sequence.rb'
|
37
|
-
# ========================================================================= #
|
38
|
-
# === initialize_main_sequence
|
39
|
-
#
|
40
|
-
# Initialize a Sequence-object on startup. We use the length 150
|
41
|
-
# for now.
|
42
|
-
# ========================================================================= #
|
43
|
-
def initialize_main_sequence
|
44
|
-
@internal_hash[:array_dna_sequence] << Bioroebe::Sequence.new(250)
|
45
|
-
end; alias reset_string initialize_main_sequence # === reset_string
|
46
|
-
|
47
|
-
# ========================================================================= #
|
48
|
-
# === reset_to_initial_state
|
49
|
-
# ========================================================================= #
|
50
|
-
def reset_to_initial_state(
|
51
|
-
be_verbose = true
|
52
|
-
)
|
53
|
-
# ======================================================================= #
|
54
|
-
# === @internal_hash
|
55
|
-
#
|
56
|
-
# The internal Hash can be used to store internal behaviour variables
|
57
|
-
# rather than spawn so many different instance variables.
|
58
|
-
#
|
59
|
-
# It should be defined very early in this method.
|
60
|
-
# ======================================================================= #
|
61
|
-
@internal_hash = {}
|
62
|
-
# ======================================================================= #
|
63
|
-
# === :first_argument
|
64
|
-
#
|
65
|
-
# This variable refers to the first argument passed into a method,
|
66
|
-
# from the menu.rb file.
|
67
|
-
# ======================================================================= #
|
68
|
-
@internal_hash[:first_argument] = nil
|
69
|
-
# ======================================================================= #
|
70
|
-
# === :show_nucleotide_sequence
|
71
|
-
# ======================================================================= #
|
72
|
-
@internal_hash[:show_nucleotide_sequence] = ::Bioroebe::ShowNucleotideSequence.new(
|
73
|
-
'', :do_not_run_yet
|
74
|
-
)
|
75
|
-
# ======================================================================= #
|
76
|
-
# === :array_aminoacid_sequence
|
77
|
-
#
|
78
|
-
# This variable should be an empty Array, aka [], initially, so that we
|
79
|
-
# can distinguish the case when the user has added data onto that
|
80
|
-
# Array.
|
81
|
-
# ======================================================================= #
|
82
|
-
@internal_hash[:array_aminoacid_sequence] = []
|
83
|
-
# ======================================================================= #
|
84
|
-
# === :array_rna_sequence
|
85
|
-
#
|
86
|
-
# This can be populated with sequence objects such as:
|
87
|
-
#
|
88
|
-
# Bioroebe::Sequence.new(''.dup, :rna)
|
89
|
-
#
|
90
|
-
# ======================================================================= #
|
91
|
-
@internal_hash[:array_rna_sequence] = []
|
92
|
-
# ======================================================================= #
|
93
|
-
# === :array_dna_sequence
|
94
|
-
# ======================================================================= #
|
95
|
-
@internal_hash[:array_dna_sequence] = []
|
96
|
-
# ======================================================================= #
|
97
|
-
# === @use_working_directory_as_prompt
|
98
|
-
# ======================================================================= #
|
99
|
-
@internal_hash[:use_working_directory_as_prompt] = false
|
100
|
-
# ======================================================================= #
|
101
|
-
# === @debug
|
102
|
-
#
|
103
|
-
# Determine whether we will debug or whether we will not
|
104
|
-
# ======================================================================= #
|
105
|
-
@internal_hash[:debug] = SHALL_WE_DEBUG
|
106
|
-
# ======================================================================= #
|
107
|
-
# === @array_sequences
|
108
|
-
# ======================================================================= #
|
109
|
-
@internal_hash[:array_sequences] = []
|
110
|
-
# ======================================================================= #
|
111
|
-
# === @all_arguments
|
112
|
-
# ======================================================================= #
|
113
|
-
@internal_hash[:all_arguments] = []
|
114
|
-
# ======================================================================= #
|
115
|
-
# === :remaining_arguments
|
116
|
-
# ======================================================================= #
|
117
|
-
@internal_hash[:remaining_arguments] = []
|
118
|
-
# ======================================================================= #
|
119
|
-
# === :registered_actions
|
120
|
-
# ======================================================================= #
|
121
|
-
@internal_hash[:registered_actions] = ARRAY_REGISTERED_ACTIONS
|
122
|
-
# ======================================================================= #
|
123
|
-
# === :the_main_sequence_is_frozen
|
124
|
-
# ======================================================================= #
|
125
|
-
@internal_hash[:the_main_sequence_is_frozen] = false
|
126
|
-
# ======================================================================= #
|
127
|
-
# === :file_dna_string_saved
|
128
|
-
#
|
129
|
-
# Where to store our DNA string by default.
|
130
|
-
# ======================================================================= #
|
131
|
-
@internal_hash[:file_dna_string_saved] = "#{log_dir?}dna_string_saved.yml"
|
132
|
-
# ======================================================================= #
|
133
|
-
# === :array_jumper_directories
|
134
|
-
# ======================================================================= #
|
135
|
-
@internal_hash[:array_jumper_directories] = []
|
136
|
-
# ======================================================================= #
|
137
|
-
# === :array_fasta
|
138
|
-
# ======================================================================= #
|
139
|
-
@internal_hash[:array_fasta] = []
|
140
|
-
# ======================================================================= #
|
141
|
-
# === :raw_sequence
|
142
|
-
# ======================================================================= #
|
143
|
-
@internal_hash[:raw_sequence] = Bioroebe::RawSequence.new
|
144
|
-
# ======================================================================= #
|
145
|
-
# === :use_xsel
|
146
|
-
#
|
147
|
-
# This method will determine whether we will use the external
|
148
|
-
# program "xsel". By default, at the least on my home system,
|
149
|
-
# I prefer to make use of xsel.
|
150
|
-
# ======================================================================= #
|
151
|
-
@internal_hash[:use_xsel] = true
|
152
|
-
# ======================================================================= #
|
153
|
-
# === :silent_startup
|
154
|
-
#
|
155
|
-
# This variable keeps track as to whether we will display a welcome
|
156
|
-
# message on startup or whether we will not.
|
157
|
-
# ======================================================================= #
|
158
|
-
@internal_hash[:silent_startup] = false
|
159
|
-
# ======================================================================= #
|
160
|
-
# === exit_the_shell_how
|
161
|
-
#
|
162
|
-
# The next variable has two valid modes:
|
163
|
-
#
|
164
|
-
# :instantly
|
165
|
-
# :exit_gracefully
|
166
|
-
#
|
167
|
-
# The first is the default; the second can be used if the Bioshell
|
168
|
-
# is embedded into another program.
|
169
|
-
# ======================================================================= #
|
170
|
-
@internal_hash[:exit_the_shell_how] = :instantly
|
171
|
-
# ======================================================================= #
|
172
|
-
# === search_for
|
173
|
-
#
|
174
|
-
# This is the sequence we wish to find, in a given nucleotide sequence.
|
175
|
-
# By default this will be nil.
|
176
|
-
# ======================================================================= #
|
177
|
-
@internal_hash[:search_for] = nil
|
178
|
-
# ======================================================================= #
|
179
|
-
# === analyse_the_local_dataset_on_startup
|
180
|
-
#
|
181
|
-
# If this setting is set to true then, on startup, the bioshell
|
182
|
-
# will report some information about the local dataset (FASTA
|
183
|
-
# files and pdb files).
|
184
|
-
# ======================================================================= #
|
185
|
-
@internal_hash[:analyse_the_local_dataset_on_startup] = true
|
186
|
-
# ======================================================================= #
|
187
|
-
# === user_input
|
188
|
-
# ======================================================================= #
|
189
|
-
@internal_hash[:user_input] = nil
|
190
|
-
# ======================================================================= #
|
191
|
-
# === array_history
|
192
|
-
#
|
193
|
-
# This array will keep track of the input-history, aka the commands
|
194
|
-
# that the user has used.
|
195
|
-
# ======================================================================= #
|
196
|
-
@internal_hash[:array_history] = []
|
197
|
-
# ======================================================================= #
|
198
|
-
# === remove_last_character_if_it_is_a_question_mark
|
199
|
-
#
|
200
|
-
# If this variable is set to true then we will remove the last
|
201
|
-
# input character - at the least if it is a '?'.
|
202
|
-
# ======================================================================= #
|
203
|
-
@internal_hash[:remove_last_character_if_it_is_a_question_mark] = false
|
204
|
-
# ======================================================================= #
|
205
|
-
# === prompt_to_use
|
206
|
-
#
|
207
|
-
# This variable keeps track as to which prompt is to be used.
|
208
|
-
# ======================================================================= #
|
209
|
-
@internal_hash[:prompt_to_use] = :default
|
210
|
-
# ======================================================================= #
|
211
|
-
# === use_xsel
|
212
|
-
# ======================================================================= #
|
213
|
-
@internal_hash[:use_xsel] = false
|
214
|
-
# ======================================================================= #
|
215
|
-
# === search_for
|
216
|
-
# ======================================================================= #
|
217
|
-
@internal_hash[:search_for] = nil
|
218
|
-
# ======================================================================= #
|
219
|
-
# === coding_area
|
220
|
-
# ======================================================================= #
|
221
|
-
@internal_hash[:coding_area] = nil # This can keep track of the real coding area.
|
222
|
-
# ======================================================================= #
|
223
|
-
# === misc_sequence
|
224
|
-
# ======================================================================= #
|
225
|
-
@internal_hash[:misc_sequence] = nil # This can store a misc DNA or RNA sequence.
|
226
|
-
# ======================================================================= #
|
227
|
-
# === fasta_file
|
228
|
-
#
|
229
|
-
# This used to be a standalone @hash variable, but during the
|
230
|
-
# rewrite in April 2020 this was integrated into @internal_hash.
|
231
|
-
# ======================================================================= #
|
232
|
-
@internal_hash[:fasta_file] = {}
|
233
|
-
# ======================================================================= #
|
234
|
-
# === @array_all_downloads
|
235
|
-
# ======================================================================= #
|
236
|
-
@internal_hash[:array_all_downloads] = [] # Must be an Array.
|
237
|
-
# ======================================================================= #
|
238
|
-
# === @use_working_directory_as_prompt
|
239
|
-
# ======================================================================= #
|
240
|
-
@internal_hash[:use_working_directory_as_prompt] = true
|
241
|
-
# ======================================================================= #
|
242
|
-
# === @mode
|
243
|
-
#
|
244
|
-
# @mode can be either :dna or :rna or :aminoacid
|
245
|
-
# ======================================================================= #
|
246
|
-
@internal_hash[:mode] = :dna
|
247
|
-
# ======================================================================= #
|
248
|
-
# === @array_these_sequences_were_chopped_away
|
249
|
-
#
|
250
|
-
# Keep an Array that can be used to keep track of which sequences
|
251
|
-
# were chopped away. Whenever we perform a chop-related action we
|
252
|
-
# will store that sequence in an Array.
|
253
|
-
# ======================================================================= #
|
254
|
-
@internal_hash[:array_these_sequences_were_chopped_away] = []
|
255
|
-
# ======================================================================= #
|
256
|
-
# === @save_file
|
257
|
-
# ======================================================================= #
|
258
|
-
@internal_hash[:save_file] = BIOSHELL_SAVE_FILE
|
259
|
-
# ======================================================================= #
|
260
|
-
# === create_directories_on_startup_of_the_shell
|
261
|
-
#
|
262
|
-
# If this variable is set to true then the bio-shell will create
|
263
|
-
# some directories on startup. The user can modify this from
|
264
|
-
# the commandline, though, and specifically disable it.
|
265
|
-
# ======================================================================= #
|
266
|
-
@internal_hash[:create_directories_on_startup_of_the_shell] = true
|
267
|
-
# ======================================================================= #
|
268
|
-
# === show_the_leader
|
269
|
-
# ======================================================================= #
|
270
|
-
@internal_hash[:show_the_leader] = true # Show the 5' leader.
|
271
|
-
# ======================================================================= #
|
272
|
-
# === show_the_trailer
|
273
|
-
# ======================================================================= #
|
274
|
-
@internal_hash[:show_the_trailer] = true # Show the 3' trailer.
|
275
|
-
# ======================================================================= #
|
276
|
-
# === array_timer_snapshots
|
277
|
-
# ======================================================================= #
|
278
|
-
@internal_hash[:array_timer_snapshots] = [] # This Array keeps track of the time.
|
279
|
-
# ======================================================================= #
|
280
|
-
# === may_we_show_the_startup_information
|
281
|
-
#
|
282
|
-
# This variable determines whether the startup-information may be
|
283
|
-
# shown, on start-up of the bioshell. By default this will be true
|
284
|
-
# typically, but a config-variable may overrule this.
|
285
|
-
# ======================================================================= #
|
286
|
-
@internal_hash[:may_we_show_the_startup_information] = true
|
287
|
-
if @config and @config.respond_to? :may_we_show_the_startup_information
|
288
|
-
@internal_hash[:may_we_show_the_startup_information] = @config.may_we_show_the_startup_information
|
289
|
-
end
|
290
|
-
# ======================================================================= #
|
291
|
-
# === @use_colours
|
292
|
-
#
|
293
|
-
# Let's enable the colours.
|
294
|
-
# ======================================================================= #
|
295
|
-
enable_colours(:be_quiet)
|
296
|
-
initialize_clipboard
|
297
|
-
# ======================================================================= #
|
298
|
-
# === @sequence
|
299
|
-
#
|
300
|
-
# We set @sequence to a new instance of Bioroebe::Sequence next.
|
301
|
-
# ======================================================================= #
|
302
|
-
initialize_main_sequence
|
303
|
-
# ======================================================================= #
|
304
|
-
# === Setting towards a default padding
|
305
|
-
#
|
306
|
-
# Next comes left-padding, defaulting to ' '. This should come after
|
307
|
-
# the clipboard has been initialized, and after @internal_hash has
|
308
|
-
# been populated.
|
309
|
-
# ======================================================================= #
|
310
|
-
set_padding :default
|
311
|
-
set_sequence_2
|
312
|
-
set_sequence_3
|
313
|
-
set_sequence_4
|
314
|
-
set_sequence_5
|
315
|
-
set_sequence_6
|
316
|
-
::Bioroebe.clear_array_colourize_this_aminoacid
|
317
|
-
# ======================================================================= #
|
318
|
-
# === Determine whether silent startup is active
|
319
|
-
#
|
320
|
-
# Next, determine whether we will show a small startup-message or
|
321
|
-
# whether we shall not show it. By default this should be false -
|
322
|
-
# but if a file called 'use_silent_startup.yml' exists then we
|
323
|
-
# will use that file.
|
324
|
-
# ======================================================================= #
|
325
|
-
if File.exist? FILE_USE_SILENT_STARTUP
|
326
|
-
dataset = YAML.load_file(FILE_USE_SILENT_STARTUP)
|
327
|
-
if dataset.is_a?(Hash) and dataset.has_key?('use_silent_startup')
|
328
|
-
@internal_hash[:silent_startup] = dataset['use_silent_startup']
|
329
|
-
end
|
330
|
-
else # else it is
|
331
|
-
@internal_hash[:silent_startup] = false
|
332
|
-
end
|
333
|
-
end
|
334
|
-
|
335
|
-
end; end
|