Module: Bio::Alignment::ArrayExtension

Includes:
EnumerableExtension
Included in:
SequenceArray
Defined in:
lib/bio/alignment.rb

Overview

Bio::Alignment::ArrayExtension is a set of useful methods for multiple sequence alignment. It is designed to be extended to array objects or included in your own classes which inherit Array. (It can also be included in Array, though not recommended.)

It possesses all methods defined in EnumerableExtension. For usage of methods, please refer to EnumerableExtension.

Constant Summary

Constants included from PropertyMethods

PropertyMethods::GAP_CHAR, PropertyMethods::GAP_REGEXP, PropertyMethods::MISSING_CHAR

Instance Attribute Summary

Attributes included from PropertyMethods

#gap_char, #gap_regexp, #missing_char, #seqclass

Instance Method Summary collapse

Methods included from EnumerableExtension

#alignment_collect, #alignment_concat, #alignment_length, #alignment_lstrip!, #alignment_normalize!, #alignment_rstrip!, #alignment_site, #alignment_slice, #alignment_strip!, #alignment_subseq, #alignment_window, #collect_each_site, #consensus_each_site, #consensus_iupac, #consensus_string, #convert_match, #convert_unmatch, #each_site, #each_site_step, #each_window, #match_line, #match_line_amino, #match_line_nuc, #remove_all_gaps!, #seqclass, #sequence_names

Methods included from Output

#__output_phylip_common, #output, #output_clustal, #output_fasta, #output_molphy, #output_msf, #output_phylip, #output_phylipnon, #to_clustal

Methods included from PropertyMethods

#get_all_property, #is_gap?, #set_all_property

Instance Method Details

#each_seq(&block) ⇒ Object

Iterates over each sequences. Yields a sequence.

It works the same as Array#each.



1344
1345
1346
# File 'lib/bio/alignment.rb', line 1344

def each_seq(&block) #:yields: seq
  each(&block)
end

#number_of_sequencesObject

Returns number of sequences in this alignment.



1349
1350
1351
# File 'lib/bio/alignment.rb', line 1349

def number_of_sequences
  self.size
end