Skip to content

SynBioDex/Excel-to-SBOL

Repository files navigation

Excel-to-SBOL

Excel-to-SBOL is an open source python library that converts Excel Templates to SBOL documents.

A similar utility developed for SBOL3 support (developed by Jake Beal) is SBOL-utilities.

For further depth and information on Excel-to-SBOL, including how to contribute to the project, visit the Excel-to-SBOL wiki on github

Table of Contents

Excel-to-SBOL: Installation & How to use

Installation

Excel-to-SBOL can be installed using pip install excel2sbol

To get the latest version you can use git clone https://github.com/SynBioDex/Excel-to-SBOL followed by cd .\excel2sbol and python setup.py install

How to use

1) Choose an Excel Template Choose an excel template from the templates folder. We suggest choosing the latest version (dates are given at the end of the file names in the form yyyymmdd). Fill out the template as the instructions indicate.

2) Install the Converter There are several ways to install the converter. The easiest is via pip: pip install excel2sbol but it can also be done by cloning the repository.

3) Run the Converter Use the code below substituting {things in curly brackets} with the appropriate values.

import excel2sbol.converter_function as conf

conf.converter({template_name}, {file_path_in}, {file_path_out})

An example:

import excel2sbol.converter_function as conf

conf.converter("excel2bol_darpa_template_blank_v005_20220222.xlsx",
               "C:/Users/Test_User/Downloads/Filled_Template.xlsx",
               "C:/Users/Test_User/Downloads/Output_SBOL.xml")

Tip: the use of os.getcwd() and os.path.join is reccommended for the creation of the file paths. This is safer from a cybersecurity stand point and provide better operating system interoperability.

4) Use the output file The SBOL file that is output can then be used by further SBOL tools or uploaded to an SBOL repository like SynBioHub.

Example Conversion

A data-filled spreadsheet was converted to an SBOL file and subsequently uploaded to SynBioHub.

Example Spreadsheet Example Spreadsheet

Example SBOL Example SBOL

Example SynBioHub Upload Example SynBioHub

Architecture

The repository architecture and module architecture are described in the wiki.

Publishing

A new version of the python package is automatically published via the python-publish GitHub action whenever a new release is created.

Alternatively you can also make changes to the package and then use it locally:

  1. Clone the directory: git clone https://github.com/SynBioDex/Excel-to-SBOL
  2. Change to the excel2sbol folder:

cd ./Excel_to_SBOL/excel2sbol

  1. Install an editable version of the package: python -m pip install -e . (will overwrite the directory in site-packages with a symbolic link to the locations repository). If a virtual environment is being used the python -m can be left off.