Class: Bioroebe::CommandlineApplication
Overview
Bioroebe::CommandlineApplication
Direct Known Subclasses
AdvancedDotplot, AlignOpenReadingFrames, Alignment, AlphaHelix, AminoacidSubstitution, AnalyseGlycosylationPattern, AnalyseLocalDataset, AutocorrectTheNameOfThisFastaFile, BiolangParser, BlosumParser, CalculateBlosumScore, CalculateGCContent, CalculateMeltingTemperature, CalculateMeltingTemperatureForMoreThanThirteenNucleotides, CalculateThePositionSpecificScoringMatrix, Cell, CheckForMismatches, CodonPercentage, CompactFastaFile, Compacter, CompareTheseTwoSequencesViaBlosum, ComplementaryDnaStrand, Compseq, ConsensusSequence, ConvertAminoacidToDNA, ConvertThisCodonToThatAminoacid, CountAmountOfAminoacids, CountAmountOfNucleotides, CreateAnnotationFormat, CreateBatchEntrezFile, CreateRandomAminoacids, DeduceAminoacidSequence, DetermineAntigenicAreas, DetermineMissingNucleotidesPercentage, DetermineOptimalCodons, Digestion, DisplayAminoacidTable, DisplayHowManyFastaEntriesAreInThisDirectory, DisplayOpenReadingFrames, DnaToAminoacidSequence, DotAlignment, DownloadFasta, DownloadFilesFromRebase, DownloadTaxonomyDatabase, ElectronMicroscopy::CoordinateAnalyzer, ElectronMicroscopy::FixPosFile, ElectronMicroscopy::FlipY, ElectronMicroscopy::GenerateEm2emFile, ElectronMicroscopy::ParseCoordinates, ElectronMicroscopy::ReadFileXMD, ElectronMicroscopy::SimpleStarFileGenerator, FastaDefline, FastaToYaml, FastqFormatExplainer, FetchDataFromUniprot, FetchFastaSequenceFromPdb, FindGene, FindLongestSubstring, FindLongestSubstringViaLCSalgorithm, GenbankFlatFileFormatGenerator, GenbankParser, Genome, GenomePattern, GenomeRetriever, HammingDistance, HelixWheel, LengthModifier, Levensthein, MatplotlibGenerator, MirrorRepeat, MostLikelyNucleotideSequenceForThisAminoacidSequence, MoveFileToItsCorrectLocation, Palindrome2DStructure, PalindromeFinder, PalindromeGenerator, ParseEMBL, ParseFasta, ParseFastq, ParseFrequencyTable, ParsePdbFile, ParseTaxonomy, ParsemmCIFFile, Parser::GFF, Pathways, Permutations, PhredQualityScoreTable, PossibleCodonsForThisAminoacid, ProfilePattern, Punnet, Quiz::ThreeLetterToAminoacid, RGG_Scanner, RNALfoldWrapper, ReportSecondaryStructuresFromThisPdbFile, RestrictionEnzyme, Ruler, ScanForRepeat, Shell, Shell::Help, ShowCodonTables, ShowCodonUsage, ShowFastaHeaders, ShowFastaStatistics, ShowHydrophobicity, ShowOrf, ShowRestrictionEnzymes, ShowThisCodonTable, ShowThisDNASequence, SimpleStringComparer, SimplifyFastaHeader, SplitThisFastaFileIntoChromosomes, StrideParser, Taxonomy::Chart, Taxonomy::Info, Taxonomy::Interactive, Taxonomy::Node, Taxonomy::ParseFasta, UsefulFormulas, Virus
Constant Summary
collapse
- OLD_VERBOSE_VALUE =
#
OLD_VERBOSE_VALUE
Keep an old reference to the VERBOSE flag.
#
$VERBOSE
Bioroebe::ColoursForBase::ARRAY_HTML_COLOURS_IN_USE
Constants inherited
from Base
Base::NAMESPACE
Instance Method Summary
collapse
-
#all_aminoacids? ⇒ Boolean
# === all_aminoacids? ========================================================================= #.
-
#append_what_into(what, into) ⇒ Object
# === append_what_into ========================================================================= #.
-
#at_home? ⇒ Boolean
(also: #is_roebe?)
# === at_home? ========================================================================= #.
-
#be_silent ⇒ Object
(also: #be_quiet, #set_be_silent, #set_be_quiet, #do_not_be_verbose)
# === be_silent ========================================================================= #.
-
#be_verbose? ⇒ Boolean
(also: #verbose?)
# === be_verbose? ========================================================================= #.
-
#cat(i) ⇒ Object
# === cat ========================================================================= #.
-
#ccliner(n_times = :default_n_times) ⇒ Object
# === ccliner ========================================================================= #.
-
#change_directory(i = '$HOME') ⇒ Object
(also: #cd)
# === change_directory (cd tag).
-
#cliner(use_this_token = :default_token, how_many_times = :default_n_times, &block) ⇒ Object
# === cliner (cliner tag) ========================================================================= #.
-
#codon_table_dataset? ⇒ Boolean
# === codon_table_dataset? ========================================================================= #.
-
#codon_to_aminoacid(i) ⇒ Object
(also: #nucleotides_to_aminoacid, #codons_to_aminoacid)
# === codon_to_aminoacid ========================================================================= #.
-
#codons_for?(i) ⇒ Boolean
# === codons_for?.
-
#colourize_this_dna_sequence(i) ⇒ Object
(also: #colourize_dna_sequence, #colourize_nucleotides, #colourize_nucleotide_sequence)
# === colourize_this_dna_sequence.
-
#complement(i) ⇒ Object
(also: #return_the_complementary_nucleotide_sequence_to, #complementary_dna_strand, #complementary_dna_sequence)
# === complement (complement tag).
-
#cp(from, to = return_pwd) ⇒ Object
(also: #copy)
# === cp (cp tag, copy tag).
-
#disable_warnings ⇒ Object
# === disable_warnings ========================================================================= #.
-
#download_dir? ⇒ Boolean
# === download_dir? ========================================================================= #.
-
#editor? ⇒ Boolean
# === editor?.
-
#enable_warnings ⇒ Object
# === enable_warnings ========================================================================= #.
-
#ensure_that_the_base_directories_exist ⇒ Object
# === ensure_that_the_base_directory_exists.
-
#esystem(i) ⇒ Object
# === esystem.
-
#extract(i) ⇒ Object
-
#is_this_a_start_codon?(i) ⇒ Boolean
# === is_this_a_start_codon?.
-
#is_this_a_stop_codon?(i) ⇒ Boolean
# === is_this_a_stop_codon?.
-
#leading_five_prime(i = '', get_rid_of_spaces = false, use_hyphen = false) ⇒ Object
# === leading_five_prime.
-
#load_bioroebe_yaml_file(i = :agarose) ⇒ Object
# === load_bioroebe_yaml_file.
-
#log_directory? ⇒ Boolean
(also: #log_dir?)
# === log_directory? ========================================================================= #.
-
#one_letter_to_long_name(one_letter_code) ⇒ Object
# === one_letter_to_long_name.
-
#one_to_three(i) ⇒ Object
# === one_to_three.
-
#only_numbers?(i) ⇒ Boolean
# === only_numbers?.
-
#open_in_browser(this_url) ⇒ Object
(also: #open_in_browser_tab)
# === open_in_browser ========================================================================= #.
-
#opnerev(i = '') ⇒ Object
(also: #opne)
# === opnerev ========================================================================= #.
-
#opnn(i = namespace?, , &block) ⇒ Object
# === opnn ========================================================================= #.
-
#pad_with_double_quotes(i) ⇒ Object
# === pad_with_double_quotes.
-
#pad_with_single_quotes(i) ⇒ Object
# === pad_with_single_quotes.
-
#partner_nucleotide(i) ⇒ Object
(also: #return_dna_match)
# === partner_nucleotide ========================================================================= #.
-
#remove_numbers(i) ⇒ Object
# === remove_numbers.
-
#remove_trailing_ansii_escape_code(i) ⇒ Object
# === remove_trailing_ansii_escape_code ========================================================================= #.
-
#reset ⇒ Object
# === reset.
-
#return_all_possible_start_codons ⇒ Object
# === return_all_possible_start_codons.
-
#return_array_of_one_letter_aminoacids ⇒ Object
# === return_array_of_one_letter_aminoacids.
-
#return_cheerful_person ⇒ Object
(also: #cheerful_person)
# === return_cheerful_person ========================================================================= #.
-
#return_chunked_display(i) ⇒ Object
# === return_chunked_display ========================================================================= #.
-
#return_ubiquitin_sequence(i) ⇒ Object
# === return_ubiquitin_sequence ========================================================================= #.
-
#runmode? ⇒ Boolean
# === runmode? ========================================================================= #.
-
#set_be_verbose(i = true) ⇒ Object
# === set_be_verbose ========================================================================= #.
-
#set_runmode(i = :commandline) ⇒ Object
# === set_runmode.
-
#start_codon? ⇒ Boolean
# === start_codon? ========================================================================= #.
-
#stop_codons?(i) ⇒ Boolean
# === stop_codons? ========================================================================= #.
-
#strict_filter_away_invalid_aminoacids(i) ⇒ Object
# === strict_filter_away_invalid_aminoacids ========================================================================= #.
-
#taxonomy_download_directory? ⇒ Boolean
# === taxonomy_download_directory? ========================================================================= #.
-
#three_to_one(i) ⇒ Object
(also: #three_aminoacid_letter_code_to_one_aminoacid_letter_code, #three_letters_to_one_letter)
# === three_to_one.
-
#to_rna(i) ⇒ Object
# === to_rna ========================================================================= #.
-
#trailing_three_prime(i = '', get_rid_of_spaces = false, use_hyphen = false) ⇒ Object
# === trailing_three_prime ========================================================================= #.
-
#use_opn? ⇒ Boolean
# === use_opn? ========================================================================= #.
-
#verbose_truth(i) ⇒ Object
# === verbose_truth.
-
#was_or_were(i = 1) ⇒ Object
# === was_or_were ========================================================================= #.
-
#without_extname(i) ⇒ Object
# === without_extname.
-
#write_what_into(what, into) ⇒ Object
(also: #save_file)
# === write_what_into.
Methods included from BaseModule
#absolute_path, #default_file_read, #file_readlines
#commandline_arguments?, #commandline_arguments_that_are_files?, #e, #first?, #first_non_hyphen_argument?, #remove_hyphens_from_the_commandline_arguments, #return_commandline_arguments_as_string, #return_commandline_arguments_that_are_not_files, #return_entries_without_two_leading_hyphens, #select_commandline_arguments, #select_entries_starting_with_two_hyphens, #set_commandline_arguments
#colourize_this_aminoacid_sequence_for_the_commandline, #colourize_this_nucleotide_sequence, #disable_colours, #ecomment, #efancy, #egold, #enable_colours, #eorange, #eparse, #erev, #red, #remove_trailing_escape_part, #return_colour_for_nucleotides, #rev, #sdir, #set_will_we_use_colours, #sfancy, #sfile, #simp, #swarn, #use_colours?, #use_colours_within_the_bioroebe_namespace?
Methods inherited from Base
#can_base_pair?, #convert_global_env, #delete_file, #directory_to_the_codon_tables?, #initialize, #is_on_roebe?, #is_palindrome?, #main_encoding?, #mkdir, #move_file, #mv, #no_file_exists_at, #no_newlines, #project_yaml_directory?, #rds, #register_sigint, #return_pwd, #return_the_first_line_of_this_file, #word_wrap
#internal_hash?, #reset_the_internal_hash
#infer_the_namespace, #namespace?
Constructor Details
This class inherits a constructor from Bioroebe::Base
Instance Method Details
#all_aminoacids? ⇒ Boolean
#append_what_into(what, into) ⇒ Object
#at_home? ⇒ Boolean
Also known as:
is_roebe?
412
413
414
415
416
417
418
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 412
def at_home?
if ENV['IS_ROEBE']
true
else
false
end
end
|
#be_silent ⇒ Object
Also known as:
be_quiet, set_be_silent, set_be_quiet, do_not_be_verbose
639
640
641
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 639
def be_silent
@internal_hash[:be_verbose] = false
end
|
#be_verbose? ⇒ Boolean
Also known as:
verbose?
632
633
634
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 632
def be_verbose?
@internal_hash[:be_verbose]
end
|
#cat(i) ⇒ Object
327
328
329
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 327
def cat(i)
::Bioroebe.cat(i)
end
|
#ccliner(n_times = :default_n_times) ⇒ Object
500
501
502
503
504
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 500
def ccliner(
n_times = :default_n_times
)
ee rev; cliner(:default_token, n_times)
end
|
#change_directory(i = '$HOME') ⇒ Object
Also known as:
cd
#
change_directory (cd tag)
Use this to change the directory. The first argument should be the target directory in question.
The second argument means that this method will be verbose.
#
89
90
91
92
93
94
95
96
97
98
99
100
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 89
def change_directory(
i = '$HOME'
)
case i
when ':home', :home
i = :home_directory
end
::Bioroebe.change_directory(i, :be_verbose)
end
|
#cliner(use_this_token = :default_token, how_many_times = :default_n_times, &block) ⇒ Object
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 509
def cliner(
use_this_token = :default_token,
how_many_times = :default_n_times,
&block
)
case how_many_times
when :default_n_times
how_many_times = 80
end
::Bioroebe.cliner(
use_this_token,
how_many_times,
&block
)
end
|
#codon_table_dataset? ⇒ Boolean
#codon_to_aminoacid(i) ⇒ Object
Also known as:
nucleotides_to_aminoacid, codons_to_aminoacid
206
207
208
209
210
211
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 206
def codon_to_aminoacid(i)
unless Bioroebe.respond_to? :codon_to_aminoacid
require 'bioroebe/conversions/dna_to_aminoacid_sequence.rb'
end
::Bioroebe.codon_to_aminoacid(i).to_s
end
|
#codons_for?(i) ⇒ Boolean
#
codons_for?
See documentation for Bioroebe.codons_for? in the file codons.rb, so it belongs to the above require statement.
#
259
260
261
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 259
def codons_for?(i)
::Bioroebe.codons_for?(i)
end
|
#colourize_this_dna_sequence(i) ⇒ Object
Also known as:
colourize_dna_sequence, colourize_nucleotides, colourize_nucleotide_sequence
#
colourize_this_dna_sequence
This method can be used to colourize a DNA sequence.
#
533
534
535
536
537
538
539
540
541
542
543
544
545
546
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 533
def colourize_this_dna_sequence(i)
require 'bioroebe/sequence/sequence.rb'
if i.is_a? ::Bioroebe::Sequence
i = i.to_s
end
_ = ''.dup
if use_colours?
_ << remove_trailing_escape_code(
::Colours.send(USE_THIS_COLOUR_FOR_DNA)
)
end
_ << i
_ << rev if use_colours?
end
|
#complement(i) ⇒ Object
Also known as:
return_the_complementary_nucleotide_sequence_to, complementary_dna_strand, complementary_dna_sequence
443
444
445
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 443
def complement(i)
::Bioroebe.complement(i)
end
|
#cp(from, to = return_pwd) ⇒ Object
Also known as:
copy
#
cp (cp tag, copy tag)
Copy some files via this method here.
#
402
403
404
405
406
407
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 402
def cp(
from, to = return_pwd
)
e "Now copying #{sfile(from.to_s)} to #{sfile(to.to_s)}."
FileUtils.cp(from.to_s, to.to_s)
end
|
#disable_warnings ⇒ Object
152
153
154
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 152
def disable_warnings
$VERBOSE = nil
end
|
#download_dir? ⇒ Boolean
431
432
433
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 431
def download_dir?
::Bioroebe.download_dir?
end
|
#editor? ⇒ Boolean
#
editor?
Which editor we will use.
#
393
394
395
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 393
def editor?
Bioroebe.editor?
end
|
#enable_warnings ⇒ Object
159
160
161
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 159
def enable_warnings
$VERBOSE = OLD_VERBOSE_VALUE
end
|
#ensure_that_the_base_directories_exist ⇒ Object
#
ensure_that_the_base_directory_exists
Common functionality to ensure that the necessary base directories exist on the target computer system.
#
#esystem(i) ⇒ Object
#
esystem
Run an external program - and output the result.
#
454
455
456
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 454
def esystem(i)
::Bioroebe.esystem(i)
end
|
#
This method can be used to extract an archive, via a hardcoded call to “tar”.
#
171
172
173
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 171
def (i)
::Bioroebe.(i)
end
|
#is_this_a_start_codon?(i) ⇒ Boolean
#
is_this_a_start_codon?
Note that the method-call defind in this method will return the start codon as a DNA variant, so the given input should be in the form of DNA rather than RNA.
#
310
311
312
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 310
def is_this_a_start_codon?(i)
::Bioroebe.start_codons?.include? i
end
|
#is_this_a_stop_codon?(i) ⇒ Boolean
#
is_this_a_stop_codon?
Query method to determine whether the given input is a stop codon or whether it is not.
#
320
321
322
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 320
def is_this_a_stop_codon?(i)
::Bioroebe.stop_codons?.include? i
end
|
#leading_five_prime(i = '', get_rid_of_spaces = false, use_hyphen = false) ⇒ Object
#
leading_five_prime
The first argument should be the input sequence; or, alternatively, if you only need the “5’ ” header then you can omit it altogether.
#
489
490
491
492
493
494
495
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 489
def leading_five_prime(
i = '',
get_rid_of_spaces = false,
use_hyphen = false
)
::Bioroebe.leading_five_prime(i, get_rid_of_spaces, use_hyphen)
end
|
#load_bioroebe_yaml_file(i = :agarose) ⇒ Object
#
load_bioroebe_yaml_file
This method can be used to more easily load up a yaml file residing in the main yaml/ directory of Bioroebe.
If a Symbol is passed as input, then this will be assumed to correspond to some existing yaml file there.
#
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 568
def load_bioroebe_yaml_file(
i = :agarose
)
case i when :agarose
i = 'agarose/agarose_concentrations.yml'
end
this_file = "#{yaml_directory?}#{i}"
if File.exist? this_file
return YAML.load_file(this_file)
else
nil
end
end
|
#log_directory? ⇒ Boolean
Also known as:
log_dir?
#one_letter_to_long_name(one_letter_code) ⇒ Object
#
one_letter_to_long_name
The purpose of this method is really simple:
#
383
384
385
386
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 383
def one_letter_to_long_name(one_letter_code)
inverted = AMINO_ACIDS_LONG_NAME_TO_ONE_LETTER.invert
inverted[one_letter_code.upcase]
end
|
#one_to_three(i) ⇒ Object
#
one_to_three
Delegate towards Bioroebe.one_to_three().
#
#only_numbers?(i) ⇒ Boolean
#
only_numbers?
This method will return true if the input consists of only numbers. Otherwise, false will be returned.
#
347
348
349
350
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 347
def only_numbers?(i)
i = i.to_s
i =~ /^\d+$/
end
|
#open_in_browser(this_url) ⇒ Object
Also known as:
open_in_browser_tab
#opnerev(i = '') ⇒ Object
Also known as:
opne
669
670
671
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 669
def opnerev(i = '')
opnn; erev i
end
|
#opnn(i = namespace?,
, &block) ⇒ Object
128
129
130
131
132
133
134
135
136
137
138
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 128
def opnn(
i = namespace?,
&block
)
if use_opn?
if i.is_a? String
i = { namespace: i }
end
Opn.opn(i, &block)
end
end
|
#pad_with_double_quotes(i) ⇒ Object
#
pad_with_double_quotes
Pad the input with “” quotes.
#
357
358
359
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 357
def pad_with_double_quotes(i)
return "\"#{i}\""
end
|
#pad_with_single_quotes(i) ⇒ Object
#
pad_with_single_quotes
Pad the input with ” quotes, unless it has them already.
#
366
367
368
369
370
371
372
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 366
def pad_with_single_quotes(i)
_ = ''.dup
_ << "'"
_ << i.to_s.delete("'")
_ << "'"
return _
end
|
#partner_nucleotide(i) ⇒ Object
Also known as:
return_dna_match
#remove_numbers(i) ⇒ Object
#
remove_numbers
This method will chop off numbers.
#
555
556
557
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 555
def remove_numbers(i)
return i.delete('[0-9]')
end
|
#remove_trailing_ansii_escape_code(i) ⇒ Object
#
remove_trailing_ansii_escape_code
#
423
424
425
426
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 423
def remove_trailing_ansii_escape_code(i)
return ::Colours.remove_trailing_ansii_escape_code(i) if use_colours?
i
end
|
#reset ⇒ Object
#
reset
We only define two instance variables here.
#
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 39
def reset
super()
reset_the_internal_hash
infer_the_namespace
@commandline_arguments = []
set_be_verbose
enable_colours
end
|
#return_all_possible_start_codons ⇒ Object
#
return_all_possible_start_codons
This method will return all possible start codons. The code itself is defined in the file “bioroebe/codons/start_codons.rb”, so the method here is grouped with the above .rb file (the require statement above here).
#
299
300
301
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 299
def return_all_possible_start_codons
::Bioroebe.start_codons?
end
|
#return_array_of_one_letter_aminoacids ⇒ Object
#
return_array_of_one_letter_aminoacids
This method will return a sorted Array of the one-letter aminoacids.
Specifically, this may look like this:
["A","C","D","E","F","G","H","I","K","L","M","N",
"O","P","Q","R","S","T","U","V","W","Y"]
#
70
71
72
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 70
def return_array_of_one_letter_aminoacids
AMINO_ACIDS_LONG_NAME_TO_ONE_LETTER.values.sort
end
|
#return_cheerful_person ⇒ Object
Also known as:
cheerful_person
#
return_cheerful_person
#
273
274
275
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 273
def return_cheerful_person
'\\o/'
end
|
#return_chunked_display(i) ⇒ Object
#
return_chunked_display
#
266
267
268
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 266
def return_chunked_display(i)
::Bioroebe.chunked_display(i)
end
|
#return_ubiquitin_sequence(i) ⇒ Object
#
return_ubiquitin_sequence
#
#runmode? ⇒ Boolean
625
626
627
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 625
def runmode?
@internal_hash[:runmode]
end
|
#set_be_verbose(i = true) ⇒ Object
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 649
def set_be_verbose(i = true)
case i
when :be_verbose,
:default
i = true
when :be_quiet
i = false
end
@internal_hash[:be_verbose] = i
end
|
#set_runmode(i = :commandline) ⇒ Object
#
set_runmode
Three runmodes are allowed here:
:GUI
:commandline
:www
:www is for use in cgi and similar world wide web settings.
#
616
617
618
619
620
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 616
def set_runmode(
i = :commandline
)
@internal_hash[:runmode] = i
end
|
#stop_codons?(i) ⇒ Boolean
189
190
191
192
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 189
def stop_codons?(i)
require 'bioroebe/codons/codons.rb'
::Bioroebe.stop_codons?(i)
end
|
#strict_filter_away_invalid_aminoacids(i) ⇒ Object
#
strict_filter_away_invalid_aminoacids
#
#taxonomy_download_directory? ⇒ Boolean
#
taxonomy_download_directory?
#
#three_to_one(i) ⇒ Object
Also known as:
three_aminoacid_letter_code_to_one_aminoacid_letter_code, three_letters_to_one_letter
#
three_to_one
This method will “convert” from the three-letter amino acid code to the one-letter amino acid code. So, for instance, “Lys” will become “L”.
#
#to_rna(i) ⇒ Object
280
281
282
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 280
def to_rna(i)
i.tr('T','U')
end
|
#trailing_three_prime(i = '', get_rid_of_spaces = false, use_hyphen = false) ⇒ Object
178
179
180
181
182
183
184
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 178
def trailing_three_prime(
i = '',
get_rid_of_spaces = false,
use_hyphen = false
)
::Bioroebe.trailing_three_prime(i, get_rid_of_spaces, use_hyphen)
end
|
#use_opn? ⇒ Boolean
121
122
123
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 121
def use_opn?
::Bioroebe.use_opn?
end
|
#verbose_truth(i) ⇒ Object
#
verbose_truth
Delegate towards the module Bioroebe::VerboseTruth here.
#
199
200
201
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 199
def verbose_truth(i)
::Bioroebe::VerboseTruth[i]
end
|
#was_or_were(i = 1) ⇒ Object
468
469
470
471
472
473
474
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 468
def was_or_were(i = 1)
if i == 1
'was'
else
'were'
end
end
|
#without_extname(i) ⇒ Object
#
without_extname
This method will return a filename without the extname.
#
336
337
338
339
|
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 336
def without_extname(i)
_ = File.extname(i)
return i.gsub(/#{_}/, '')
end
|
#write_what_into(what, into) ⇒ Object
Also known as:
save_file
#
write_what_into
This method can be used to write into a (local) file.
#