Class: Scaffolder::Region::Unresolved

Inherits:
Scaffolder::Region show all
Defined in:
lib/scaffolder/region/unresolved.rb

Overview

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

Instance Method Summary collapse

Methods inherited from Scaffolder::Region

[], attribute, #entry_type, generate, #raw_sequence, #reverse, #sequence, #start, #stop

Instance Method Details

#lengthInteger

The length of the unresolved region

Parameters:

  • (Integer)

Returns:

  • (Integer)


13
# File 'lib/scaffolder/region/unresolved.rb', line 13

attribute :length

#sequence_hookString

Calculate unresolved region sequence

Returns:

  • (String)

    a string of Ns equal to length attribute

Raises:

  • (CoordinateError)

    if the length attribute is nil



18
19
20
21
# File 'lib/scaffolder/region/unresolved.rb', line 18

def sequence_hook
  raise CoordinateError if length.nil?
  'N' * length
end