dasi.design.Design

class dasi.design.Design(span_cost=None, seqdb=None, name='')[source]

Bases: dasi.design.designabc.DesignABC

Parameters
  • span_cost (SpanCost) –

  • seqdb (dict) –

Methods

_optimize(n_paths)

Finds the optimal paths for each query in the design.

_run(n_paths, post_processing_kwargs)

Run the design.

add_fragments(fragments)

Add fragment sequences to materials list.

add_primers(primers)

Add primer sequences to materials list.

add_queries(queries)

Add goal/query sequences to materials list.

add_templates(templates)

Add template sequences to materials list.

assemble_graphs([query_keys])

Assemble all assembly graphs for all queries in this design.

compile([post_process_kwargs])

Compile the materials list into assembly graphs.

filter_linear_records(records)

Return only linear records.

filter_perfect_subject(results)

return only results whose subject is 100% aligned to query.

out([fmt, elim_extra_reactions, query_keys])

Return the results of the design as a validates output JSON.

out_jsonschema()

Return the output JSONschema.

Attributes

container_list

List of alignment containers in this design.

containers

Iterable of alignment containers in this design.

is_compiled

Return whether the design has been compiled.

query_keys

List of query keys in this design.

status

Return the statuses for each subdesign.

__init__(span_cost=None, seqdb=None, name='')
Parameters
  • span_cost (SpanCost) –

  • seqdb (dict) –

Methods

__init__([span_cost, seqdb, name])

param span_cost

add_fragments(fragments)

Add fragment sequences to materials list.

add_materials(primers, templates, queries[, …])

add_primers(primers)

Add primer sequences to materials list.

add_queries(queries)

Add goal/query sequences to materials list.

add_templates(templates)

Add template sequences to materials list.

assemble_graphs([query_keys])

Assemble all assembly graphs for all queries in this design.

compile([post_process_kwargs])

Compile the materials list into assembly graphs.

fake(circular, n_cyclic_seqs, n_linear_seqs, …)

filter_linear_records(records)

Return only linear records.

filter_perfect_subject(results)

return only results whose subject is 100% aligned to query.

optimize([n_paths])

rtype

Dict[str, DesignResult]

out([fmt, elim_extra_reactions, query_keys])

Return the results of the design as a validates output JSON.

path_to_edge_costs(path, graph)

rtype

List[Tuple[AssemblyNode, AssemblyNode, dict]]

post_process_graphs([post_processor_kwargs])

report()

run([n_paths, post_processing_kwargs, …])

to_df([assembly_index])

rtype

Tuple[DataFrame, DataFrame]

Attributes

ALGORITHM

DEFAULT_N_ASSEMBLIES

DEFAULT_N_JOBS

FRAGMENTS

PRIMERS

QUERIES

TEMPLATES

container_list

List of alignment containers in this design.

containers

Iterable of alignment containers in this design.

is_compiled

Return whether the design has been compiled.

last_compile_end

last_compile_start

last_run_end

last_run_start

metadata

query_keys

List of query keys in this design.

results

seqdb

rtype

Dict[str, SeqRecord]

status

Return the statuses for each subdesign.

_optimize(n_paths)

Finds the optimal paths for each query in the design.

Return type

Dict[str, DesignResult]

_run(n_paths, post_processing_kwargs)

Run the design. Runs compile and optimize, returning results that can be accessed by design.results or by design.out()

Parameters

n_paths (int) – max number of assemblies per design to design

Returns

results

add_fragments(fragments)

Add fragment sequences to materials list.

add_primers(primers)

Add primer sequences to materials list.

add_queries(queries)

Add goal/query sequences to materials list.

add_templates(templates)

Add template sequences to materials list.

assemble_graphs(query_keys=None)

Assemble all assembly graphs for all queries in this design.

compile(post_process_kwargs=None)

Compile the materials list into assembly graphs.

property container_list

List of alignment containers in this design.

Return type

List[AlignmentContainer]

property containers

Iterable of alignment containers in this design.

Return type

Dict[str, AlignmentContainer]

classmethod filter_linear_records(records)

Return only linear records.

Return type

List[SeqRecord]

classmethod filter_perfect_subject(results)

return only results whose subject is 100% aligned to query.

Return type

List[dict]

property is_compiled

Return whether the design has been compiled.

Returns

True if compiled. False if otherwise.

out(fmt='json', elim_extra_reactions=False, query_keys=None)

Return the results of the design as a validates output JSON.

The output JSON is follows the following schema, see :type fmt: str :param fmt: :return:

out_jsonschema()

Return the output JSONschema.

property query_keys

List of query keys in this design.

Return type

List[str]

property status

Return the statuses for each subdesign.