Method: Exodb::Utils.load_indel_from_csv

Defined in:
lib/exodb/rositza/load.rb

.load_indel_from_csv(csvfile) ⇒ Object



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/exodb/rositza/load.rb', line 59

def load_indel_from_csv(csvfile)
	
	CSV.read(csvfile, col_sep: "\t", headers: true).each do |record|
		
		var = Exodb::Variant.new()
		var.location=("#{record["chr"]}:#{record["pos"]}")
		#var.reference = record["Reference Genotype"]
		var.alternatet = ['-2N']
		var.somstatus = record["Somatic Status"].downcase
		var.passfilter = true
		#var.pileupt = record["Reads"]
		var.predicted_damage = true
		var.temp = {} if var.temp.blank?
		var.temp['aachange'] = "#{record["symbol"]}:InDel"
		var.add_to_sample(record["cell lines"])
		p var.save!
	end
end