sbol_utilities.excel_to_sbol

Module Contents

Functions

excel_to_sbol(wb: openpyxl.Workbook, config: dict = None) → sbol3.Document

Take an open Excel file, return an SBOL document

expand_configuration(values: dict) → dict

Initialize sheet configuration dictionary

is_RC(name)

main()

Main wrapper: read from input file, invoke excel_to_sbol, then write to output file

make_combinatorial_derivation(document, display_id, part_lists, reverse_complements, constraints)

make_composite_component(display_id, part_lists, reverse_complements)

make_composite_part(document, row, composite_parts, linear_products, final_products, config)

Create a composite part from a row in the composites sheet

make_constraint(constraint, part_list)

part_names(specification)

part_specifications(row, config)

partname_to_part(doc: sbol3.Document, name_or_display_id: str)

Look up a part by its displayID or its name, searching first by displayID, then by name

read_metadata(wb: openpyxl.Workbook, doc: sbol3.Document, config: dict)

Extract metadata and build collections

row_to_basic_part(doc: sbol3.Document, row, basic_parts: sbol3.Collection, linear_products: sbol3.Collection, final_products: sbol3.Collection, config: dict, source_table: dict)

Read a row for a basic part and turn it into SBOL Component

strip_RC(name)

unresolved_subparts(doc: sbol3.Document, row, config)

Attributes

BASIC_PARTS_COLLECTION

COMPOSITE_PARTS_COLLECTION

FINAL_PRODUCTS_COLLECTION

LINEAR_PRODUCTS_COLLECTION

constraint_dict

constraint_pattern

reverse_complement_pattern

BASIC_PARTS_COLLECTION = BasicParts
COMPOSITE_PARTS_COLLECTION = CompositeParts
FINAL_PRODUCTS_COLLECTION = FinalProducts
LINEAR_PRODUCTS_COLLECTION = LinearDNAProducts
constraint_dict
constraint_pattern
excel_to_sbol(wb: openpyxl.Workbook, config: dict = None) sbol3.Document

Take an open Excel file, return an SBOL document :param wb: openpyxl pointer to an Excel file :param config: dictionary of sheet parsing configuration variables :return: Document containing all SBOL extracted from Excel sheet

expand_configuration(values: dict) dict

Initialize sheet configuration dictionary :param values: Dictionary of overrides for defaults :return configuration with all defaults filled in

is_RC(name)
main()

Main wrapper: read from input file, invoke excel_to_sbol, then write to output file

make_combinatorial_derivation(document, display_id, part_lists, reverse_complements, constraints)
make_composite_component(display_id, part_lists, reverse_complements)
make_composite_part(document, row, composite_parts, linear_products, final_products, config)

Create a composite part from a row in the composites sheet :param document: Document to add parts to :param row: Excel row to be processed :param composite_parts: collection of parts to add to :param linear_products: collection of linear parts to add to :param final_products: collection of final parts to add to :param config: dictionary of sheet parsing configuration variables

make_constraint(constraint, part_list)
part_names(specification)
part_specifications(row, config)
partname_to_part(doc: sbol3.Document, name_or_display_id: str)

Look up a part by its displayID or its name, searching first by displayID, then by name

Parameters
  • doc – SBOL document to search

  • name_or_display_id – string to look up

Returns

object if found, None if not

read_metadata(wb: openpyxl.Workbook, doc: sbol3.Document, config: dict)

Extract metadata and build collections :param wb: Excel workbook to extract material from :param doc: SBOL document to build collections in :param config: dictionary of sheet parsing configuration variables :return: Tuple of SBOL collections for basic, composite, linear, and final parts

reverse_complement_pattern
row_to_basic_part(doc: sbol3.Document, row, basic_parts: sbol3.Collection, linear_products: sbol3.Collection, final_products: sbol3.Collection, config: dict, source_table: dict)

Read a row for a basic part and turn it into SBOL Component :param doc: Document to add parts to :param row: Excel row to be processed :param basic_parts: collection of parts to add to :param linear_products: collection of linear parts to add to :param final_products: collection of final parts to add to :param config: dictionary of sheet parsing configuration variables :param source_table: dictionary mapping source names to namespaces :return: None

strip_RC(name)
unresolved_subparts(doc: sbol3.Document, row, config)