96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
# File 'lib/exodb/rositza/load.rb', line 96
def load_variant_from_merge(mergefile, normal = false, assembly = Exodb::DEFAULTASSEMBLY)
File.open(mergefile).each do |line|
record = line.chomp.split("\t")
= record[0..15]
list = record[16..-1]
until list.empty?
if normal
snv = Exodb::Variant.where(oid: "#{[2]}:#{[3]}:#{assembly}:#{sampledata[0]}").first
snv.pileupn = sampledata[6] if snv != nil
else
sampledata = list.shift(7)
snv = Exodb::Variant.new()
snv.location=("#{[2]}:#{[3]}:#{assembly}")
snv.reference = [10]
snv.pileupt = sampledata[6]
snv.temp = {} if snv.temp.blank?
snv.add_to_sample(sampledata[0])
p snv.save!
end
end
end
end
|