Class: Exodb::Variant
- Inherits:
-
Object
- Object
- Exodb::Variant
- Includes:
- GenomeLocationField, Mongoid::Document, Mongoid::Timestamps, Mongoid::Versioning
- Defined in:
- lib/exodb/datamodel/variant.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#add_to_sample(str) ⇒ Object
(also: #add_to_cell)
add this variant to original cell sample.
-
#apply_filter(filter) ⇒ Object
apply filter to the variant the result is kelp in passfilter.
Methods included from GenomeLocationField
#begin, #chromosome, #end, #location_str, #parse_location, #start, #stop
Class Method Details
.from_pileup(pileupline) ⇒ Object
49 50 51 |
# File 'lib/exodb/datamodel/variant.rb', line 49 def self.from_pileup(pileupline) end |
Instance Method Details
#add_to_sample(str) ⇒ Object Also known as: add_to_cell
add this variant to original cell sample
56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/exodb/datamodel/variant.rb', line 56 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 self.oid = "#{self.location_str}:#{sample.first().oid}" end |
#apply_filter(filter) ⇒ Object
apply filter to the variant the result is kelp in passfilter
134 135 136 |
# File 'lib/exodb/datamodel/variant.rb', line 134 def apply_filter(filter) self[:filter] = filter end |