Class: Maf::Line
- Inherits:
-
Mutation::Record
- Object
- HashTable::HashLine
- Mutation::Record
- Maf::Line
- Defined in:
- lib/maf.rb
Instance Attribute Summary
Attributes inherited from Mutation::Record
Instance Method Summary collapse
- #alt ⇒ Object
- #gene_name ⇒ Object
-
#initialize(h, table) ⇒ Line
constructor
A new instance of Line.
- #method_missing(sym, *args, &block) ⇒ Object
- #respond_to_missing?(sym, include_all = false) ⇒ Boolean
Methods inherited from Mutation::Record
Methods included from Mutation::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!, #set_table, #to_s, #update
Constructor Details
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args, &block) ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/maf.rb', line 68 def method_missing sym, *args, &block if sym == :ref_count [ :t_ref_count, :tumor_ref_count ].each do |s| return send(s) if respond_to? s end nil elsif sym == :alt_count [ :t_alt_count, :tumor_alt_count ].each do |s| return send(s) if respond_to? s end nil else super end end |
Instance Method Details
#alt ⇒ Object
55 56 57 |
# File 'lib/maf.rb', line 55 def alt tumor_seq_allele1 == reference_allele ? tumor_seq_allele2 : tumor_seq_allele1 end |
#gene_name ⇒ Object
84 85 86 87 88 89 90 |
# File 'lib/maf.rb', line 84 def gene_name if !hugo_symbol || hugo_symbol.size == 0 onco.txp_gene else hugo_symbol end end |
#respond_to_missing?(sym, include_all = false) ⇒ Boolean
64 65 66 |
# File 'lib/maf.rb', line 64 def respond_to_missing? sym, include_all = false [ :ref_count, :alt_count ].include?(sym) || super end |