class MutantAllele
Used for tracking mutations appearing more than once and cacheing VEP lookups
Attributes
previous_lookups[RW]
count[RW]
example[RW]
mutations[RW]
seq[RW]
Public Class Methods
new(mutations: nil, count: 0, example: nil, seq: nil)
click to toggle source
# File lib/bio-sam-mutation/bio/mutantallele.rb, line 9 def initialize (mutations: nil, count: 0, example: nil, seq: nil) @mutations = mutations @count = count @example = example end
Public Instance Methods
lookup(species="human", ref_type=nil)
click to toggle source
Returns JSON from Ensembl VEP
# File lib/bio-sam-mutation/bio/mutantallele.rb, line 16 def lookup species="human", ref_type=nil key = mutations.to_hgvs(ref_type) if key && (MutantAllele.previous_lookups.keys.include? key) MutantAllele.previous_lookups[key] else mutations.vep(species,ref_type) end end