Class: Bio::BaseSpace::Variant

Inherits:
Model
  • Object
show all
Defined in:
lib/basespace/model/variant.rb

Overview

Variant model.

Instance Attribute Summary

Attributes inherited from Model

#attributes, #swagger_types

Instance Method Summary collapse

Methods inherited from Model

#get_attr, #method_missing, #set_attr

Constructor Details

#initializeVariant

Create a new Variant instance.



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/basespace/model/variant.rb', line 23

def initialize
  @swagger_types = {
    'CHROM'         => 'str',                 
    'ALT'           => 'str',
    'ID'            => 'list<Str>',
    'SampleFormat'  => 'dict',
    'FILTER'        => 'str',
    'INFO'          => 'dict',
    'POS'           => 'int',
    'QUAL'          => 'int',
    'REF'           => 'str',
  }
  @attributes = {
    'CHROM'         => nil,
    'ALT'           => nil,
    'ID'            => nil,
    'SampleFormat'  => nil,
    'FILTER'        => nil,
    'INFO'          => nil,
    'POS'           => nil,
    'QUAL'          => nil,
    'REF'           => nil,
  }
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Bio::BaseSpace::Model

Instance Method Details

#to_sObject

Return the genomic coordinate and ID of the variant as string.



49
50
51
# File 'lib/basespace/model/variant.rb', line 49

def to_s
  return "Variant - #{get_attr('CHROM')}: #{get_attr('POS')} id=#{get_attr('Id')}"
end