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.



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

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



194
195
196
# File 'lib/bio/db/gag.rb', line 194

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



206
207
208
209
210
211
212
# File 'lib/bio/db/gag.rb', line 206

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



191
192
193
# File 'lib/bio/db/gag.rb', line 191

def position
  @position
end

#ref_nameObject

The name of the reference sequence where the error was called



188
189
190
# File 'lib/bio/db/gag.rb', line 188

def ref_name
  @ref_name
end