Class: Google::Apis::GenomicsV1::Variant

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/genomics_v1/classes.rb,
generated/google/apis/genomics_v1/representations.rb,
generated/google/apis/genomics_v1/representations.rb

Overview

A variant represents a change in DNA sequence relative to a reference sequence. For example, a variant could represent a SNP or an insertion. Variants belong to a variant set. For more genomics resource definitions, see Fundamentals of Google Genomics Each of the calls on a variant represent a determination of genotype with respect to that variant. For example, a call might assign probability of 0.32 to the occurrence of a SNP named rs1234 in a sample named NA12345. A call belongs to a call set, which contains related calls typically from one sample.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Variant

Returns a new instance of Variant



2159
2160
2161
# File 'generated/google/apis/genomics_v1/classes.rb', line 2159

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#alternate_basesArray<String>

The bases that appear instead of the reference bases. Corresponds to the JSON property alternateBases

Returns:

  • (Array<String>)


2099
2100
2101
# File 'generated/google/apis/genomics_v1/classes.rb', line 2099

def alternate_bases
  @alternate_bases
end

#callsArray<Google::Apis::GenomicsV1::VariantCall>

The variant calls for this particular variant. Each one represents the determination of genotype with respect to this variant. Corresponds to the JSON property calls



2124
2125
2126
# File 'generated/google/apis/genomics_v1/classes.rb', line 2124

def calls
  @calls
end

#createdFixnum

The date this variant was created, in milliseconds from the epoch. Corresponds to the JSON property created

Returns:

  • (Fixnum)


2129
2130
2131
# File 'generated/google/apis/genomics_v1/classes.rb', line 2129

def created
  @created
end

#endFixnum

The end position (0-based) of this variant. This corresponds to the first base after the last base in the reference allele. So, the length of the reference allele is (end - start). This is useful for variants that don't explicitly give alternate bases, for example large deletions. Corresponds to the JSON property end

Returns:

  • (Fixnum)


2118
2119
2120
# File 'generated/google/apis/genomics_v1/classes.rb', line 2118

def end
  @end
end

#filterArray<String>

A list of filters (normally quality filters) this variant has failed. PASS indicates this variant has passed all filters. Corresponds to the JSON property filter

Returns:

  • (Array<String>)


2110
2111
2112
# File 'generated/google/apis/genomics_v1/classes.rb', line 2110

def filter
  @filter
end

#idString

The server-generated variant ID, unique across all variants. Corresponds to the JSON property id

Returns:

  • (String)


2146
2147
2148
# File 'generated/google/apis/genomics_v1/classes.rb', line 2146

def id
  @id
end

#infoHash<String,Array<Object>>

A map of additional variant information. This must be of the form map (string key mapping to a list of string values). Corresponds to the JSON property info

Returns:

  • (Hash<String,Array<Object>>)


2088
2089
2090
# File 'generated/google/apis/genomics_v1/classes.rb', line 2088

def info
  @info
end

#namesArray<String>

Names for the variant, for example a RefSNP ID. Corresponds to the JSON property names

Returns:

  • (Array<String>)


2104
2105
2106
# File 'generated/google/apis/genomics_v1/classes.rb', line 2104

def names
  @names
end

#qualityFloat

A measure of how likely this variant is to be real. A higher value is better. Corresponds to the JSON property quality

Returns:

  • (Float)


2141
2142
2143
# File 'generated/google/apis/genomics_v1/classes.rb', line 2141

def quality
  @quality
end

#reference_basesString

The reference bases for this variant. They start at the given position. Corresponds to the JSON property referenceBases

Returns:

  • (String)


2094
2095
2096
# File 'generated/google/apis/genomics_v1/classes.rb', line 2094

def reference_bases
  @reference_bases
end

#reference_nameString

The reference on which this variant occurs. (such as chr20 or X) Corresponds to the JSON property referenceName

Returns:

  • (String)


2157
2158
2159
# File 'generated/google/apis/genomics_v1/classes.rb', line 2157

def reference_name
  @reference_name
end

#startFixnum

The position at which this variant occurs (0-based). This corresponds to the first base of the string of reference bases. Corresponds to the JSON property start

Returns:

  • (Fixnum)


2135
2136
2137
# File 'generated/google/apis/genomics_v1/classes.rb', line 2135

def start
  @start
end

#variant_set_idString

The ID of the variant set this variant belongs to. Corresponds to the JSON property variantSetId

Returns:

  • (String)


2151
2152
2153
# File 'generated/google/apis/genomics_v1/classes.rb', line 2151

def variant_set_id
  @variant_set_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
# File 'generated/google/apis/genomics_v1/classes.rb', line 2164

def update!(**args)
  @info = args[:info] if args.key?(:info)
  @reference_bases = args[:reference_bases] if args.key?(:reference_bases)
  @alternate_bases = args[:alternate_bases] if args.key?(:alternate_bases)
  @names = args[:names] if args.key?(:names)
  @filter = args[:filter] if args.key?(:filter)
  @end = args[:end] if args.key?(:end)
  @calls = args[:calls] if args.key?(:calls)
  @created = args[:created] if args.key?(:created)
  @start = args[:start] if args.key?(:start)
  @quality = args[:quality] if args.key?(:quality)
  @id = args[:id] if args.key?(:id)
  @variant_set_id = args[:variant_set_id] if args.key?(:variant_set_id)
  @reference_name = args[:reference_name] if args.key?(:reference_name)
end