dasi.models.MultiPCRProductAlignmentGroup

class dasi.models.MultiPCRProductAlignmentGroup(groupings, query_region, group_type)[source]

Bases: dasi.models.alignment.AlignmentGroupBase

A PCR Product Alignment with redundant forward primer, reverse primer, and template alignments.

Essentially, this represents region of a designed sequence that could be generated from a number of PCR reactions. Each PCR reaction is tracked in the groupings, which is a list of dictionaries with keys ‘fwd’, ‘rev’, ‘template’ and valued by Alignments.

Now, there are alot of ways to produce PCR products.

Initializes a new MultiPCRProductAlignmentGroup. This object represents a region of DNA that can be produced from a number of different forward, reverse, and template DNAs, all producing the same sequence.

Parameters
  • groupings (List[Dict[str, Alignment]]) – dictionary of groupings with the “fwd”, “rev” and “template” keys.

  • query_region (Region) – query region

  • group_type (str) – group type

Methods

get_fwd([index])

Get the forward alignment at the specified index.

get_rev([index])

Get the reverse alignment at the specified index.

get_template([index])

Here we take the intersection of the template.query_region and query region.

iter_templates()

Generator of templates from get_template

prioritize_groupings(indices)

Prioritize groupings by pushing groupings at the given indices into the front of the grouping list.

reindex_groupings(indices)

Reindex the groupings list by index.

size_ok()

Determine if the size of this molecule is ‘acceptable’ from the bounded molecule type.

sub_region(qstart, qend, atype)

Produce a new alignment group with sub-regions of the query region and subject regions at the specified new indicies.

Attributes

query_key

Return the query key associated with the query region.

subject_keys

Return the list of subject keys in this alignment group.

subject_regions

Return the list of subject regions in this alignment group.

__init__(groupings, query_region, group_type)[source]

Initializes a new MultiPCRProductAlignmentGroup. This object represents a region of DNA that can be produced from a number of different forward, reverse, and template DNAs, all producing the same sequence.

Parameters
  • groupings (List[Dict[str, Alignment]]) – dictionary of groupings with the “fwd”, “rev” and “template” keys.

  • query_region (Region) – query region

  • group_type (str) – group type

Methods

__init__(groupings, query_region, group_type)

Initializes a new MultiPCRProductAlignmentGroup.

get_template([index])

Here we take the intersection of the template.query_region and query region.

size_ok()

Determine if the size of this molecule is ‘acceptable’ from the bounded molecule type.

sub_region(qstart, qend, atype)

Produce a new alignment group with sub-regions of the query region and subject regions at the specified new indicies.

Attributes

alignments

meta

name

query_key

Return the query key associated with the query region.

query_region

subject_keys

Return the list of subject keys in this alignment group.

subject_regions

Return the list of subject regions in this alignment group.

type

get_fwd(index=0)[source]

Get the forward alignment at the specified index.

Parameters

index (int) – index of the grouping to access

Return type

Alignment

Returns

alignment

get_rev(index=0)[source]

Get the reverse alignment at the specified index.

Parameters

index (int) – index of the grouping to access

Returns

alignment

get_template(index=0)[source]

Here we take the intersection of the template.query_region and query region. WHY???

Notes this is not the ‘template’ key of the groupings.

Note

The result of this alignment is used in the primer design.

Parameters

index (int) –

Returns

iter_templates()[source]

Generator of templates from get_template

Return type

Generator[Alignment, None, None]

prioritize_groupings(indices)[source]

Prioritize groupings by pushing groupings at the given indices into the front of the grouping list.

Parameters

indices (List[int]) – list of indices to prioritize

Returns

None

property query_key

Return the query key associated with the query region.

Return type

str

reindex_groupings(indices)[source]

Reindex the groupings list by index.

Parameters

indices (List[int]) – list of indices

Returns

None

size_ok()

Determine if the size of this molecule is ‘acceptable’ from the bounded molecule type.

Returns

whether this passes the size requirement of the molecule type.

sub_region(qstart, qend, atype)

Produce a new alignment group with sub-regions of the query region and subject regions at the specified new indicies.

Return type

AlignmentGroupBase

property subject_keys

Return the list of subject keys in this alignment group.

Return type

List[str]

property subject_regions

Return the list of subject regions in this alignment group.

Return type

List[Region]