dasi.models.assembly

Assembly.

Classes

Assembly(nodes, container, …[, do_raise])

Should take in a path, graph, container, seqdb to produce relevant information.

AssemblyNode(index, expandable, type, overhang)

tuple representing a location on a goal sequence

Classes

Assembly(nodes, container, …[, do_raise])

Should take in a path, graph, container, seqdb to produce relevant information.

AssemblyNode(index, expandable, type, overhang)

tuple representing a location on a goal sequence

Functions

_design_primers(template, region, lseq, rseq)

Design primers flanking the specified.

_get_primer_extensions(graph, n1, n2[, cyclic])

Return the left and right primer extensions for the given internal fragment.

class dasi.models.assembly.Assembly(nodes, container, full_assembly_graph, query_key, query, seqdb, do_raise=True)[source]

Bases: collections.abc.Iterable, typing.Generic

Should take in a path, graph, container, seqdb to produce relevant information.

Methods

_head()

Get the ‘first’ ‘A’ node.

_head()[source]

Get the ‘first’ ‘A’ node.

class dasi.models.assembly.AssemblyNode(index, expandable, type, overhang)

Bases: tuple

tuple representing a location on a goal sequence

Methods

_asdict()

Return a new dict which maps field names to their values.

_make(iterable)

Make a new AssemblyNode object from a sequence or iterable

_replace(**kwds)

Return a new AssemblyNode object replacing specified fields with new values

count

Return number of occurrences of value.

Attributes

expandable

Alias for field number 1

index

Alias for field number 0

overhang

Alias for field number 3

type

Alias for field number 2

_asdict()

Return a new dict which maps field names to their values.

classmethod _make(iterable)

Make a new AssemblyNode object from a sequence or iterable

_replace(**kwds)

Return a new AssemblyNode object replacing specified fields with new values

count()

Return number of occurrences of value.

expandable

Alias for field number 1

index

Alias for field number 0

overhang

Alias for field number 3

type

Alias for field number 2

dasi.models.assembly._design_primers(template, region, lseq, rseq, left_overhang=None, right_overhang=None)[source]

Design primers flanking the specified.

Region.. If the region is cyclic and spans the origin, this method will handle the appropriate manipulations to design primers around the origin and restore the locations of the resulting primer pairs.

Parameters
  • template (str) – the template string to design primers

  • region (Region) – region specified to design primers around. Regions are exclusive at their end points (.b parameter)

  • lseq (Optional[str]) – optionally provided left sequence

  • rseq (Optional[str]) – optionally provided right sequence

  • left_overhang (Optional[str]) – optionally provided left overhang sequence of the primer

  • right_overhang (Optional[str]) – optionally provided right overhang sequence of the primer

Return type

Tuple[Dict[int, dict], Dict[str, Any]]

Returns

tuple of pairs and the ‘explain’ dictionary.

dasi.models.assembly._get_primer_extensions(graph, n1, n2, cyclic=True)[source]

Return the left and right primer extensions for the given internal fragment. To get the extensions, we look for the left predecessor edge and get its right_ext or rprimer_right_ext and on the other side the right successor edge and its left_ext or lprimer_left_ext.

Parameters
  • graph (DiGraph) – assembly graph

  • n1 (AssemblyNode) – source node on the graph

  • n2 (AssemblyNode) – end node on the graph

  • cyclic (bool) – whether the

Return type

Tuple[int, int]

Returns

tuple of left and right extensions