Class: Bioroebe::CommandlineApplication

Inherits:
Base
  • Object
show all
Includes:
BaseModule, ColoursForBase, CommandlineArguments
Defined in:
lib/bioroebe/base/commandline_application/commandline_application.rb

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

Constants included from ColoursForBase

Bioroebe::ColoursForBase::ARRAY_HTML_COLOURS_IN_USE

Constants inherited from Base

Base::NAMESPACE

Instance Method Summary collapse

Methods included from BaseModule

#absolute_path, #default_file_read, #file_readlines

Methods included from CommandlineArguments

#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

Methods included from ColoursForBase

#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

Methods included from InternalHashModule

#internal_hash?, #reset_the_internal_hash

Methods included from InferTheNamespaceModule

#infer_the_namespace, #namespace?

Constructor Details

This class inherits a constructor from Bioroebe::Base

Instance Method Details

#all_aminoacids?Boolean

#

all_aminoacids?

#

Returns:

  • (Boolean)


77
78
79
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 77

def all_aminoacids?
  ::Bioroebe.all_aminoacids?
end

#append_what_into(what, into) ⇒ Object

#

append_what_into

#


114
115
116
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 114

def append_what_into(what, into)
  ::Bioroebe.append_what_into(what, into)
end

#at_home?Boolean Also known as: is_roebe?

#

at_home?

#

Returns:

  • (Boolean)


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_silentObject Also known as: be_quiet, set_be_silent, set_be_quiet, do_not_be_verbose

#

be_silent

#


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?

#

be_verbose?

#

Returns:

  • (Boolean)


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

#

cat

#


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

#

ccliner

#


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'
  )
  # ======================================================================= #
  # The verbose-flag set next is used to also report the current directory.
  # ======================================================================= #
  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

#

cliner (cliner tag)

#


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
  # ======================================================================= #
  # === :default_n_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_table_dataset?

#

Returns:

  • (Boolean)


217
218
219
220
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 217

def codon_table_dataset?
  require 'bioroebe/codons/codon_table.rb'
  ::Bioroebe.codon_table_dataset?
end

#codon_to_aminoacid(i) ⇒ Object Also known as: nucleotides_to_aminoacid, codons_to_aminoacid

#

codon_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.

#

Returns:

  • (Boolean)


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

#

complement (complement tag)

Usage example:

x = Bioroebe::Sequence.new('ATGGCA').complement # => "TACCGT"
#


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_warningsObject

#

disable_warnings

#


152
153
154
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 152

def disable_warnings
  $VERBOSE = nil
end

#download_dir?Boolean

#

download_dir?

#

Returns:

  • (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.

#

Returns:

  • (Boolean)


393
394
395
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 393

def editor?
  Bioroebe.editor?
end

#enable_warningsObject

#

enable_warnings

#


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_existObject

#

ensure_that_the_base_directory_exists

Common functionality to ensure that the necessary base directories exist on the target computer system.

#


228
229
230
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 228

def ensure_that_the_base_directories_exist
  ::Bioroebe.ensure_that_the_base_directories_exist
end

#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

#extract(i) ⇒ Object

#

extract (extract tag)

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 extract(i)
  ::Bioroebe.extract(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.

#

Returns:

  • (Boolean)


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.

#

Returns:

  • (Boolean)


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 # case tag
  when :agarose
    i = 'agarose/agarose_concentrations.yml'
  end
  # ======================================================================= #
  # Aggregate it together with the BIOROEBE_YAML constant.
  # ======================================================================= #
  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?

#

log_directory?

#

Returns:

  • (Boolean)


461
462
463
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 461

def log_directory?
  ::Bioroebe.log_directory?
end

#one_letter_to_long_name(one_letter_code) ⇒ Object

#

one_letter_to_long_name

The purpose of this method is really simple:

  • Take the one-letter abbreviation of an amino acid, and find the corresponding long name of the aminoacid.

#


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().

#


678
679
680
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 678

def one_to_three(i)
  ::Bioroebe.one_to_three(i)
end

#only_numbers?(i) ⇒ Boolean

#

only_numbers?

This method will return true if the input consists of only numbers. Otherwise, false will be returned.

#

Returns:

  • (Boolean)


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

#

open_in_browser

#


601
602
603
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 601

def open_in_browser(this_url)
  ::Bioroebe.open_in_browser(this_url)
end

#opnerev(i = '') ⇒ Object Also known as: opne

#

opnerev

#


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

#

opnn

#


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

#

partner_nucleotide

#


242
243
244
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 242

def partner_nucleotide(i)
  ::Bioroebe.partner_nucleotide(i)
end

#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

#resetObject

#

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
  # ======================================================================= #
  @commandline_arguments = []
  # ======================================================================= #
  # === :be_verbose
  #
  # By default, CommandlineApplication will report a lot of stuff.
  # ======================================================================= #
  set_be_verbose
  # ======================================================================= #
  # === :use_colours
  # ======================================================================= #
  enable_colours
end

#return_all_possible_start_codonsObject

#

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_aminoacidsObject

#

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_personObject 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

#


479
480
481
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 479

def return_ubiquitin_sequence(i)
  ::Bioroebe.return_ubiquitin_sequence(i)
end

#runmode?Boolean

#

runmode?

#

Returns:

  • (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

#

set_be_verbose

#


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
  # ======================================================================= #
  # === :be_verbose
  # ======================================================================= #
  when :be_verbose,
       :default
    i = true
  # ======================================================================= #
  # === :be_quiet
  # ======================================================================= #
  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

#start_codon?Boolean

#

start_codon?

#

Returns:

  • (Boolean)


287
288
289
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 287

def start_codon?
  ::Bioroebe.start_codon?
end

#stop_codons?(i) ⇒ Boolean

#

stop_codons?

#

Returns:

  • (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

#


235
236
237
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 235

def strict_filter_away_invalid_aminoacids(i)
  ::Bioroebe.strict_filter_away_invalid_aminoacids(i)
end

#taxonomy_download_directory?Boolean

#

taxonomy_download_directory?

#

Returns:

  • (Boolean)


249
250
251
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 249

def taxonomy_download_directory?
  ::Bioroebe.taxonomy_download_directory?
end

#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”.

#


593
594
595
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 593

def three_to_one(i)
  ::Bioroebe.three_to_one(i)
end

#to_rna(i) ⇒ Object

#

to_rna

#


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

#

trailing_three_prime

#


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

#

use_opn?

#

Returns:

  • (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

#

was_or_were

#


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.

#


107
108
109
# File 'lib/bioroebe/base/commandline_application/commandline_application.rb', line 107

def write_what_into(what, into)
  ::Bioroebe.write_what_into(what, into)
end