Repository navigation
Expand file tree
/
Copy pathadapters.py
More file actions
38 lines (23 loc) · 1.38 KB
/
Copy pathadapters.py
File metadata and controls
38 lines (23 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""Contracts implemented by the Biology and SnapGene component owners."""
from __future__ import annotations
from typing import Protocol
from .models import ConstructRef, ConstructSummary, ValidationResult
class BiologyService(Protocol):
def read_construct(self, construct: ConstructRef) -> ConstructSummary: ...
def replace_region(
self, construct: ConstructRef, *, target: str, replacement_sequence: str, replacement_name: str | None
) -> ConstructRef: ...
def gibson_assemble(
self, fragments: list[ConstructRef], *, overlaps: list[int], name: str,
circular: bool = True, min_overlap: int = 15,
) -> ConstructRef: ...
def add_annotation(
self, construct: ConstructRef, *, name: str, feature_type: str, start: int, end: int, strand: int
) -> ConstructRef: ...
def find_restriction_sites(self, construct: ConstructRef, *, enzyme: str) -> list[dict]: ...
def validate_construct(self, construct: ConstructRef) -> ValidationResult: ...
def save_construct(self, construct: ConstructRef, *, output_path: str, output_format: str) -> ConstructRef: ...
class SnapGeneService(Protocol):
def convert(self, construct: ConstructRef, *, output_path: str) -> ConstructRef: ...
def render_map(self, construct: ConstructRef, *, output_path: str, size: int = 1200) -> str: ...
def open(self, construct: ConstructRef) -> None: ...