Class: Bio::Gag

Inherits:
Object
  • Object
show all
Defined in:
lib/bio/db/gag.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(position, gagging_pileups, ref_name) ⇒ Gag

Returns a new instance of Gag.



211
212
213
214
215
# File 'lib/bio/db/gag.rb', line 211

def initialize(position, gagging_pileups, ref_name)
  @position = position
  @gagging_pileups = gagging_pileups
  @ref_name = ref_name
end

Instance Attribute Details

#gagging_pileupsObject

Bio::DB::Pileup objects around the GAG error



206
207
208
# File 'lib/bio/db/gag.rb', line 206

def gagging_pileups
  @gagging_pileups
end

#inserted_baseObject

The base to be inserted. May be manually specified in @inserted_base, otherwise it is the ref_base derived from @gagging_pileups at the inserted position



218
219
220
221
222
223
224
# File 'lib/bio/db/gag.rb', line 218

def inserted_base
  if @inserted_base.nil?
    @gagging_pileups[1].ref_base
  else
    @inserted_base
  end
end

#positionObject

Position in the reference sequence where the error was called



203
204
205
# File 'lib/bio/db/gag.rb', line 203

def position
  @position
end

#ref_nameObject

The name of the reference sequence where the error was called



200
201
202
# File 'lib/bio/db/gag.rb', line 200

def ref_name
  @ref_name
end