Class: Bioroebe::RNALfoldWrapper
Overview
Bioroebe::RNALfoldWrapper
Constant Summary
collapse
- NAMESPACE =
inspect
- START_VALUE =
#
START_VALUE
This is the start value for L.
#
150
- UP_TO =
500
CommandlineApplication::OLD_VERBOSE_VALUE
ColoursForBase::ARRAY_HTML_COLOURS_IN_USE
Instance Method Summary
collapse
#all_aminoacids?, #append_what_into, #at_home?, #be_silent, #be_verbose?, #cat, #ccliner, #change_directory, #cliner, #codon_table_dataset?, #codon_to_aminoacid, #codons_for?, #colourize_this_dna_sequence, #complement, #cp, #disable_warnings, #download_dir?, #editor?, #enable_warnings, #ensure_that_the_base_directories_exist, #esystem, #extract, #is_this_a_start_codon?, #is_this_a_stop_codon?, #leading_five_prime, #load_bioroebe_yaml_file, #log_directory?, #one_letter_to_long_name, #one_to_three, #only_numbers?, #open_in_browser, #opne, #opnn, #pad_with_double_quotes, #pad_with_single_quotes, #partner_nucleotide, #remove_numbers, #remove_trailing_ansii_escape_code, #return_all_possible_start_codons, #return_array_of_one_letter_aminoacids, #return_cheerful_person, #return_chunked_display, #return_ubiquitin_sequence, #set_be_verbose, #start_codon?, #stop_codons?, #strict_filter_away_invalid_aminoacids, #taxonomy_download_directory?, #three_to_one, #to_rna, #trailing_three_prime, #use_opn?, #verbose_truth, #was_or_were, #without_extname, #write_what_into
#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_use_colours, #sfancy, #sfile, #simp, #swarn, #use_colours?, #use_colours_within_the_bioroebe_namespace?
Methods inherited from Base
#append_what_into, #can_base_pair?, #convert_global_env, #delete_file, #directory_to_the_codon_tables?, #file_readlines, #infer_the_namespace, #is_on_roebe?, #is_palindrome?, #main_encoding?, #mkdir, #move_file, #mv, #namespace?, #no_file_exists_at, #no_newlines, #project_yaml_directory?, #rds, #register_sigint, #return_pwd, #return_the_first_line_of_this_file, #word_wrap, #write_what_into
Constructor Details
#initialize(commandline_arguments = ARGV, run_already = true) ⇒ RNALfoldWrapper
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/bioroebe/viennarna/rnafold_wrapper.rb', line 38
def initialize(
commandline_arguments = ARGV,
run_already = true
)
reset
set_commandline_arguments(
commandline_arguments
)
run if run_already
end
|
Instance Method Details
#array_cmds? ⇒ Boolean
Also known as:
main_array?
123
124
125
|
# File 'lib/bioroebe/viennarna/rnafold_wrapper.rb', line 123
def array_cmds?
@array_cmds
end
|
#determine_log_filename ⇒ Object
#
determine_log_filename
This method should return the log filename.
#
149
150
151
152
153
154
155
156
|
# File 'lib/bioroebe/viennarna/rnafold_wrapper.rb', line 149
def determine_log_filename
_ = @target_directory.dup
if use_zscore?
_ << "_zscore_value_of_#{zscore_value?}"
end
_ << '.log'
_
end
|
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
# File 'lib/bioroebe/viennarna/rnafold_wrapper.rb', line 104
def (
i = @commandline_arguments
)
if i.is_a? Array
i.each {|entry| (entry) }
else
case i when /^-?-?run$/
@also_run_these_commands = true
end
end
end
|
#report_where_the_commands_will_be_stored_and_store_them ⇒ Object
#
report_where_the_commands_will_be_stored_and_store_them
#
137
138
139
140
141
142
|
# File 'lib/bioroebe/viennarna/rnafold_wrapper.rb', line 137
def report_where_the_commands_will_be_stored_and_store_them
_ = determine_log_filename
opnn; e "These commands will be stored in the file `#{sfile(_)}`."
what = main_array?.join(N)
write_what_into(what, _)
end
|
#reset ⇒ Object
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# File 'lib/bioroebe/viennarna/rnafold_wrapper.rb', line 52
def reset
super()
@namespace = NAMESPACE
@target_directory = 'cdna'
@target_directory = 'ncrna'
@use_zscore = true
@use_this_zscore_value = -2.5 @use_this_chromosome_number = 15 @array_cmds = []
@also_run_these_commands = false
end
|
#run ⇒ Object
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
# File 'lib/bioroebe/viennarna/rnafold_wrapper.rb', line 161
def run
START_VALUE.step(UP_TO, 50) {|index|
cmd_to_run = "RNALfold ".dup
if @use_zscore
cmd_to_run << "--zscore=#{@use_this_zscore_value} "
end
cmd_to_run << "-L #{index} < "\
"#{@target_directory}/#{@target_directory}.#{@use_this_chromosome_number}.fa "\
"> "
name_of_the_output_file = "#{@target_directory}/#{@target_directory}.#{@use_this_chromosome_number}.fa.".dup
if use_zscore?
name_of_the_output_file << "zscore_value_of_#{@use_this_zscore_value}___"
end
name_of_the_output_file << "L-value-used-was___#{index}.lfold"
cmd_to_run << name_of_the_output_file
e cmd_to_run
@array_cmds << cmd_to_run
}
report_where_the_commands_will_be_stored_and_store_them
if @also_run_these_commands
opnn; e 'These commands will also be run next.'
@array_cmds.each {|entry| esystem entry }
end
end
|
#use_this_zscore_value? ⇒ Boolean
Also known as:
zscore_value?
#
use_this_zscore_value?
#
97
98
99
|
# File 'lib/bioroebe/viennarna/rnafold_wrapper.rb', line 97
def use_this_zscore_value?
@use_this_zscore_value
end
|
#use_zscore? ⇒ Boolean
130
131
132
|
# File 'lib/bioroebe/viennarna/rnafold_wrapper.rb', line 130
def use_zscore?
@use_zscore
end
|