Class: MuTect::Line

Inherits:
MutationSet::Line show all
Defined in:
lib/mutect.rb

Instance Attribute Summary

Attributes inherited from MutationSet::Line

#invalid, #sample

Instance Method Summary collapse

Methods inherited from MutationSet::Line

alias_key, #copy, #criteria_failed?, #criterion_ok?, #discard_onco, #in_cosmic, #initialize, #inspect, #invalid?, #invalidate!, #key, #long_chrom, #method_missing, #onco, #respond_to?, #short_chrom, #skip_oncotator?, #to_hash, #to_ot, #to_s

Methods included from IntervalList::Interval

#above?, #below?, #center, #clone, #contains?, #dist, #intersect, #intersection_size, #nearest, #overlap, #overlaps?, #size, #strict_diff, #strict_overlap, #strict_union

Constructor Details

This class inherits a constructor from MutationSet::Line

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class MutationSet::Line

Instance Method Details

#end_positionObject



28
29
30
# File 'lib/mutect.rb', line 28

def end_position
  position.to_i + ref_allele.length-1
end

#keep_germline?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/mutect.rb', line 24

def keep_germline?
  !criteria_failed?(self, [ :mutect, :germline ])
end

#keep_somatic?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/mutect.rb', line 21

def keep_somatic?
  !criteria_failed?(self, [ :mutect, :somatic ])
end

#n_depthObject



41
# File 'lib/mutect.rb', line 41

def n_depth; n_alt_count.to_i + n_ref_count.to_i end

#n_var_freqObject



39
# File 'lib/mutect.rb', line 39

def n_var_freq; n_alt_count.to_f / n_depth end

#q0_ratioObject



32
33
34
# File 'lib/mutect.rb', line 32

def q0_ratio
  map_q0_reads.to_f / (t_alt_count.to_i + n_alt_count.to_i)
end

#stopObject



19
# File 'lib/mutect.rb', line 19

def stop; @stop || end_position; end

#stop=(nc) ⇒ Object



20
# File 'lib/mutect.rb', line 20

def stop= nc; @stop = nc; end

#t_depthObject



40
# File 'lib/mutect.rb', line 40

def t_depth; t_alt_count.to_i + t_ref_count.to_i end

#t_var_freqObject



38
# File 'lib/mutect.rb', line 38

def t_var_freq; t_alt_count.to_f / t_depth end

#vf_ratioObject



35
36
37
# File 'lib/mutect.rb', line 35

def vf_ratio
  t_var_freq > 0 ? n_var_freq / t_var_freq : 0
end