bioroebe 0.10.80 → 0.12.12
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.
Potentially problematic release.
This version of bioroebe might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +3612 -2781
- data/bin/bioroebe +7 -1
- data/bin/bioroebe_hash +7 -0
- data/bin/codon_to_aminoacid +1 -0
- data/bioroebe.gemspec +3 -3
- data/doc/README.gen +3612 -2742
- data/doc/quality_control/commandline_applications.md +3 -3
- data/doc/todo/bioroebe_java_todo.md +22 -0
- data/doc/todo/bioroebe_todo.md +2059 -2615
- data/lib/bioroebe/aminoacids/aminoacid_substitution.rb +1 -9
- data/lib/bioroebe/aminoacids/codon_percentage.rb +1 -9
- data/lib/bioroebe/aminoacids/deduce_aminoacid_sequence.rb +1 -9
- data/lib/bioroebe/aminoacids/display_aminoacid_table.rb +1 -0
- data/lib/bioroebe/aminoacids/show_hydrophobicity.rb +1 -6
- data/lib/bioroebe/base/colours_for_base/colours_for_base.rb +18 -8
- data/lib/bioroebe/base/commandline_application/commandline_arguments.rb +15 -11
- 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 +3 -2
- data/lib/bioroebe/base/misc.rb +35 -0
- data/lib/bioroebe/base/prototype/misc.rb +11 -1
- data/lib/bioroebe/codon_tables/frequencies/parse_frequency_table.rb +2 -10
- data/lib/bioroebe/codons/codons.rb +1 -1
- data/lib/bioroebe/codons/convert_this_codon_to_that_aminoacid.rb +192 -58
- data/lib/bioroebe/codons/possible_codons_for_this_aminoacid.rb +1 -9
- data/lib/bioroebe/codons/show_codon_tables.rb +6 -2
- data/lib/bioroebe/codons/show_codon_usage.rb +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/conversions/dna_to_aminoacid_sequence.rb +58 -24
- 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/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/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 +1465 -7
- data/lib/bioroebe/fasta_and_fastq/return_fasta_subsection_of_this_file.rb +11 -2
- data/lib/bioroebe/fasta_and_fastq/show_fasta_headers.rb +27 -12
- data/lib/bioroebe/fasta_and_fastq/simplify_fasta_header/simplify_fasta_header.rb +1 -5
- data/lib/bioroebe/fasta_and_fastq/split_this_fasta_file_into_chromosomes/constants.rb +0 -5
- data/lib/bioroebe/genome/README.md +4 -0
- data/lib/bioroebe/genome/genome.rb +67 -0
- data/lib/bioroebe/genomes/genome_pattern.rb +3 -9
- data/lib/bioroebe/gui/gtk +1 -0
- data/lib/bioroebe/gui/gtk3/alignment/alignment.rb +73 -128
- data/lib/bioroebe/gui/gtk3/controller/controller.rb +45 -27
- data/lib/bioroebe/gui/gtk3/dna_to_aminoacid_widget/dna_to_aminoacid_widget.rb +76 -50
- data/lib/bioroebe/gui/gtk3/fasta_table_widget/fasta_table_widget.rb +99 -21
- data/lib/bioroebe/gui/gtk3/hamming_distance/hamming_distance.rb +42 -28
- data/lib/bioroebe/gui/gtk3/nucleotide_analyser/nucleotide_analyser.rb +119 -71
- data/lib/bioroebe/gui/gtk3/protein_to_DNA/protein_to_DNA.rb +18 -18
- data/lib/bioroebe/gui/gtk3/random_sequence/random_sequence.rb +19 -11
- data/lib/bioroebe/gui/jruby/alignment/alignment.rb +165 -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/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/java/README.md +4 -0
- data/lib/bioroebe/java/bioroebe/Sequence.java +25 -1
- data/lib/bioroebe/java/bioroebe/src/main/java/bioroebe/Base.class +0 -0
- data/lib/bioroebe/java/bioroebe/{Base.java → src/main/java/bioroebe/Base.java} +15 -2
- data/lib/bioroebe/java/bioroebe/{BisulfiteTreatment.class → src/main/java/bioroebe/BisulfiteTreatment.class} +0 -0
- data/lib/bioroebe/java/bioroebe/{Codons.class → src/main/java/bioroebe/Codons.class} +0 -0
- data/lib/bioroebe/java/bioroebe/src/main/java/bioroebe/Codons.java +34 -0
- data/lib/bioroebe/java/bioroebe/src/main/java/bioroebe/Commandline.class +0 -0
- data/lib/bioroebe/java/bioroebe/src/main/java/bioroebe/Commandline.java +101 -0
- data/lib/bioroebe/java/bioroebe/{GenerateRandomDnaSequence.class → src/main/java/bioroebe/GenerateRandomDnaSequence.class} +0 -0
- data/lib/bioroebe/java/bioroebe/{GenerateRandomDnaSequence.java → src/main/java/bioroebe/GenerateRandomDnaSequence.java} +8 -2
- data/lib/bioroebe/java/bioroebe/{IsPalindrome.class → src/main/java/bioroebe/IsPalindrome.class} +0 -0
- data/lib/bioroebe/java/bioroebe/{IsPalindrome.java → src/main/java/bioroebe/IsPalindrome.java} +5 -1
- data/lib/bioroebe/java/bioroebe/src/main/java/bioroebe/PartnerNucleotide.class +0 -0
- data/lib/bioroebe/java/bioroebe/src/main/java/bioroebe/PartnerNucleotide.java +56 -0
- data/lib/bioroebe/java/bioroebe/{RemoveFile.java → src/main/java/bioroebe/RemoveFile.java} +10 -4
- data/lib/bioroebe/java/bioroebe/{RemoveNumbers.class → src/main/java/bioroebe/RemoveNumbers.class} +0 -0
- data/lib/bioroebe/java/bioroebe/{RemoveNumbers.java → src/main/java/bioroebe/RemoveNumbers.java} +1 -0
- data/lib/bioroebe/java/bioroebe/{ToCamelcase.class → src/main/java/bioroebe/ToCamelcase.class} +0 -0
- data/lib/bioroebe/java/bioroebe/{ToCamelcase.java → src/main/java/bioroebe/ToCamelcase.java} +3 -3
- data/lib/bioroebe/java/bioroebe/src/main/java/bioroebe/ToRNA.class +0 -0
- data/lib/bioroebe/java/bioroebe/src/main/java/bioroebe/ToRNA.java +42 -0
- data/lib/bioroebe/java/bioroebe/src/main/java/bioroebe/toplevel_methods/BaseComposition.class +0 -0
- data/lib/bioroebe/java/bioroebe/src/main/java/bioroebe/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/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/esystem.py +12 -0
- data/lib/bioroebe/python/toplevel_methods/open_in_browser.py +20 -0
- data/lib/bioroebe/python/toplevel_methods/palindromes.py +42 -0
- data/lib/bioroebe/python/toplevel_methods/rds.py +13 -0
- data/lib/bioroebe/python/toplevel_methods/shuffleseq.py +23 -0
- data/lib/bioroebe/python/toplevel_methods/three_delimiter.py +37 -0
- data/lib/bioroebe/python/toplevel_methods/time_and_date.py +43 -0
- data/lib/bioroebe/python/toplevel_methods/to_camelcase.py +21 -0
- data/lib/bioroebe/requires/require_the_bioroebe_project.rb +3 -1
- data/lib/bioroebe/sequence/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/sequence.rb +87 -21
- data/lib/bioroebe/shell/menu.rb +3829 -3714
- data/lib/bioroebe/shell/misc.rb +59 -4307
- data/lib/bioroebe/shell/readline/readline.rb +1 -1
- data/lib/bioroebe/shell/shell.rb +11255 -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 +142 -12
- 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 +1 -2
- data/lib/bioroebe/toplevel_methods/taxonomy.rb +2 -2
- data/lib/bioroebe/toplevel_methods/to_camelcase.rb +5 -0
- data/lib/bioroebe/utility_scripts/align_open_reading_frames.rb +1 -9
- data/lib/bioroebe/utility_scripts/check_for_mismatches/check_for_mismatches.rb +1 -9
- data/lib/bioroebe/utility_scripts/compacter.rb +1 -9
- data/lib/bioroebe/utility_scripts/compseq/compseq.rb +1 -9
- data/lib/bioroebe/utility_scripts/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/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 +103 -54
- data/lib/bioroebe/www/sinatra/sinatra.rb +186 -70
- data/lib/bioroebe/yaml/aminoacids/amino_acids_long_name_to_one_letter.yml +2 -2
- data/lib/bioroebe/yaml/configuration/browser.yml +1 -1
- data/lib/bioroebe/yaml/configuration/temp_dir.yml +1 -1
- data/lib/bioroebe/yaml/genomes/README.md +3 -4
- data/lib/bioroebe/yaml/restriction_enzymes/restriction_enzymes.yml +27 -27
- metadata +81 -64
- data/doc/setup.rb +0 -1655
- data/lib/bioroebe/fasta_and_fastq/parse_fasta/constants.rb +0 -50
- data/lib/bioroebe/fasta_and_fastq/parse_fasta/initialize.rb +0 -86
- data/lib/bioroebe/fasta_and_fastq/parse_fasta/menu.rb +0 -117
- data/lib/bioroebe/fasta_and_fastq/parse_fasta/misc.rb +0 -981
- data/lib/bioroebe/fasta_and_fastq/parse_fasta/report.rb +0 -156
- data/lib/bioroebe/fasta_and_fastq/parse_fasta/reset.rb +0 -128
- data/lib/bioroebe/genbank/genbank_parser.rb +0 -291
- data/lib/bioroebe/java/bioroebe/Base.class +0 -0
- data/lib/bioroebe/java/bioroebe/Codons.java +0 -22
- data/lib/bioroebe/java/bioroebe/PartnerNucleotide.class +0 -0
- data/lib/bioroebe/java/bioroebe/PartnerNucleotide.java +0 -19
- data/lib/bioroebe/java/bioroebe.jar +0 -0
- data/lib/bioroebe/shell/add.rb +0 -108
- data/lib/bioroebe/shell/assign.rb +0 -360
- data/lib/bioroebe/shell/chop_and_cut.rb +0 -281
- data/lib/bioroebe/shell/constants.rb +0 -166
- data/lib/bioroebe/shell/download.rb +0 -335
- data/lib/bioroebe/shell/enable_and_disable.rb +0 -158
- data/lib/bioroebe/shell/enzymes.rb +0 -310
- data/lib/bioroebe/shell/fasta.rb +0 -345
- data/lib/bioroebe/shell/gtk.rb +0 -76
- data/lib/bioroebe/shell/history.rb +0 -132
- data/lib/bioroebe/shell/initialize.rb +0 -217
- data/lib/bioroebe/shell/loop.rb +0 -74
- data/lib/bioroebe/shell/prompt.rb +0 -107
- data/lib/bioroebe/shell/random.rb +0 -289
- data/lib/bioroebe/shell/reset.rb +0 -335
- data/lib/bioroebe/shell/scan_and_parse.rb +0 -135
- data/lib/bioroebe/shell/search.rb +0 -337
- data/lib/bioroebe/shell/sequences.rb +0 -200
- data/lib/bioroebe/shell/show_report_and_display.rb +0 -2901
- data/lib/bioroebe/shell/startup.rb +0 -127
- data/lib/bioroebe/shell/taxonomy.rb +0 -14
- data/lib/bioroebe/shell/tk.rb +0 -23
- data/lib/bioroebe/shell/user_input.rb +0 -88
- data/lib/bioroebe/shell/xorg.rb +0 -45
- /data/lib/bioroebe/java/bioroebe/{BisulfiteTreatment.java → src/main/java/bioroebe/BisulfiteTreatment.java} +0 -0
- /data/lib/bioroebe/java/bioroebe/{Esystem.class → src/main/java/bioroebe/Esystem.class} +0 -0
- /data/lib/bioroebe/java/bioroebe/{Esystem.java → src/main/java/bioroebe/Esystem.java} +0 -0
- /data/lib/bioroebe/java/bioroebe/{RemoveFile.class → src/main/java/bioroebe/RemoveFile.class} +0 -0
@@ -4,10 +4,29 @@
|
|
4
4
|
# =========================================================================== #
|
5
5
|
# === Bioroebe::GenbankParser
|
6
6
|
#
|
7
|
-
# This class can be used to parse genbank-files
|
8
|
-
#
|
7
|
+
# This class can be used to parse genbank-files (typically stored as .genbank
|
8
|
+
# or .gbk, so their file extension is usually ".gbk").
|
9
|
+
#
|
10
|
+
# Since as of the rewrite in July 2022 the class can also handle multiple
|
11
|
+
# fasta entries now.
|
12
|
+
#
|
13
|
+
# The class is similar to class FastaParser, but instead it will only
|
14
|
+
# select the content between "ORIGIN" and "VERSION" entries.
|
15
|
+
#
|
16
|
+
# The user can pass the content of a genbank-file to this class, and it
|
17
|
+
# can then report the nucleotide sequence, e. g. the part starting after
|
18
|
+
# the ORIGIN string.
|
19
|
+
#
|
20
|
+
# The reason why this class has been created was because it is sometimes
|
21
|
+
# necessary to parse a genebank file.
|
22
|
+
#
|
23
|
+
# Usage example:
|
24
|
+
#
|
25
|
+
# Bioroebe::GenbankParser.new(ARGV)
|
26
|
+
#
|
9
27
|
# =========================================================================== #
|
10
|
-
# require 'bioroebe/
|
28
|
+
# require 'bioroebe/genbank/genbank_parser.rb'
|
29
|
+
# genbank_parser = Bioroebe::GenbankParser.new(ARGV)
|
11
30
|
# =========================================================================== #
|
12
31
|
require 'bioroebe/base/commandline_application/commandline_application.rb'
|
13
32
|
|
@@ -16,63 +35,365 @@ module Bioroebe
|
|
16
35
|
class GenbankParser < ::Bioroebe::CommandlineApplication # === Bioroebe::GenbankParser
|
17
36
|
|
18
37
|
# ========================================================================= #
|
19
|
-
# ===
|
38
|
+
# === UPCASE_THE_SEQUENCE
|
39
|
+
#
|
40
|
+
# Setting this constant to true will cause this class to store the
|
41
|
+
# FASTA sequence in an upcased variant, e. g. "AGCAGCTA" rather
|
42
|
+
# than "acgatcag".
|
20
43
|
# ========================================================================= #
|
21
|
-
|
44
|
+
UPCASE_THE_SEQUENCE = true
|
45
|
+
|
46
|
+
# ========================================================================= #
|
47
|
+
# === TEST_STRING
|
48
|
+
#
|
49
|
+
# Our example test-string, to see how such a genbank file usually looks
|
50
|
+
# like.
|
51
|
+
#
|
52
|
+
# This will contain two different FASTA sequences.
|
53
|
+
# ========================================================================= #
|
54
|
+
TEST_STRING = ' /note="internal transcribed spacer 2"
|
55
|
+
ORIGIN
|
56
|
+
1 cgtaacaagg tttccgtagg tgaaccttcg gaaggatcat tgttgagacc cccaaaaaaa
|
57
|
+
61 cgatcgagtt aatccggagg accggtgtag tttggtctcc caggggcttt ggctactgtg
|
58
|
+
121 gtggccgtga atttccgtcg aacctccttg ggagaattct tgatggcaat tgaacccttg
|
59
|
+
181 gcccggcgca gtttcgcccc aagtcaaatg agatggaacc ggcggagggc atcgtcctcc
|
60
|
+
241 atggaaccgg ggagggccgg cgttcttccg ttccccccat gaattttttt ttgacaactc
|
61
|
+
301 tcggcaacgg atatctcggc tctttgcatc cgatgaaaga acccagcgaa atgtgataag
|
62
|
+
361 tggtgtgaat tgcagaatcc cgtgaaccat cgagtctttg aacgcaagtt gcgcccgagg
|
63
|
+
421 ccatcaggct aagggcacgc ctgcctgggc gttgcgtgct gcatctctct cccattgcta
|
64
|
+
481 aggctgaaca ggcatactgt tcggccggcg cggatgagtg tttggcccct tgttcttcgg
|
65
|
+
541 tgcgatgggt ccaagacctg ggcttttgac ggccggaaat ccggcaagag gtggacggac
|
66
|
+
601 ggtggctgcg acgaagctgt cgtgcgaatg ccctacgctg tcgtatttga tgggccggaa
|
67
|
+
661 taaatccctt ttgagcccca ttggaggcac gtcaacccgt gggcggtcga cggccatttg
|
68
|
+
721 gatgcaaccc caggtcaggt gagga
|
69
|
+
//
|
70
|
+
LOCUS Z78510 750 bp DNA linear PLN 30-NOV-2006
|
71
|
+
DEFINITION P.caricinum 5.8S rRNA gene and ITS1 and ITS2 DNA.
|
72
|
+
ACCESSION Z78510
|
73
|
+
VERSION Z78510.1 GI:2765635
|
74
|
+
KEYWORDS 5.8S ribosomal RNA; 5.8S rRNA gene; internal transcribed spacer;
|
75
|
+
ITS1; ITS2.
|
76
|
+
SOURCE Phragmipedium caricinum
|
77
|
+
ORGANISM Phragmipedium caricinum
|
78
|
+
Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta;
|
79
|
+
Spermatophyta; Magnoliophyta; Liliopsida; Asparagales; Orchidaceae;
|
80
|
+
Cypripedioideae; Phragmipedium.
|
81
|
+
REFERENCE 1
|
82
|
+
AUTHORS Cox,A.V., Pridgeon,A.M., Albert,V.A. and Chase,M.W.
|
83
|
+
TITLE Phylogenetics of the slipper orchids (Cypripedioideae:
|
84
|
+
Orchidaceae): nuclear rDNA ITS sequences
|
85
|
+
JOURNAL Unpublished
|
86
|
+
REFERENCE 2 (bases 1 to 750)
|
87
|
+
AUTHORS Cox,A.V.
|
88
|
+
TITLE Direct Submission
|
89
|
+
JOURNAL Submitted (19-AUG-1996) Cox A.V., Royal Botanic Gardens, Kew,
|
90
|
+
Richmond, Surrey TW9 3AB, UK
|
91
|
+
FEATURES Location/Qualifiers
|
92
|
+
source 1..750
|
93
|
+
/organism="Phragmipedium caricinum"
|
94
|
+
/mol_type="genomic DNA"
|
95
|
+
/db_xref="taxon:53127"
|
96
|
+
misc_feature 1..380
|
97
|
+
/note="internal transcribed spacer 1"
|
98
|
+
gene 381..550
|
99
|
+
/gene="5.8S rRNA"
|
100
|
+
rRNA 381..550
|
101
|
+
/gene="5.8S rRNA"
|
102
|
+
/product="5.8S ribosomal RNA"
|
103
|
+
misc_feature 551..750
|
104
|
+
/note="internal transcribed spacer 2"
|
105
|
+
ORIGIN
|
106
|
+
1 ctaaccaggg ttccgaggtg accttcggga ggattccttt ttaagccccc gaaaaaacga
|
107
|
+
61 tcgaattaaa ccggaggacc ggtttaattt ggtctcccca ggggctttcc ccccttggtg
|
108
|
+
121 gccgtgaatt tccatcgaac ccccctggga gaattcttgg tggccaatgg acccttggcc
|
109
|
+
181 cggcgcaatt tcccccccaa tcaaatgaga taggaccggc agggggcgtc cccccccatg
|
110
|
+
241 gaaccgggga gggccggcat tcttccgttc ccccctcgga ttttttgaca actctcgcaa
|
111
|
+
301 cggatatctc gcctctttgc atcggatgga agaacgcagc gaaatgtgat aagtggtgtg
|
112
|
+
361 aattgcagaa tcccgtgaac catcgagtct ttgaacgcaa gttgcgcccg aggccatcag
|
113
|
+
421 gctaagggca cgcctgcctg ggcgttgcgt gctgcatctc tcccattgct aaggttgaac
|
114
|
+
481 gggcatactg ttcggccggc gcggatgaga gattggcccc ttgttcttcg gtgcgatggg
|
115
|
+
541 tccaagacct gggcttttga cggtccaaaa tccggcaaga ggtggacgga cggtggctgc
|
116
|
+
601 gacaaagctg tcgtgcgaat gccctgcgtt gtcgtttttg atgggccgga ataaatccct
|
117
|
+
661 tttgaacccc attggaggca cgtcaaccca tgggcggttg acggccattt ggatgcaacc
|
118
|
+
721 ccaggtcagg tgagccaccc gctgagttta
|
119
|
+
//
|
120
|
+
LOCUS Z78509 731 bp DNA linear PLN 30-NOV-2006
|
121
|
+
DEFINITION P.pearcei 5.8S rRNA gene and ITS1 and ITS2 DNA.
|
122
|
+
ACCESSION Z78509
|
123
|
+
VERSION Z78509.1 GI:2765634
|
124
|
+
KEYWORDS 5.8S ribosomal RNA; 5.8S rRNA gene; internal transcribed spacer;
|
125
|
+
ITS1; ITS2.
|
126
|
+
SOURCE Phragmipedium pearcei
|
127
|
+
ORGANISM Phragmipedium pearcei
|
128
|
+
Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta;
|
129
|
+
Spermatophyta; Magnoliophyta; Liliopsida; Asparagales; Orchidaceae;
|
130
|
+
Cypripedioideae; Phragmipedium.
|
131
|
+
REFERENCE 1
|
132
|
+
AUTHORS Cox,A.V., Pridgeon,A.M., Albert,V.A. and Chase,M.W.
|
133
|
+
TITLE Phylogenetics of the slipper orchids (Cypripedioideae:
|
134
|
+
Orchidaceae): nuclear rDNA ITS sequences
|
135
|
+
JOURNAL Unpublished
|
136
|
+
REFERENCE 2 (bases 1 to 731)
|
137
|
+
AUTHORS Cox,A.V.
|
138
|
+
TITLE Direct Submission
|
139
|
+
JOURNAL Submitted (19-AUG-1996) Cox A.V., Royal Botanic Gardens, Kew,
|
140
|
+
Richmond, Surrey TW9 3AB, UK
|
141
|
+
FEATURES Location/Qualifiers
|
142
|
+
source 1..731
|
143
|
+
/organism="Phragmipedium pearcei"
|
144
|
+
/mol_type="genomic DNA"
|
145
|
+
/db_xref="taxon:53135"
|
146
|
+
misc_feature 1..380
|
147
|
+
/note="internal transcribed spacer 1"
|
148
|
+
gene 381..550
|
149
|
+
/gene="5.8S rRNA"
|
150
|
+
rRNA 381..550
|
151
|
+
/gene="5.8S rRNA"
|
152
|
+
/product="5.8S ribosomal RNA"
|
153
|
+
misc_feature 551..731
|
154
|
+
/note="internal transcribed spacer 2"
|
155
|
+
ORIGIN
|
156
|
+
1 cgtaacaagg tttccgtagg tgaacctgcg gaaggatcat tgttgagacc gccaaatata
|
157
|
+
61 cgatcgagtt aatccggagg accggtgtag tttggtctcc caggggcttt cgccgctgtg
|
158
|
+
121 gtgaccgtga tttgccatcg agcctccttg ggagatttct tgatggcaat tgaacccttg
|
159
|
+
181 gcccggcgca gtttcgcgcc aagtcatatg agatagaacc ggcggagggc gtcgtcctcc
|
160
|
+
241 atggagcggg gagggccggc atgctccgtg cccccccatg aatttttctg acaactctcg
|
161
|
+
301 gcaacggacg taacaaggtt taaatgtgat aagcaggtgt gaattgcaga atcccgtgaa
|
162
|
+
361 ccatcgagtc tttgaacgca agttgcgccc gaggccatca ggttaagggc acgcctgcct
|
163
|
+
421 gggcgttgcg tgctgcatct ctcccattgc taaggttgaa cgggcatact gttcggccgg
|
164
|
+
481 cgcggatgag agtttggccc cttgttcttc ggtgcgatgg gtccaagacc tgggcttttg
|
165
|
+
541 acggtccaaa atccggcaag aggtggacgg acggtggctg cgacagagct gtcgtgcgaa
|
166
|
+
601 tgccctacgt tgtcgttttt gatgggccag aataaatccc ttttgaaccc cattggaggc
|
167
|
+
661 acgtcaaccc aatggggggt gacgggcatt tggttaaccc cggcaagtta aggcacccgt
|
168
|
+
721 taattttagg a
|
169
|
+
//
|
170
|
+
LOCUS Z78508 741 bp DNA linear PLN 30-NOV-2006'
|
22
171
|
|
23
172
|
# ========================================================================= #
|
24
173
|
# === initialize
|
25
174
|
# ========================================================================= #
|
26
175
|
def initialize(
|
27
|
-
commandline_arguments =
|
176
|
+
commandline_arguments = nil,
|
28
177
|
run_already = true
|
29
178
|
)
|
30
179
|
reset
|
31
180
|
set_commandline_arguments(
|
32
181
|
commandline_arguments
|
33
182
|
)
|
183
|
+
menu
|
184
|
+
if block_given?
|
185
|
+
yielded = yield
|
186
|
+
case yielded
|
187
|
+
# ===================================================================== #
|
188
|
+
# === :do_not_report_anything
|
189
|
+
# ===================================================================== #
|
190
|
+
when :do_not_report_anything
|
191
|
+
@internal_hash[:report_the_dataset] = false
|
192
|
+
end
|
193
|
+
end
|
34
194
|
run if run_already
|
35
195
|
end
|
36
196
|
|
37
197
|
# ========================================================================= #
|
38
|
-
# === reset
|
198
|
+
# === reset (reset tag)
|
39
199
|
# ========================================================================= #
|
40
200
|
def reset
|
41
201
|
super()
|
202
|
+
infer_the_namespace
|
203
|
+
# ======================================================================= #
|
204
|
+
# === @internal_hash
|
205
|
+
# ======================================================================= #
|
206
|
+
# @internal_hash = {}
|
207
|
+
# ======================================================================= #
|
208
|
+
# === :work_on_this_file
|
209
|
+
# ======================================================================= #
|
210
|
+
@internal_hash[:work_on_this_file] = nil
|
211
|
+
# ======================================================================= #
|
212
|
+
# === :report_the_dataset
|
213
|
+
# ======================================================================= #
|
214
|
+
@internal_hash[:report_the_dataset] = true
|
215
|
+
# ======================================================================= #
|
216
|
+
# === :n_FASTA_entries_in_the_file
|
217
|
+
#
|
218
|
+
# This variable will keep track how many FASTA entries are in
|
219
|
+
# the genbank file at hand.
|
220
|
+
# ======================================================================= #
|
221
|
+
@internal_hash[:n_FASTA_entries_in_the_file] = 0
|
222
|
+
# ======================================================================= #
|
223
|
+
# === :dataset_from_all_FASTA_entries_as_a_hash
|
224
|
+
#
|
225
|
+
# This hash will contain all the FASTA sequences in the given
|
226
|
+
# genbank file at hand. This constitutes the main dataset of
|
227
|
+
# this clas.
|
228
|
+
# ======================================================================= #
|
229
|
+
@internal_hash[:dataset_from_all_FASTA_entries_as_a_hash] = {}
|
42
230
|
end
|
43
231
|
|
44
232
|
# ========================================================================= #
|
45
|
-
# ===
|
233
|
+
# === menu (menu tag)
|
46
234
|
# ========================================================================= #
|
47
|
-
def
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
235
|
+
def menu(
|
236
|
+
i = commandline_arguments_containing_leading_hyphens?
|
237
|
+
)
|
238
|
+
if i.is_a? Array
|
239
|
+
i.each {|entry| menu(entry) }
|
240
|
+
else
|
241
|
+
case i # (case tag)
|
242
|
+
# ===================================================================== #
|
243
|
+
# === gparser --help
|
244
|
+
# ===================================================================== #
|
245
|
+
when /^-?-?help$/i
|
246
|
+
show_help
|
247
|
+
exit
|
248
|
+
# ===================================================================== #
|
249
|
+
# === gparser --test
|
250
|
+
#
|
251
|
+
# This entry point can be used to test the default TEST_STRING.
|
252
|
+
# ===================================================================== #
|
253
|
+
when /^-?-?test$/i,
|
254
|
+
/^-?-?test(-|_)?string$/i
|
255
|
+
analyse_this_dataset(TEST_STRING)
|
256
|
+
exit
|
59
257
|
end
|
60
|
-
@sequence = dataset
|
61
258
|
end
|
62
259
|
end
|
63
260
|
|
261
|
+
# ========================================================================= #
|
262
|
+
# === work_on_which_file?
|
263
|
+
# ========================================================================= #
|
264
|
+
def work_on_which_file?
|
265
|
+
@internal_hash[:work_on_this_file]
|
266
|
+
end
|
267
|
+
|
268
|
+
# ========================================================================= #
|
269
|
+
# === report_the_dataset?
|
270
|
+
# ========================================================================= #
|
271
|
+
def report_the_dataset?
|
272
|
+
@internal_hash[:report_the_dataset]
|
273
|
+
end
|
274
|
+
|
275
|
+
# ========================================================================= #
|
276
|
+
# === set_work_on_this_file
|
277
|
+
# ========================================================================= #
|
278
|
+
def set_work_on_this_file(
|
279
|
+
i = first_argument?
|
280
|
+
)
|
281
|
+
@internal_hash[:work_on_this_file] = i
|
282
|
+
end
|
283
|
+
|
284
|
+
# ========================================================================= #
|
285
|
+
# === analyse_this_dataset
|
286
|
+
# ========================================================================= #
|
287
|
+
def analyse_this_dataset(dataset)
|
288
|
+
use_this_regex =
|
289
|
+
/ORIGIN[\/\-\.\s0-9a-zA-Z]+VERSION\s*[\.0-9A-Z]+/ # See: https://rubular.com/r/0q7rFIUflX7yzw
|
290
|
+
scanned = dataset.scan(use_this_regex)
|
291
|
+
@internal_hash[:n_FASTA_entries_in_the_file] = scanned
|
292
|
+
discover_the_corresponding_FASTA_entries_from_this_dataset(scanned)
|
293
|
+
consider_reporting_our_findings_to_the_user
|
294
|
+
end; alias determine_dataset analyse_this_dataset # === determine_dataset
|
295
|
+
|
296
|
+
# ========================================================================= #
|
297
|
+
# === dataset?
|
298
|
+
# ========================================================================= #
|
299
|
+
def dataset?
|
300
|
+
@internal_hash[:dataset_from_all_FASTA_entries_as_a_hash]
|
301
|
+
end; alias main_dataset? dataset? # === main_dataset?
|
302
|
+
|
303
|
+
# ========================================================================= #
|
304
|
+
# === sequences?
|
305
|
+
# ========================================================================= #
|
306
|
+
def sequences?
|
307
|
+
dataset?.values
|
308
|
+
end
|
309
|
+
|
64
310
|
# ========================================================================= #
|
65
311
|
# === sequence?
|
66
312
|
# ========================================================================= #
|
67
313
|
def sequence?
|
68
|
-
|
314
|
+
sequences?.first
|
69
315
|
end; alias coding_sequence? sequence? # === coding_sequence?
|
70
316
|
alias cds sequence? # === cds
|
71
317
|
|
318
|
+
# ========================================================================= #
|
319
|
+
# === discover_the_corresponding_FASTA_entries_from_this_dataset
|
320
|
+
# ========================================================================= #
|
321
|
+
def discover_the_corresponding_FASTA_entries_from_this_dataset(i)
|
322
|
+
regex_to_use_for_the_id = /VERSION\s*([\.A-Za-z0-9]+)/
|
323
|
+
if i.is_a? Array
|
324
|
+
i.each {|this_dataset|
|
325
|
+
this_dataset =~ regex_to_use_for_the_id
|
326
|
+
use_this_id = $1.to_s.dup
|
327
|
+
use_this_FASTA_sequence = this_dataset.scan(
|
328
|
+
/^\s*\d{1,100}([\sa-zA-Z]+)/
|
329
|
+
).flatten.join(' ').delete(" \n")
|
330
|
+
use_this_FASTA_sequence.upcase! if UPCASE_THE_SEQUENCE
|
331
|
+
@internal_hash[:dataset_from_all_FASTA_entries_as_a_hash][use_this_id] = use_this_FASTA_sequence
|
332
|
+
}
|
333
|
+
end
|
334
|
+
end
|
335
|
+
|
336
|
+
# ========================================================================= #
|
337
|
+
# === verbose_check_whether_the_file_exists
|
338
|
+
# ========================================================================= #
|
339
|
+
def verbose_check_whether_the_file_exists
|
340
|
+
_ = @internal_hash[:work_on_this_file]
|
341
|
+
if _ and File.exist?(_)
|
342
|
+
true
|
343
|
+
else
|
344
|
+
opnn; e 'No file exists at '+sfile(_)
|
345
|
+
false
|
346
|
+
end
|
347
|
+
end
|
348
|
+
|
349
|
+
# ========================================================================= #
|
350
|
+
# === consider_reporting_our_findings_to_the_user (report tag)
|
351
|
+
# ========================================================================= #
|
352
|
+
def consider_reporting_our_findings_to_the_user
|
353
|
+
if report_the_dataset? and dataset? and !dataset?.empty?
|
354
|
+
main_dataset?.each_pair {|key, value|
|
355
|
+
e steelblue("#{key}:")
|
356
|
+
e lightblue(value)
|
357
|
+
e
|
358
|
+
}
|
359
|
+
end
|
360
|
+
end; alias report consider_reporting_our_findings_to_the_user # === report
|
361
|
+
alias report_the_dataset consider_reporting_our_findings_to_the_user # === report_the_dataset
|
362
|
+
|
363
|
+
# ========================================================================= #
|
364
|
+
# === run (run tag)
|
365
|
+
# ========================================================================= #
|
366
|
+
def run
|
367
|
+
set_work_on_this_file(first_argument?)
|
368
|
+
# ======================================================================= #
|
369
|
+
# First check whether the given file exists or not:
|
370
|
+
# ======================================================================= #
|
371
|
+
if verbose_check_whether_the_file_exists
|
372
|
+
original_dataset = File.read(@internal_hash[:work_on_this_file]) # Just store it completely.
|
373
|
+
if original_dataset.include?('ORIGIN') and original_dataset.include?('VERSION ')
|
374
|
+
analyse_this_dataset(original_dataset)
|
375
|
+
else
|
376
|
+
opnn; e 'No keywords ORIGIN and VERSION were found in this file.'
|
377
|
+
end
|
378
|
+
end
|
379
|
+
end
|
380
|
+
|
381
|
+
# ========================================================================= #
|
382
|
+
# === Bioroebe::GenbankParser[]
|
383
|
+
# ========================================================================= #
|
384
|
+
def self.[](i = '')
|
385
|
+
new(i)
|
386
|
+
end
|
387
|
+
|
72
388
|
end; end
|
73
389
|
|
74
390
|
if __FILE__ == $PROGRAM_NAME
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
391
|
+
alias e puts
|
392
|
+
genbank_parser = Bioroebe::GenbankParser.new(ARGV)
|
393
|
+
# genbank_parser = Bioroebe::GenbankParser.new('/home/Temp/bioroebe/ls_orchid.gbk')
|
394
|
+
e genbank_parser.sequence?
|
395
|
+
# e _.id
|
396
|
+
end # genbankparser *genbank
|
397
|
+
# genbankparser
|
398
|
+
# genbankparser sample_file.genbank
|
399
|
+
# genbankparser --test
|
data/lib/bioroebe/parsers/gff.rb
CHANGED
@@ -68,11 +68,6 @@ module Parser
|
|
68
68
|
|
69
69
|
class GFF < ::Bioroebe::CommandlineApplication # === Bioroebe::Parser::GFF
|
70
70
|
|
71
|
-
# ========================================================================= #
|
72
|
-
# === NAMESPACE
|
73
|
-
# ========================================================================= #
|
74
|
-
NAMESPACE = inspect
|
75
|
-
|
76
71
|
# ========================================================================= #
|
77
72
|
# === INPUT_FILE
|
78
73
|
#
|
@@ -112,10 +107,7 @@ class GFF < ::Bioroebe::CommandlineApplication # === Bioroebe::Parser::GFF
|
|
112
107
|
# ========================================================================= #
|
113
108
|
def reset
|
114
109
|
super()
|
115
|
-
|
116
|
-
# === @namespace
|
117
|
-
# ======================================================================= #
|
118
|
-
@namespace = NAMESPACE
|
110
|
+
infer_the_namespace
|
119
111
|
# ======================================================================= #
|
120
112
|
# === @input_file
|
121
113
|
# ======================================================================= #
|
@@ -19,11 +19,6 @@ module Bioroebe
|
|
19
19
|
|
20
20
|
class ScanForRepeat < ::Bioroebe::CommandlineApplication # === Bioroebe::ScanForRepeat
|
21
21
|
|
22
|
-
# ========================================================================= #
|
23
|
-
# === NAMESPACE
|
24
|
-
# ========================================================================= #
|
25
|
-
NAMESPACE = inspect
|
26
|
-
|
27
22
|
# ========================================================================= #
|
28
23
|
# === initialize
|
29
24
|
# ========================================================================= #
|
@@ -63,6 +58,7 @@ class ScanForRepeat < ::Bioroebe::CommandlineApplication # === Bioroebe::ScanFor
|
|
63
58
|
# ========================================================================= #
|
64
59
|
def reset
|
65
60
|
super()
|
61
|
+
infer_the_namespace
|
66
62
|
# ======================================================================= #
|
67
63
|
# === @n_repeats
|
68
64
|
# ======================================================================= #
|
@@ -21,11 +21,6 @@ class FetchFastaSequenceFromPdb < ::Bioroebe::CommandlineApplication # === Bioro
|
|
21
21
|
|
22
22
|
require 'open-uri'
|
23
23
|
|
24
|
-
# ========================================================================= #
|
25
|
-
# === NAMESPACE
|
26
|
-
# ========================================================================= #
|
27
|
-
NAMESPACE = inspect
|
28
|
-
|
29
24
|
# ========================================================================= #
|
30
25
|
# === URL_FOR_FASTA_ENTRIES_AT_THE_PDB
|
31
26
|
# ========================================================================= #
|
@@ -59,10 +54,7 @@ class FetchFastaSequenceFromPdb < ::Bioroebe::CommandlineApplication # === Bioro
|
|
59
54
|
# ========================================================================= #
|
60
55
|
def reset
|
61
56
|
super()
|
62
|
-
|
63
|
-
# === @namespace
|
64
|
-
# ======================================================================= #
|
65
|
-
@namespace = NAMESPACE
|
57
|
+
infer_the_namespace
|
66
58
|
# ======================================================================= #
|
67
59
|
# === @result
|
68
60
|
# ======================================================================= #
|
@@ -13,11 +13,6 @@ module Bioroebe
|
|
13
13
|
|
14
14
|
class ParsemmCIFFile < ::Bioroebe::CommandlineApplication # === Bioroebe::ParsemmCIFFile
|
15
15
|
|
16
|
-
# ========================================================================= #
|
17
|
-
# === NAMESPACE
|
18
|
-
# ========================================================================= #
|
19
|
-
NAMESPACE = inspect
|
20
|
-
|
21
16
|
# ========================================================================= #
|
22
17
|
# === initialize
|
23
18
|
# ========================================================================= #
|
@@ -44,10 +39,7 @@ class ParsemmCIFFile < ::Bioroebe::CommandlineApplication # === Bioroebe::Parsem
|
|
44
39
|
# ========================================================================= #
|
45
40
|
def reset
|
46
41
|
super()
|
47
|
-
|
48
|
-
# === @namespace
|
49
|
-
# ======================================================================= #
|
50
|
-
@namespace = NAMESPACE
|
42
|
+
infer_the_namespace
|
51
43
|
end
|
52
44
|
|
53
45
|
# ========================================================================= #
|
@@ -114,11 +114,6 @@ module Bioroebe
|
|
114
114
|
|
115
115
|
class ParsePdbFile < ::Bioroebe::CommandlineApplication # === Bioroebe::ParsePdbFile
|
116
116
|
|
117
|
-
# ========================================================================= #
|
118
|
-
# === NAMESPACE
|
119
|
-
# ========================================================================= #
|
120
|
-
NAMESPACE = inspect
|
121
|
-
|
122
117
|
# ========================================================================= #
|
123
118
|
# === DEFAULT_PDB_FILE
|
124
119
|
# ========================================================================= #
|
@@ -171,10 +166,7 @@ class ParsePdbFile < ::Bioroebe::CommandlineApplication # === Bioroebe::ParsePdb
|
|
171
166
|
# ========================================================================= #
|
172
167
|
def reset
|
173
168
|
super()
|
174
|
-
|
175
|
-
# === @namespace
|
176
|
-
# ======================================================================= #
|
177
|
-
@namespace = NAMESPACE
|
169
|
+
infer_the_namespace
|
178
170
|
# ======================================================================= #
|
179
171
|
# === @do_create_a_fasta_file
|
180
172
|
#
|
@@ -994,7 +986,9 @@ class ParsePdbFile < ::Bioroebe::CommandlineApplication # === Bioroebe::ParsePdb
|
|
994
986
|
lightgreen(::Bioroebe.one_to_three(aminoacid_one_letter).upcase)+
|
995
987
|
rev+
|
996
988
|
' - '+
|
997
|
-
steelblue(
|
989
|
+
steelblue(
|
990
|
+
n_occurrences.to_s.rjust(2,' ')
|
991
|
+
)
|
998
992
|
}
|
999
993
|
end
|
1000
994
|
end
|
@@ -248,7 +248,7 @@ module Taxonomy
|
|
248
248
|
# ========================================================================= #
|
249
249
|
def self.project_base_dir?
|
250
250
|
"#{::Bioroebe.project_base_directory?}taxonomy/"
|
251
|
-
end
|
251
|
+
end; self.instance_eval { alias base_dir? project_base_dir? } # === Bioroebe::Taxonomy.base_dir?
|
252
252
|
|
253
253
|
# ========================================================================= #
|
254
254
|
# === Bioroebe::Taxonomy.project_yaml_dir?
|
@@ -0,0 +1 @@
|
|
1
|
+
This directory will contain some python-specific code.
|
Binary file
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import gi
|
2
|
+
#import cairo
|
3
|
+
#from gi.repository import PangoCairo
|
4
|
+
|
5
|
+
gi.require_version("Gtk", "3.0")
|
6
|
+
from gi.repository import Gtk, Gdk, GLib
|
7
|
+
|
8
|
+
gi.require_version('Pango', '1.0')
|
9
|
+
from gi.repository import Pango
|
10
|
+
|
11
|
+
class MyWindow(Gtk.Window):
|
12
|
+
|
13
|
+
def __init__(self):
|
14
|
+
super().__init__(title="Hello World")
|
15
|
+
|
16
|
+
self.set_title("Bioroebe - all in one")
|
17
|
+
self.set_default_size(1400, 800)
|
18
|
+
|
19
|
+
#self.override_font(Pango.FontDescription("Times New Roman Italic 20"))
|
20
|
+
# ^^^ this is deprecated
|
21
|
+
outer_vbox = Gtk.Box.new(Gtk.Orientation.VERTICAL, spacing = 5)
|
22
|
+
|
23
|
+
top_hbox = Gtk.Box.new(Gtk.Orientation.HORIZONTAL, spacing = 5)
|
24
|
+
|
25
|
+
label = Gtk.Label(label="Time: ")
|
26
|
+
label.set_halign(Gtk.Align.END) # Right-align.
|
27
|
+
top_hbox.add(label)
|
28
|
+
outer_vbox.add(top_hbox)
|
29
|
+
|
30
|
+
self.button = Gtk.Button(label="Click Here")
|
31
|
+
self.button.connect("clicked", self.on_button_clicked)
|
32
|
+
outer_vbox.add(self.button)
|
33
|
+
# Bioroebe.return_current_day_month_year()
|
34
|
+
|
35
|
+
self.add(outer_vbox)
|
36
|
+
self.apply_css()
|
37
|
+
|
38
|
+
def apply_css(self):
|
39
|
+
screen = Gdk.Screen.get_default()
|
40
|
+
css_provider = Gtk.CssProvider()
|
41
|
+
try:
|
42
|
+
css_provider.load_from_path('all_in_one.css')
|
43
|
+
context = Gtk.StyleContext()
|
44
|
+
context.add_provider_for_screen(screen, css_provider,
|
45
|
+
Gtk.STYLE_PROVIDER_PRIORITY_USER)
|
46
|
+
except GLib.Error as e:
|
47
|
+
print(f"Error in theme: {e} ")
|
48
|
+
|
49
|
+
def en(self, i = ""):
|
50
|
+
print(i)
|
51
|
+
|
52
|
+
def on_button_clicked(self, widget):
|
53
|
+
self.en("Hello there.")
|
54
|
+
|
55
|
+
win = MyWindow()
|
56
|
+
win.move(0, 0)
|
57
|
+
win.connect("destroy", Gtk.main_quit)
|
58
|
+
win.show_all()
|
59
|
+
Gtk.main()
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import gi
|
2
|
+
|
3
|
+
gi.require_version("Gtk", "3.0")
|
4
|
+
from gi.repository import Gtk
|
5
|
+
|
6
|
+
class MyWindow(Gtk.Window):
|
7
|
+
def __init__(self):
|
8
|
+
super().__init__(title="Hello World")
|
9
|
+
|
10
|
+
self.button = Gtk.Button(label="Click Here")
|
11
|
+
self.button.connect("clicked", self.on_button_clicked)
|
12
|
+
self.add(self.button)
|
13
|
+
|
14
|
+
def on_button_clicked(self, widget):
|
15
|
+
print("Hello World")
|
16
|
+
|
17
|
+
win = MyWindow()
|
18
|
+
win.connect("destroy", Gtk.main_quit)
|
19
|
+
win.show_all()
|
20
|
+
Gtk.main()
|