pyprobound.table.Table

class Table(alphabet, left_flank='', right_flank='', left_flank_length=0, right_flank_length=0)

Bases: Dataset[T], Sized, ABC

A generic tensor encoding of a table, should implement flank management.

left_flank

The prepended sequence.

Type:

str

right_flank

The appended sequence.

Type:

str

left_flank_length

The scored length of the left flank.

Type:

int

right_flank_length

The scored length of the right flank.

Type:

int

__init__(alphabet, left_flank='', right_flank='', left_flank_length=0, right_flank_length=0)

Initializes the table.

Parameters:
  • alphabet (Alphabet) – The alphabet used to encode sequences into tensors.

  • left_flank (str) – The prepended sequence.

  • right_flank (str) – The appended sequence.

  • left_flank_length (int) – The scored length of the left flank.

  • right_flank_length (int) – The scored length of the right flank.

Methods

get_setup_string()

A description used when printing the output of an optimizer.

set_flank_length([left, right])

Updates the length of flanks included in sequences.

Attributes

input_shape

The number of elements in the length dimension.

left_flank

The prepended sequence.

left_flank_length

The scored length of the left flank.

max_read_length

The maximum number of finite elements in the length dimension.

min_read_length

The minimum number of finite elements in the length dimension.

right_flank

The appended sequence.

right_flank_length

The scored length of the right flank.

Non-Inherited Members

property left_flank: str

The prepended sequence.

property right_flank: str

The appended sequence.

property left_flank_length: int

The scored length of the left flank.

property right_flank_length: int

The scored length of the right flank.

abstract property input_shape: int

The number of elements in the length dimension.

abstract property min_read_length: int

The minimum number of finite elements in the length dimension.

abstract property max_read_length: int

The maximum number of finite elements in the length dimension.

abstract get_setup_string()

A description used when printing the output of an optimizer.

Return type:

str

abstract set_flank_length(left=0, right=0)

Updates the length of flanks included in sequences.

Parameters:
  • left (int) – The new length of the prepended sequence.

  • right (int) – The new length of the appended sequence.

Return type:

None