bioroebe 0.10.80 → 0.12.24
Sign up to get free protection for your applications and to get access to all the features.
- 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,135 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby -w
|
2
|
-
# Encoding: UTF-8
|
3
|
-
# frozen_string_literal: true
|
4
|
-
# =========================================================================== #
|
5
|
-
# require 'bioroebe/shell/scan_and_parse.rb'
|
6
|
-
# =========================================================================== #
|
7
|
-
module Bioroebe
|
8
|
-
|
9
|
-
class Shell < ::Bioroebe::CommandlineApplication
|
10
|
-
|
11
|
-
# ========================================================================= #
|
12
|
-
# === parse (parse tag)
|
13
|
-
# ========================================================================= #
|
14
|
-
def parse(i)
|
15
|
-
if i.is_a? Array
|
16
|
-
i = i.join(' ').strip
|
17
|
-
end
|
18
|
-
i = i.dup if i.frozen?
|
19
|
-
i.chop! if i.end_with?('.')
|
20
|
-
# ======================================================================= #
|
21
|
-
# We will parse here based on the file-suffix.
|
22
|
-
# ======================================================================= #
|
23
|
-
case i
|
24
|
-
# ======================================================================= #
|
25
|
-
# === fasta file
|
26
|
-
# ======================================================================= #
|
27
|
-
when /\.fasta$/i,
|
28
|
-
/\.fa$/i
|
29
|
-
parse_fasta_format(i)
|
30
|
-
unless array_fasta?.empty?
|
31
|
-
# =================================================================== #
|
32
|
-
# Assign this dataset next to become the new main sequence.
|
33
|
-
# =================================================================== #
|
34
|
-
opnn; erev "We will now assign this data to #{sfancy('@_')}#{rev}."
|
35
|
-
set_mode :protein if array_fasta?.last.is_protein?
|
36
|
-
assign(array_fasta?.last.sequence)
|
37
|
-
end
|
38
|
-
# ======================================================================= #
|
39
|
-
# === pdb file
|
40
|
-
# ======================================================================= #
|
41
|
-
when /\.pdb$/i
|
42
|
-
parse_this_pdb_file(i)
|
43
|
-
else
|
44
|
-
erev "Not yet handled: #{steelblue(i)}"
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
# ========================================================================= #
|
49
|
-
# === scan_for_leucine_zippers
|
50
|
-
#
|
51
|
-
# What is a leucine zipper?
|
52
|
-
#
|
53
|
-
# https://en.wikipedia.org/wiki/Leucine_zipper
|
54
|
-
#
|
55
|
-
# ========================================================================= #
|
56
|
-
def scan_for_leucine_zippers(
|
57
|
-
i = amino_acid_sequence?
|
58
|
-
)
|
59
|
-
if i.nil?
|
60
|
-
i = amino_acid_sequence?
|
61
|
-
end
|
62
|
-
chars = i.chars
|
63
|
-
# ======================================================================= #
|
64
|
-
# We start to count at the first leucine zipper.
|
65
|
-
# ======================================================================= #
|
66
|
-
index = chars.index('L')
|
67
|
-
erev 'The string '+simp(i)+rev+' has these at every 7th step.'
|
68
|
-
print ' ' # Leading indent.
|
69
|
-
(index..chars.size).step(7) {|token|
|
70
|
-
print simp(chars[token]),' '
|
71
|
-
}; e # And a final newline.
|
72
|
-
end
|
73
|
-
|
74
|
-
# ========================================================================= #
|
75
|
-
# === parse_this_gff_file
|
76
|
-
#
|
77
|
-
# Use this method if you wish to parse a .gff or .gff3 file.
|
78
|
-
# ========================================================================= #
|
79
|
-
def parse_this_gff_file(i)
|
80
|
-
if i.is_a? Array
|
81
|
-
i.each {|entry| parse_this_gff_file(entry) }
|
82
|
-
else
|
83
|
-
::Bioroebe::Parser::GFF.new(i)
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
|
-
# ========================================================================= #
|
88
|
-
# === scan_for_gff_files
|
89
|
-
# ========================================================================= #
|
90
|
-
def scan_for_gff_files
|
91
|
-
results_for_gff_files = Dir['*.gff']
|
92
|
-
results_for_gff3_files = Dir['*.gff3']
|
93
|
-
unless results_for_gff_files.empty?
|
94
|
-
erev 'There are '+sfancy(results_for_gff_files.size.to_s)+rev+
|
95
|
-
' .gff files in the current directory.'
|
96
|
-
end
|
97
|
-
unless results_for_gff3_files.empty?
|
98
|
-
erev 'There are '+sfancy(results_for_gff3_files.size.to_s)+
|
99
|
-
' .gff3 files in the current directory.'
|
100
|
-
erev 'We will simply pass the first entry there into '\
|
101
|
-
'class Bioroebe::Parser::GFF.'
|
102
|
-
parse_this_gff_file(results_for_gff3_files.first)
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
|
-
# ========================================================================= #
|
107
|
-
# === scan_or_parse_for_this_gff_file_or_any_gff_file
|
108
|
-
# ========================================================================= #
|
109
|
-
def scan_or_parse_for_this_gff_file_or_any_gff_file(i)
|
110
|
-
if i.is_a? Array
|
111
|
-
i.each {|entry|
|
112
|
-
if entry.nil?
|
113
|
-
scan_for_gff_files
|
114
|
-
else
|
115
|
-
scan_or_parse_for_this_gff_file_or_any_gff_file(entry)
|
116
|
-
end
|
117
|
-
}
|
118
|
-
else
|
119
|
-
if File.exist? i.to_s
|
120
|
-
parse_this_gff_file(i)
|
121
|
-
else # else scan for any .gff or .gff3 file.
|
122
|
-
scan_for_gff_files
|
123
|
-
end
|
124
|
-
end
|
125
|
-
end
|
126
|
-
|
127
|
-
require 'bioroebe/pdb/parse_pdb_file.rb'
|
128
|
-
# ========================================================================= #
|
129
|
-
# === parse_this_pdb_file
|
130
|
-
# ========================================================================= #
|
131
|
-
def parse_this_pdb_file(i)
|
132
|
-
ParsePdbFile.new(i)
|
133
|
-
end
|
134
|
-
|
135
|
-
end; end
|
@@ -1,337 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby -w
|
2
|
-
# Encoding: UTF-8
|
3
|
-
# frozen_string_literal: true
|
4
|
-
# =========================================================================== #
|
5
|
-
# require 'bioroebe/shell/search.rb'
|
6
|
-
# =========================================================================== #
|
7
|
-
module Bioroebe
|
8
|
-
|
9
|
-
class Shell < ::Bioroebe::CommandlineApplication
|
10
|
-
|
11
|
-
require 'bioroebe/toplevel_methods/matches.rb'
|
12
|
-
# ========================================================================= #
|
13
|
-
# === search_sequence_for_open_reading_frames
|
14
|
-
#
|
15
|
-
# Use this method to search for Open Reading Frames (i.e. "AUG" codons).
|
16
|
-
#
|
17
|
-
# Since we use Bioroebe.start_codon?, this may also default to another
|
18
|
-
# start codon.
|
19
|
-
# ========================================================================= #
|
20
|
-
def search_sequence_for_open_reading_frames(
|
21
|
-
i = string?,
|
22
|
-
use_which_frame = :frame1,
|
23
|
-
use_this_start_codon = ::Bioroebe.start_codon?
|
24
|
-
)
|
25
|
-
i.upcase!
|
26
|
-
if i
|
27
|
-
if i.include? use_this_start_codon # This asks whether the string includes 'ATG'.
|
28
|
-
report_n_start_codons # Will report how many Start sequences we have.
|
29
|
-
e
|
30
|
-
erev "These can be found (and will start) at these positions):#{N}#{N}"
|
31
|
-
copy = i.to_s.dup # Work on a copy here.
|
32
|
-
if use_which_frame == :frame2 # Chop off the first entry then.
|
33
|
-
copy[0,1] = ''
|
34
|
-
end
|
35
|
-
# =================================================================== #
|
36
|
-
# We will search for both ATG and AUG though, respectively the
|
37
|
-
# input variants given to us. If the following regex appears to
|
38
|
-
# be complicated to you, here is the old variant for the regex:
|
39
|
-
#
|
40
|
-
# use_this_regex = /(ATG|AUG)/i
|
41
|
-
#
|
42
|
-
# =================================================================== #
|
43
|
-
array_results = []
|
44
|
-
array_results << Bioroebe.return_array_of_sequence_matches(copy, use_this_start_codon)
|
45
|
-
if use_this_start_codon.include? 'T'
|
46
|
-
array_results << Bioroebe.return_array_of_sequence_matches(copy, use_this_start_codon.tr('T','U'))
|
47
|
-
end
|
48
|
-
array_results.flatten!
|
49
|
-
array_results.compact!
|
50
|
-
# =================================================================== #
|
51
|
-
# This will hold data such as:
|
52
|
-
# [16, ["ATG"]]
|
53
|
-
# At the least up until April 2020, before it was changed.
|
54
|
-
# =================================================================== #
|
55
|
-
return array_results
|
56
|
-
else
|
57
|
-
[]
|
58
|
-
end
|
59
|
-
else
|
60
|
-
ewarn 'It seems as if you have not yet assigned a string.'
|
61
|
-
ewarn 'You could run "random" to assign a random string.'
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
# ========================================================================= #
|
66
|
-
# === show_ccaat_sites
|
67
|
-
#
|
68
|
-
# Use this method to locate CCAAT sites in the DNA string (the main
|
69
|
-
# string).
|
70
|
-
#
|
71
|
-
# A CCAAT box, sometimes abbreviated a "CAAT box" or a "CAT box",
|
72
|
-
# is a distinct pattern of nucleotides with the sequence
|
73
|
-
# "GGCCAATCT" or a sequence similar to that string.
|
74
|
-
#
|
75
|
-
# This sequence usually occurs upstream by 60-100 bases to the
|
76
|
-
# initial transcription start site.
|
77
|
-
#
|
78
|
-
# To test this method, you can try:
|
79
|
-
#
|
80
|
-
# assign ATTTACGCGCCCGGCCAATCTGGCCGCGTACCCCCCCCCCGGCCAATCTATTTACGCGCCCGGCCAATCTGGCCGCGTACCCCCCCCCCGGCCAATCT; ccaat?
|
81
|
-
#
|
82
|
-
# ========================================================================= #
|
83
|
-
def show_ccaat_sites(
|
84
|
-
search_for_this_sequence = 'CCAAT' # 'GGCCAATCT'
|
85
|
-
)
|
86
|
-
find_this_sequence(search_for_this_sequence)
|
87
|
-
n_entries = raw_sequence?.scan("#{search_for_this_sequence}").size
|
88
|
-
erev "The main sequence has #{simp(n_entries)}#{rev} CCAAT sites."
|
89
|
-
end; alias show_CCAAT_sites show_ccaat_sites # === show_CCAAT_sites
|
90
|
-
|
91
|
-
# ========================================================================= #
|
92
|
-
# === search_for?
|
93
|
-
#
|
94
|
-
# This method can be queried from the interactive-bioshell via:
|
95
|
-
#
|
96
|
-
# search_for?
|
97
|
-
#
|
98
|
-
# ========================================================================= #
|
99
|
-
def search_for?
|
100
|
-
@internal_hash[:search_for]
|
101
|
-
end
|
102
|
-
|
103
|
-
# ========================================================================= #
|
104
|
-
# === show_cpg_islands
|
105
|
-
#
|
106
|
-
# Use this method to "search" for CpG islands in a sequence. These will
|
107
|
-
# then be highlighted, sort of.
|
108
|
-
#
|
109
|
-
# To invoke this, try:
|
110
|
-
#
|
111
|
-
# CG?
|
112
|
-
#
|
113
|
-
# ========================================================================= #
|
114
|
-
def show_cpg_islands
|
115
|
-
display_nucleotide_sequence(main_sequence?.to_str) {{
|
116
|
-
colourize_this_subsequence: 'CG'
|
117
|
-
}}
|
118
|
-
end
|
119
|
-
|
120
|
-
# ========================================================================= #
|
121
|
-
# === search_for_known_promoters
|
122
|
-
#
|
123
|
-
# This method will attempt to identify promoter elements.
|
124
|
-
# ========================================================================= #
|
125
|
-
def search_for_known_promoters
|
126
|
-
erev 'Next searching for known promoters.'
|
127
|
-
e
|
128
|
-
erev "35S Promoter (#{sfancy('TGAGACTTTT')}#{rev}):"
|
129
|
-
how_many_35S_promoters_are_in_the_sequence =
|
130
|
-
search_for 'TGAGACTTTT', :be_quiet
|
131
|
-
if how_many_35S_promoters_are_in_the_sequence > 0
|
132
|
-
erev 'There appears to be at the least one 35S promoter '\
|
133
|
-
'in the target sequence.'
|
134
|
-
end
|
135
|
-
end
|
136
|
-
|
137
|
-
# ========================================================================= #
|
138
|
-
# === search_for (search_for tag)
|
139
|
-
#
|
140
|
-
# This method essentially combines the two methods set_search_for()
|
141
|
-
# and start_search().
|
142
|
-
# ========================================================================= #
|
143
|
-
def search_for(
|
144
|
-
i, be_verbose = true
|
145
|
-
)
|
146
|
-
if i.is_a? Array
|
147
|
-
i = i.join(' ').strip
|
148
|
-
end
|
149
|
-
set_search_for(i, be_verbose)
|
150
|
-
start_search(be_verbose)
|
151
|
-
end
|
152
|
-
|
153
|
-
# ========================================================================= #
|
154
|
-
# === run_nls_search
|
155
|
-
#
|
156
|
-
# Search the sequence for NLS.
|
157
|
-
# ========================================================================= #
|
158
|
-
def run_nls_search
|
159
|
-
if @aminoacids
|
160
|
-
erev 'We will try to run a NLS search on '+simp(aminoacids?.to_s)+':'
|
161
|
-
e
|
162
|
-
erev " #{sfancy(aminoacids?.to_s)}"
|
163
|
-
e
|
164
|
-
ARRAY_NLS_SEQUENCES.each {|sequence|
|
165
|
-
if @aminoacids.include? sequence
|
166
|
-
erev 'We found a result for -> '+swarn(sequence)
|
167
|
-
else
|
168
|
-
e sfancy(sequence)+' <- This NLS is not included.'
|
169
|
-
end
|
170
|
-
}
|
171
|
-
else
|
172
|
-
erev 'Please first assign an '+sfancy('aminoacid sequence')+
|
173
|
-
' such as by doing:'
|
174
|
-
e
|
175
|
-
erev ' set_aminoacids '+
|
176
|
-
::Bioroebe.colourize_aa('PAAKRVKLKKKKKKKKKRKKKPPKLKVKVKLKLKAA')
|
177
|
-
e
|
178
|
-
end
|
179
|
-
end
|
180
|
-
|
181
|
-
# ========================================================================= #
|
182
|
-
# === search_for_tata_consensus_sequence
|
183
|
-
#
|
184
|
-
# Use this method to search for a TATA consensus sequence in the target
|
185
|
-
# string (the so-called "TATA box"). The TATA box is an AT-rich
|
186
|
-
# sequence that can be found upstream of the transcription start site.
|
187
|
-
#
|
188
|
-
# A short overview of this sequence format can be found here:
|
189
|
-
#
|
190
|
-
# https://en.wikiversity.org/wiki/Gene_transcriptions/Boxes/TATA#Consensus_sequence
|
191
|
-
#
|
192
|
-
# The major consensus sequence is:
|
193
|
-
#
|
194
|
-
# 3'-TATAAA-5'
|
195
|
-
#
|
196
|
-
# This is just the major one; there are variants of this sequences such as
|
197
|
-
#
|
198
|
-
# 3'-TATAAA(A)AAA-5'
|
199
|
-
#
|
200
|
-
# And similar variants.
|
201
|
-
#
|
202
|
-
# Usage example:
|
203
|
-
#
|
204
|
-
# set_string GGGCTATAAAAATTGGGATATAAAATTGTATATA; find_TATA?
|
205
|
-
#
|
206
|
-
# ========================================================================= #
|
207
|
-
def search_for_tata_consensus_sequence
|
208
|
-
full_sequence = sequence? # Grab hold of the sequence.
|
209
|
-
# ======================================================================= #
|
210
|
-
# Next define our TATA box which we will try to discover:
|
211
|
-
# ======================================================================= #
|
212
|
-
tata_box_sequence = 'TATAAA'
|
213
|
-
results = full_sequence.scan(/#{tata_box_sequence}/)
|
214
|
-
if results.empty?
|
215
|
-
erev 'Our target string does not include `'+
|
216
|
-
simp(tata_box_sequence)+rev+'`.'
|
217
|
-
else
|
218
|
-
n_results = results.size.to_s # <- Determine how many matches were found.
|
219
|
-
erev "We did find #{simp(n_results)} "\
|
220
|
-
"#{sfancy(tata_box_sequence)}#{rev} entries."
|
221
|
-
erev 'Their starting positions are at:'
|
222
|
-
array = []
|
223
|
-
splitted_sequence = full_sequence.split(//)
|
224
|
-
splitted_sequence.each_with_index {|entry, index|
|
225
|
-
case entry
|
226
|
-
when 'T' # This could be a TATA sequence.
|
227
|
-
# ================================================================= #
|
228
|
-
# Next we will compare whether the sequence matches.
|
229
|
-
# ================================================================= #
|
230
|
-
subsequence = full_sequence[index, tata_box_sequence.size]
|
231
|
-
if tata_box_sequence == subsequence
|
232
|
-
array << index # <- Append into our Array here.
|
233
|
-
end
|
234
|
-
end
|
235
|
-
}
|
236
|
-
e
|
237
|
-
print ' '
|
238
|
-
pp array
|
239
|
-
# ===================================================================== #
|
240
|
-
# As of May 2016 we will also use find() to find the TATA box.
|
241
|
-
# ===================================================================== #
|
242
|
-
e
|
243
|
-
erev 'We will also show the sequence in a highlighted manner next:'
|
244
|
-
e
|
245
|
-
try_to_find_restriction_enzymes_for(tata_box_sequence)
|
246
|
-
end
|
247
|
-
end
|
248
|
-
|
249
|
-
# ========================================================================= #
|
250
|
-
# === ncbi_nucleotide_search_for
|
251
|
-
# ========================================================================= #
|
252
|
-
def ncbi_nucleotide_search_for(i = '')
|
253
|
-
i = '' if i.nil? # Reset to default then, in this case.
|
254
|
-
i = i.join('+') if i.is_a? Array
|
255
|
-
i.strip!
|
256
|
-
_ = 'https://www.ncbi.nlm.nih.gov/'.dup
|
257
|
-
_ << 'nucgss?term="'+i+'"' unless i.empty? # Use "" quotes to escape shell-code.
|
258
|
-
erev 'Now opening '+simp(_)+rev
|
259
|
-
open_in_browser _
|
260
|
-
end
|
261
|
-
|
262
|
-
# ========================================================================= #
|
263
|
-
# === start_search (start_search tag)
|
264
|
-
#
|
265
|
-
# This will attempt to locate @search_for substring in the main
|
266
|
-
# nucleotide sequence.
|
267
|
-
# ========================================================================= #
|
268
|
-
def start_search(
|
269
|
-
be_verbose = true
|
270
|
-
)
|
271
|
-
case be_verbose
|
272
|
-
when :be_quiet
|
273
|
-
be_verbose = false
|
274
|
-
end
|
275
|
-
_ = search_for? # Obtain a handle to the sequence we are trying to find.
|
276
|
-
if _
|
277
|
-
results = sequence?.scan(_)
|
278
|
-
if be_verbose
|
279
|
-
erev "Trying to now find `#{simp(_)}#{rev}`."
|
280
|
-
pp results
|
281
|
-
end
|
282
|
-
msg = "We found `#{simp(results.size.to_s)}#{rev}` entr".dup
|
283
|
-
if (results.size > 1) or (results.size == 0)
|
284
|
-
msg << 'ies' # Plural form.
|
285
|
-
else
|
286
|
-
msg << 'y' # Singular form.
|
287
|
-
end
|
288
|
-
msg << '.'
|
289
|
-
erev msg
|
290
|
-
return results.size
|
291
|
-
else
|
292
|
-
erev "No value for #{paleturquoise('@search_for')}#{rev} was "\
|
293
|
-
"set yet. Please set one via invoking:"
|
294
|
-
e
|
295
|
-
erev ' set_search_for'
|
296
|
-
e
|
297
|
-
end
|
298
|
-
end
|
299
|
-
|
300
|
-
# ========================================================================= #
|
301
|
-
# === search_for_nucleotide_sequence
|
302
|
-
#
|
303
|
-
# This method will use the NCBI interface to search for
|
304
|
-
# nucleotide sequences.
|
305
|
-
#
|
306
|
-
# Usage example:
|
307
|
-
#
|
308
|
-
# snuc lady slipper orchid
|
309
|
-
#
|
310
|
-
# ========================================================================= #
|
311
|
-
def search_for_nucleotide_sequence(i)
|
312
|
-
i = i.join '+' if i.is_a? Array
|
313
|
-
open_in_browser "https://www.ncbi.nlm.nih.gov/nucgss?term=#{i}"
|
314
|
-
end
|
315
|
-
|
316
|
-
# ========================================================================= #
|
317
|
-
# === set_search_for
|
318
|
-
#
|
319
|
-
# This setter-method can be used to designate for which subsequence
|
320
|
-
# we may search-for, if this is necessary, e. g. to detect "AUG"
|
321
|
-
# in a sequence of "GGCAUGGGC".
|
322
|
-
# ========================================================================= #
|
323
|
-
def set_search_for(
|
324
|
-
i, be_verbose = true
|
325
|
-
)
|
326
|
-
case be_verbose
|
327
|
-
when :be_quiet
|
328
|
-
be_verbose = false
|
329
|
-
end
|
330
|
-
i = i.join if i.is_a? Array
|
331
|
-
if be_verbose
|
332
|
-
erev "We will now search for: #{simp(i.to_s)}" if i
|
333
|
-
end
|
334
|
-
@internal_hash[:search_for] = i
|
335
|
-
end; alias set_search_string set_search_for # === set_search_string
|
336
|
-
|
337
|
-
end; end
|
@@ -1,200 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby -w
|
2
|
-
# Encoding: UTF-8
|
3
|
-
# frozen_string_literal: true
|
4
|
-
# =========================================================================== #
|
5
|
-
# require 'bioroebe/shell/sequence.rb'
|
6
|
-
# =========================================================================== #
|
7
|
-
module Bioroebe
|
8
|
-
|
9
|
-
class Shell < ::Bioroebe::CommandlineApplication
|
10
|
-
|
11
|
-
# ========================================================================= #
|
12
|
-
# === dna_sequence? (string? tag)
|
13
|
-
#
|
14
|
-
# Return the DNA sequence in question.
|
15
|
-
#
|
16
|
-
# Must always return a String.
|
17
|
-
#
|
18
|
-
# Several aliases exist. It is recommended to use the more explicit name,
|
19
|
-
# since this will more accurately reflect the name (and intent) of this
|
20
|
-
# method.
|
21
|
-
# ========================================================================= #
|
22
|
-
def dna_sequence?
|
23
|
-
@internal_hash[:array_dna_sequence].last.to_str
|
24
|
-
end; alias dna_string? dna_sequence? # === dna_string?
|
25
|
-
alias dna_string? dna_sequence? # === dna_string?
|
26
|
-
alias seq? dna_sequence? # === seq?
|
27
|
-
alias sequence_1 dna_sequence? # === sequence_1
|
28
|
-
alias seq1 dna_sequence? # === seq1
|
29
|
-
alias seq1? dna_sequence? # === seq1?
|
30
|
-
alias dna_seq? dna_sequence? # === dna_seq?
|
31
|
-
alias string? dna_sequence? # === string?
|
32
|
-
alias main_string? dna_sequence? # === main_string?
|
33
|
-
alias nucleotide_sequence? dna_sequence? # === nucleotide_sequence?
|
34
|
-
alias sequence_as_string? dna_sequence? # === sequence_as_string?
|
35
|
-
alias dna_sequence_as_string? dna_sequence? # === dna_sequence_as_string?
|
36
|
-
alias dna_sequence_object_as_string? dna_sequence? # === dna_sequence_object_as_string?
|
37
|
-
|
38
|
-
# ========================================================================= #
|
39
|
-
# === return_dna_sequence_as_sequence_object
|
40
|
-
#
|
41
|
-
# This method will always return the main "sequence object" in question,
|
42
|
-
# which is (almost always) a DNA sequence (dsDNA).
|
43
|
-
# ========================================================================= #
|
44
|
-
def return_dna_sequence_as_sequence_object
|
45
|
-
@internal_hash[:array_dna_sequence].last
|
46
|
-
end; alias main_sequence? return_dna_sequence_as_sequence_object # === main_sequence?
|
47
|
-
alias dna_sequence_object? return_dna_sequence_as_sequence_object # === dna_sequence_object?
|
48
|
-
alias sequence_object? return_dna_sequence_as_sequence_object # === sequence_object?
|
49
|
-
alias sequence? return_dna_sequence_as_sequence_object # === sequence?
|
50
|
-
alias seq_object? return_dna_sequence_as_sequence_object # === seq_object?
|
51
|
-
alias sequence return_dna_sequence_as_sequence_object # === sequence (sequence? tag)
|
52
|
-
alias seq_obj? return_dna_sequence_as_sequence_object # === seq_obj?
|
53
|
-
|
54
|
-
# ========================================================================= #
|
55
|
-
# === dna_sequences?
|
56
|
-
# ========================================================================= #
|
57
|
-
def dna_sequences?
|
58
|
-
@internal_hash[:array_dna_sequence]
|
59
|
-
end
|
60
|
-
|
61
|
-
# ========================================================================= #
|
62
|
-
# === is_any_nucleotide_assigned?
|
63
|
-
# ========================================================================= #
|
64
|
-
def is_any_nucleotide_assigned?
|
65
|
-
!sequence_object?.empty? # If the sequence is not empty, it is assigned.
|
66
|
-
end
|
67
|
-
|
68
|
-
# ========================================================================= #
|
69
|
-
# === assign_sequence
|
70
|
-
# ========================================================================= #
|
71
|
-
def assign_sequence(
|
72
|
-
i, be_verbose = true
|
73
|
-
)
|
74
|
-
case be_verbose
|
75
|
-
when :be_silent
|
76
|
-
be_verbose = false
|
77
|
-
end
|
78
|
-
if be_verbose
|
79
|
-
e 'Now assigning a sequence.'
|
80
|
-
end
|
81
|
-
set_sequence(i)
|
82
|
-
end
|
83
|
-
|
84
|
-
# ========================================================================= #
|
85
|
-
# === sequence?
|
86
|
-
# ========================================================================= #
|
87
|
-
def sequence?
|
88
|
-
@sequence
|
89
|
-
end; alias dna_sequence? sequence? # === dna_sequence?
|
90
|
-
|
91
|
-
# ========================================================================= #
|
92
|
-
# === sequence3
|
93
|
-
# ========================================================================= #
|
94
|
-
def sequence_3
|
95
|
-
@sequence_3.to_str
|
96
|
-
end; alias seq3 sequence_3 # === seq3
|
97
|
-
alias seq3? sequence_3 # === seq3?
|
98
|
-
|
99
|
-
# ========================================================================= #
|
100
|
-
# === sequence4
|
101
|
-
# ========================================================================= #
|
102
|
-
def sequence_4
|
103
|
-
@sequence_4.to_str
|
104
|
-
end; alias seq4 sequence_4 # === seq4
|
105
|
-
alias seq4? sequence_4 # === seq4?
|
106
|
-
|
107
|
-
# ========================================================================= #
|
108
|
-
# === sequence5
|
109
|
-
# ========================================================================= #
|
110
|
-
def sequence_5
|
111
|
-
@sequence_5.to_str
|
112
|
-
end; alias seq5 sequence_5 # === seq5
|
113
|
-
alias seq5? sequence_5 # === seq5?
|
114
|
-
|
115
|
-
# ========================================================================= #
|
116
|
-
# === sequence6
|
117
|
-
# ========================================================================= #
|
118
|
-
def sequence_6
|
119
|
-
@sequence_6.to_str
|
120
|
-
end; alias seq6 sequence_6 # === seq6
|
121
|
-
alias seq6? sequence_6 # === seq6?
|
122
|
-
|
123
|
-
# ========================================================================= #
|
124
|
-
# === sequence2
|
125
|
-
# ========================================================================= #
|
126
|
-
def sequence_2
|
127
|
-
@sequence_2.to_str
|
128
|
-
end; alias seq2 sequence_2 # === seq2
|
129
|
-
alias seq2? sequence_2 # === seq2?
|
130
|
-
|
131
|
-
# ========================================================================= #
|
132
|
-
# === set_sequence_2
|
133
|
-
# ========================================================================= #
|
134
|
-
def set_sequence_2(i = '')
|
135
|
-
i = i.join(' ').strip if i.is_a? Array
|
136
|
-
i.delete!(N)
|
137
|
-
i = i.to_str unless i.is_a? String
|
138
|
-
@sequence_2 = ::Bioroebe.sequence(i)
|
139
|
-
end
|
140
|
-
|
141
|
-
# ========================================================================= #
|
142
|
-
# === set_sequence_3
|
143
|
-
# ========================================================================= #
|
144
|
-
def set_sequence_3(i = '')
|
145
|
-
i = i.join(' ').strip if i.is_a? Array
|
146
|
-
i.delete!(N)
|
147
|
-
i = i.to_str unless i.is_a? String
|
148
|
-
@sequence_3 = ::Bioroebe.sequence(i)
|
149
|
-
end
|
150
|
-
|
151
|
-
# ========================================================================= #
|
152
|
-
# === set_sequence_4
|
153
|
-
# ========================================================================= #
|
154
|
-
def set_sequence_4(i = '')
|
155
|
-
i = i.join(' ').strip if i.is_a? Array
|
156
|
-
i.delete!(N)
|
157
|
-
i = i.to_str unless i.is_a? String
|
158
|
-
@sequence_4 = ::Bioroebe.sequence(i)
|
159
|
-
end
|
160
|
-
|
161
|
-
# ========================================================================= #
|
162
|
-
# === set_sequence_5
|
163
|
-
# ========================================================================= #
|
164
|
-
def set_sequence_5(i = '')
|
165
|
-
i = i.join(' ').strip if i.is_a? Array
|
166
|
-
i.delete!(N)
|
167
|
-
i = i.to_str unless i.is_a? String
|
168
|
-
@sequence_5 = ::Bioroebe.sequence(i)
|
169
|
-
end
|
170
|
-
|
171
|
-
# ========================================================================= #
|
172
|
-
# === set_sequence_6
|
173
|
-
# ========================================================================= #
|
174
|
-
def set_sequence_6(i = '')
|
175
|
-
i = i.join(' ').strip if i.is_a? Array
|
176
|
-
i.delete!(N)
|
177
|
-
i = i.to_str unless i.is_a? String
|
178
|
-
@sequence_6 = ::Bioroebe.sequence(i)
|
179
|
-
end
|
180
|
-
|
181
|
-
require 'bioroebe/codons/codons.rb'
|
182
|
-
# ========================================================================= #
|
183
|
-
# === aminoacid_sequence?
|
184
|
-
#
|
185
|
-
# This here will return the most likely aminoacid sequence of the target
|
186
|
-
# main sequence.
|
187
|
-
# ========================================================================= #
|
188
|
-
# def aminoacid_sequence?(
|
189
|
-
# main_sequence = @sequence
|
190
|
-
# )
|
191
|
-
# if main_sequence.respond_to? :sequence?
|
192
|
-
# main_sequence = main_sequence.sequence?
|
193
|
-
# end
|
194
|
-
# _ = ::Bioroebe.dna_to_aa(
|
195
|
-
# main_sequence
|
196
|
-
# )
|
197
|
-
# return _ # .join.strip
|
198
|
-
# end
|
199
|
-
|
200
|
-
end; end
|