dasi.design.LibraryDesign¶
-
class
dasi.design.
LibraryDesign
(span_cost=None, seqdb=None)[source]¶ Bases:
dasi.design.designabc.DesignABC
Design class for producing assemblies for libraries.
Something.
Methods
Expand PCR products that are next to SYNTHESIZED_FRAGMENTS.
copy groups from SHARED_FRAGMENTS to SYNTHESIZED_FRAGMENT
_optimize
(n_paths)Finds the optimal paths for each query in the design.
_run
(n_paths, post_processing_kwargs)Run the design.
Find and use shared fragments across queries.
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.
Return the output JSONschema.
Attributes
List of alignment containers in this design.
Iterable of alignment containers in this design.
Return whether the design has been compiled.
List of query keys in this design.
Return the statuses for each subdesign.
Methods
__init__
([span_cost, seqdb])Something.
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
]
update_library_metadata
()Attributes
ALGORITHM
DEFAULT_N_ASSEMBLIES
DEFAULT_N_JOBS
FAVOR_SHARED_SEQUENCES
FRAGMENTS
PRIMERS
QUERIES
TEMPLATES
List of alignment containers in this design.
Iterable of alignment containers in this design.
Return whether the design has been compiled.
last_compile_end
last_compile_start
last_run_end
last_run_start
metadata
List of query keys in this design.
results
seqdb
- rtype
Dict
[str
,SeqRecord
]
Return the statuses for each subdesign.
-
_expand_from_synthesized
()[source]¶ Expand PCR products that are next to SYNTHESIZED_FRAGMENTS.
- Returns
-
_expand_synthesized_fragments
()[source]¶ copy groups from SHARED_FRAGMENTS to SYNTHESIZED_FRAGMENT
expand overlaps for SYNTHESIZED_FRAGMENTS
-
_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
Find and use shared fragments across queries.
- Returns
-
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.