Class: Mutation::Record

Inherits:
HashTable::HashLine show all
Includes:
GenomicLocus, Filtering
Defined in:
lib/oncotator.rb,
lib/mutation_set.rb

Direct Known Subclasses

Maf::Line, MuTect::Line, VCF::Line

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Filtering

#criteria_failed?, #criterion_ok?

Methods included from GenomicLocus

#default_stop, #loc, #long_chrom, #range, #short_chrom

Methods included from IntervalList::Interval

#above?, #below?, #center, #clone, #contains?, #diff, #dist, #intersect, #overlaps?, #size, #union

Methods inherited from HashTable::HashLine

#[], #[]=, alias_key, #approve!, #format_column, #invalid?, #invalidate!, #method_missing, #respond_to_missing?, #set_table, #to_s, #update

Constructor Details

#initialize(h, table) ⇒ Record

Returns a new instance of Record.



88
89
90
91
# File 'lib/mutation_set.rb', line 88

def initialize h, table
  super h, table
  @muts = []
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class HashTable::HashLine

Instance Attribute Details

#mutsObject (readonly)

Returns the value of attribute muts.



87
88
89
# File 'lib/mutation_set.rb', line 87

def muts
  @muts
end

Instance Method Details

#copyObject



83
84
85
# File 'lib/mutation_set.rb', line 83

def copy
  self.class.new @hash.clone, @table
end

#mutObject



93
94
95
# File 'lib/mutation_set.rb', line 93

def mut
  @muts.first
end

#skip_oncotator?(criteria = nil) ⇒ Boolean

Returns:

  • (Boolean)


147
148
149
# File 'lib/oncotator.rb', line 147

def skip_oncotator? criteria=nil
  return true if !mut.onco || mut.onco.empty? || criteria_failed?(mut.onco, criteria || :oncotator)
end