Class: VCF
- Inherits:
-
Mutation::Collection
- Object
- HashTable
- Mutation::Collection
- VCF
- Defined in:
- lib/vcf.rb
Defined Under Namespace
Classes: Genotype, Line, Preamble
Instance Attribute Summary collapse
-
#samples ⇒ Object
readonly
Returns the value of attribute samples.
Attributes inherited from Mutation::Collection
Attributes inherited from HashTable
Instance Method Summary collapse
Methods inherited from Mutation::Collection
#clean_header, #clean_headers, comments, default_sleeve, #initialize, might_have, #required, requires
Methods inherited from HashTable
#<<, #[], #concat, #each, #formatted_header, header_off, header_on, #idx, #idx_keys, #initialize, #inspect, line_class, line_type, #output, #preamble, #sample, #select!, #sort_by!, #sum, #update_index, #use_header?, use_header?, #wrap
Methods included from HashTableAux
Methods included from Printer
Constructor Details
This class inherits a constructor from Mutation::Collection
Instance Attribute Details
#samples ⇒ Object (readonly)
Returns the value of attribute samples.
10 11 12 |
# File 'lib/vcf.rb', line 10 def samples @samples end |
Instance Method Details
#enforce_header ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/vcf.rb', line 42 def enforce_header # kludge for empty vcf with no format line super if header.size > required.size @samples = @header - required - [ :format ] # recover the original sample name from the sleeve new_samples = @samples.map do |s| @sleeve[s].to_sym end @header = @header - @samples + new_samples @samples = new_samples end end |