dasi.models.assembly¶
Assembly.
Classes
|
Should take in a path, graph, container, seqdb to produce relevant information. |
|
tuple representing a location on a goal sequence |
Classes
|
Should take in a path, graph, container, seqdb to produce relevant information. |
|
tuple representing a location on a goal sequence |
Functions
|
Design primers flanking the specified. |
|
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.
-
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
Return number of occurrences of value.
Attributes
Alias for field number 1
Alias for field number 0
Alias for field number 3
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 primersregion (
Region
) – region specified to design primers around. Regions are exclusive at their end points (.b parameter)lseq (
Optional
[str
]) – optionally provided left sequencerseq (
Optional
[str
]) – optionally provided right sequenceleft_overhang (
Optional
[str
]) – optionally provided left overhang sequence of the primerright_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 graphn1 (
AssemblyNode
) – source node on the graphn2 (
AssemblyNode
) – end node on the graphcyclic (
bool
) – whether the
- Return type
Tuple
[int
,int
]- Returns
tuple of left and right extensions