Sha256: 5765aec117de8581a273c60bcd8c535209da7824265f63c46b891221aac88b61

Contents?: true

Size: 669 Bytes

Versions: 6

Compression:

Stored size: 669 Bytes

Contents

# This class is used to insert unreolved sequence regions in to the genome
# build. The unresolved region is filled with N characters. The example below
# with insert the characters 'NNNNN' into the genome build.
#
#   - unresolved:
#       length: 5
# 
class Scaffolder::Region::Unresolved < Scaffolder::Region

  # The length of the unresolved region
  # @return [Integer]
  # @param [Integer]
  attribute :length

  # Calculate unresolved region sequence
  # @return [String] a string of Ns equal to length attribute
  # @raise [CoordinateError] if the length attribute is nil
  def sequence_hook
    raise CoordinateError if length.nil?
    'N' * length
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
scaffolder-0.5.0 lib/scaffolder/region/unresolved.rb
scaffolder-0.4.4 lib/scaffolder/region/unresolved.rb
scaffolder-0.4.3 lib/scaffolder/region/unresolved.rb
scaffolder-0.4.2 lib/scaffolder/region/unresolved.rb
scaffolder-0.4.1 lib/scaffolder/region/unresolved.rb
scaffolder-0.4.0 lib/scaffolder/region/unresolved.rb