-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcnv.rb
More file actions
28 lines (22 loc) · 698 Bytes
/
cnv.rb
File metadata and controls
28 lines (22 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
class Cnv
attr_accessor :chrom, :pos, :gene, :transcript, :type, :var_type, :coding_effect
attr_accessor :g_dna_start, :g_dna_end, :g_nomen, :exon, :allele_freq
attr_accessor :filter, :proband_genotype, :alleles
def initialize
self.alleles = Hash.new
end
def check_genotype(query_sample_id)
genotype_check = false
self.alleles.each_pair do |this_sample_id, this_allele|
if query_sample_id.downcase == this_sample_id.downcase
if (this_allele.gt.eql? './.') || (this_allele.gt.eql? '0/0')
genotype_check = false
else
self.proband_genotype = this_allele.gt
genotype_check = true
end
end
end
return genotype_check
end
end