class Exodb::Variant

Public Instance Methods

add_to_cell(str)
Alias for: add_to_sample
add_to_sample(str) click to toggle source

add this variant to original cell sample

@param [String] oid

# File lib/exodb/datamodel/variant.rb, line 54
def add_to_sample(str)
        
        sample = Cell.where({'oid' => str})
        
        if sample.exists?
                self.cell = sample.first()
                #output.puts "#EXODB:INFO This sample is added to #{dataset.first().name}." if $0 == 'pry'
        else
                #output.puts "#EXODB:ERRO Cannot find dataset by #{str}." if $0 == 'pry'
        end
        
end
Also aliased as: add_to_cell
alternate() click to toggle source
# File lib/exodb/datamodel/variant.rb, line 78
def alternate
        return self[:genotypet] - [self[:reference]]
end
apply_filter(filter) click to toggle source

apply filter to the variant the result is kelp in passfilter

@param [String] pile-up line from mpileup

# File lib/exodb/datamodel/variant.rb, line 74
def apply_filter(filter)
        self[:filter] = filter
end

Protected Instance Methods

update_oid() click to toggle source
# File lib/exodb/datamodel/variant.rb, line 84
def update_oid
        self.oid = "#{self.location_str}:#{self.location['assembly']}:#{self.cell.oid}"
end