Method: VCF::Variant#parse!

Defined in:
lib/exodb/vcf.rb

#parse!(info_attr, format_attr) ⇒ Object



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/exodb/vcf.rb', line 84

def parse!(info_attr, format_attr)
	
	if @str
		splited = str.split(/\s+/)
		@chrom = splited[0]
		@pos = splited[1].to_i
		@id = splited[2]
		@ref = splited[3]
		@alt = splited[4]
		@qual = splited[5]
		@filter = splited[6]
		@info = {}
		parse_info(splited[7], info_attr)
		
		@formats = splited[8].split(/:/)
		@sample_data = []
		splited[9..-1].each {|data| @sample_data.push(parse_format(data, @formats, format_attr))}
		@str = nil
	end
	
end