Class: Bioroebe::CommandlineApplication
- Inherits:
-
Base
- Object
- Base
- Bioroebe::CommandlineApplication
show all
- Includes:
- ColoursForBase, CommandlineArguments
- Defined in:
- lib/bioroebe/base/commandline_application/opn.rb,
lib/bioroebe/base/commandline_application/misc.rb,
lib/bioroebe/base/commandline_application/extract.rb,
lib/bioroebe/base/commandline_application/warnings.rb,
lib/bioroebe/base/commandline_application/directory.rb,
lib/bioroebe/base/commandline_application/aminoacids.rb,
lib/bioroebe/base/commandline_application/write_what_into.rb,
lib/bioroebe/base/commandline_application/commandline_application.rb
Overview
Bioroebe::CommandlineApplication
Direct Known Subclasses
AdvancedDotplot, AlignOpenReadingFrames, Alignment, AlphaHelix, AminoacidSubstitution, AnalyseGlycosylationPattern, AnalyseLocalDataset, AutocorrectTheNameOfThisFastaFile, BiolangParser, BlosumParser, CalculateGCContent, CalculateMeltingTemperature, CalculateThePositionSpecificScoringMatrix, Cell, CheckForMismatches, CodonPercentage, CompactFastaFile, Compacter, Compseq, ConsensusSequence, ConvertAminoacidToDNA, CountAmountOfAminoacids, CountAmountOfNucleotides, CreateAnnotationFormat, CreateBatchEntrezFile, CreateRandomAminoacids, DeduceAminoacidSequence, 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, FetchFastaSequenceFromPdb, FindGene, FindLongestSubstring, FindLongestSubstringViaLCSalgorithm, GenbankFlatFileFormatGenerator, GenbankParser, 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, Quiz::ThreeLetterToAminoacid, RGG_Scanner, RNALfoldWrapper, ReportSecondaryStructuresFromThisPdbFile, RestrictionEnzyme, Ruler, ScanForRepeat, Shell, ShowCodonTables, ShowCodonUsage, ShowFastaHeaders, ShowFastaStatistics, ShowHydrophobicity, ShowOrf, ShowThisCodonTable, ShowThisDNASequence, SimpleStringComparer, SimplifyFastaHeader, SplitThisFastaFileIntoChromosomes, StrideParser, Taxonomy::Chart, Taxonomy::Info, Taxonomy::Interactive, Taxonomy::Node, Taxonomy::ParseFasta, UsefulFormulas
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 ========================================================================= #.
-
#opne(i = '') ⇒ Object
# === opne ========================================================================= #.
-
#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 ========================================================================= #.
-
#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 ========================================================================= #.
-
#set_be_verbose(i = true) ⇒ Object
# === set_be_verbose ========================================================================= #.
-
#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.
#commandline_arguments?, #commandline_arguments_that_are_files?, #e, #first?, #first_non_hyphen_argument?, #remove_hyphens_from_the_commandline_arguments, #reset, #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_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?, #file_readlines, #infer_the_namespace, #initialize, #is_on_roebe?, #is_palindrome?, #main_encoding?, #mkdir, #move_file, #mv, #namespace?, #no_file_exists_at, #no_newlines, #project_yaml_directory?, #rds, #register_sigint, #reset, #return_pwd, #return_the_first_line_of_this_file, #word_wrap
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?
259
260
261
262
263
264
265
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 259
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
342
343
344
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 342
def be_silent
@be_verbose = false
end
|
#be_verbose? ⇒ Boolean
Also known as:
verbose?
335
336
337
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 335
def be_verbose?
@be_verbose
end
|
#cat(i) ⇒ Object
162
163
164
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 162
def cat(i)
::Bioroebe.cat(i)
end
|
#ccliner(n_times = :default_n_times) ⇒ Object
366
367
368
369
370
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 366
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.
#
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/bioroebe/base/commandline_application/directory.rb', line 20
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
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 376
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
169
170
171
172
173
174
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 169
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)
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.
#
91
92
93
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 91
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.
#
420
421
422
423
424
425
426
427
428
429
430
431
432
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 420
def colourize_this_dna_sequence(i)
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
#cp(from, to = return_pwd) ⇒ Object
Also known as:
copy
#
cp (cp tag, copy tag)
Copy some files via this method here.
#
249
250
251
252
253
254
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 249
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
23
24
25
|
# File 'lib/bioroebe/base/commandline_application/warnings.rb', line 23
def disable_warnings
$VERBOSE = nil
end
|
#download_dir? ⇒ Boolean
278
279
280
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 278
def download_dir?
::Bioroebe.download_dir?
end
|
#editor? ⇒ Boolean
#
editor?
Which editor we will use.
#
240
241
242
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 240
def editor?
Bioroebe.editor?
end
|
#enable_warnings ⇒ Object
30
31
32
|
# File 'lib/bioroebe/base/commandline_application/warnings.rb', line 30
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.
#
302
303
304
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 302
def esystem(i)
::Bioroebe.esystem(i)
end
|
#
This method can be used to extract an archive, via a hardcoded call to “tar”.
#
17
18
19
20
|
# File 'lib/bioroebe/base/commandline_application/extract.rb', line 17
def (i)
require 'bioroebe/toplevel_methods/extract.rb'
::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.
#
144
145
146
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 144
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.
#
154
155
156
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 154
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.
#
355
356
357
358
359
360
361
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 355
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.
#
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 454
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:
#
229
230
231
232
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 229
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
#only_numbers?(i) ⇒ Boolean
#
only_numbers?
This method will return true if the input consists of only numbers. Otherwise, false will be returned.
#
193
194
195
196
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 193
def only_numbers?(i)
i = i.to_s
i =~ /^\d+$/
end
|
#open_in_browser(this_url) ⇒ Object
Also known as:
open_in_browser_tab
#opne(i = '') ⇒ Object
43
44
45
|
# File 'lib/bioroebe/base/commandline_application/opn.rb', line 43
def opne(i = '')
opnn; erev i
end
|
#opnn(i = namespace?,
, &block) ⇒ Object
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/bioroebe/base/commandline_application/opn.rb', line 28
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.
#
203
204
205
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 203
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.
#
212
213
214
215
216
217
218
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 212
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.
#
441
442
443
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 441
def remove_numbers(i)
return i.delete('[0-9]')
end
|
#remove_trailing_ansii_escape_code(i) ⇒ Object
#
remove_trailing_ansii_escape_code
#
270
271
272
273
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 270
def remove_trailing_ansii_escape_code(i)
return ::Colours.remove_trailing_ansii_escape_code(i) if use_colours?
i
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).
#
133
134
135
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 133
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"]
#
22
23
24
|
# File 'lib/bioroebe/base/commandline_application/aminoacids.rb', line 22
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
#
106
107
108
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 106
def return_cheerful_person
'\\o/'
end
|
#return_chunked_display(i) ⇒ Object
#
return_chunked_display
#
#return_ubiquitin_sequence(i) ⇒ Object
#
return_ubiquitin_sequence
#
#set_be_verbose(i = true) ⇒ Object
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 398
def set_be_verbose(i = true)
case i
when :be_verbose,
:default
i = true
when :be_quiet
i = false
end
@be_verbose = i
end
|
#stop_codons?(i) ⇒ Boolean
#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
113
114
115
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 113
def to_rna(i)
i.tr('T','U')
end
|
#trailing_three_prime(i = '', get_rid_of_spaces = false, use_hyphen = false) ⇒ Object
26
27
28
29
30
31
32
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 26
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
|
#verbose_truth(i) ⇒ Object
#
verbose_truth
Delegate towards the module Bioroebe::VerboseTruth here.
#
498
499
500
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 498
def verbose_truth(i)
::Bioroebe::VerboseTruth[i]
end
|
#was_or_were(i = 1) ⇒ Object
316
317
318
319
320
321
322
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 316
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.
#
182
183
184
185
|
# File 'lib/bioroebe/base/commandline_application/misc.rb', line 182
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.
#