Class: Bioroebe::Gene
Overview
Constant Summary
Constants inherited
from Sequence
Sequence::REMOVE_INVALID_CHARACTERS, Sequence::SHALL_WE_UPCASE
Instance Method Summary
collapse
Methods inherited from Sequence
[], #automatic_support_for_nucleotides, #description?, #index, #infer_type, #is_DNA?, #is_RNA?, #is_a_protein?, #is_a_protein_now, #map, #n_uracil?, #randomize, #remove_invalid_entries_from_the_dna_sequence, #remove_invalid_entries_from_the_dna_sequence!, #return_string_nucleotides_or_aminoacids, #sanitize_dataset, #sanitize_rna, #save_sequence_to_this_file, sequence_from_file, #set_description, #set_dna, #set_protein, #set_rna, #set_save_file, #set_sequence, #set_type, #shall_we_upcase?, #size?, #to_genbank, #to_regexp, #type?
Methods inherited from RawSequence
#+, #<<, #[]=, #calculate_levensthein_distance, #chars?, #complement, #composition?, #count, #delete, #delete!, #downcase, #each_char, #empty?, #find_substring_indices, #first_position=, #freeze, #gsub, #gsub!, #include?, #insert_at_this_position, #prepend, #remove_n_characters_from_the_left_side, #reverse, #reverse!, #reverse_complement, #scan, #set_raw_sequence, #shuffle, #size?, #split, #start_with?, #strip, #subseq, #to_s, #to_str, #tr!, #upcase!
Constructor Details
#initialize(sequence_to_use = '', optional_use_this_name = nil) ⇒ Gene
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/bioroebe/gene/gene.rb', line 25
def initialize(
sequence_to_use = '',
optional_use_this_name = nil
)
reset
super(sequence_to_use)
if optional_use_this_name
set_name(optional_use_this_name)
end
end
|
Instance Method Details
#name? ⇒ Boolean
56
57
58
|
# File 'lib/bioroebe/gene/gene.rb', line 56
def name?
@hash.fetch :name
end
|
#reset ⇒ Object
39
40
41
42
43
44
|
# File 'lib/bioroebe/gene/gene.rb', line 39
def reset
@hash = {}
end
|
#set_name(i) ⇒ Object
49
50
51
|
# File 'lib/bioroebe/gene/gene.rb', line 49
def set_name(i)
@hash[:name] = i
end
|