<aside>
🔅 Use cmd/ctrl+shift+l to switch between light/dark display mode.
</aside>
Related Pull Request:
https://github.com/SynBioDex/SBOL-utilities/pull/143
Change Log:
Changes::
- The newly added
convert_sbol3_to_genbank
method of the GenBank_SBOL3_Converter
Class supports converting from sbol3 to Genbank file formats.
- Also, using the flag
-force-new-converter
through the sbol2genbank
and sbol-converter
will also now invoke the new method.
- Unit test
test_sbol3togb_1
has been added to test the conversion by directly invoking the new method.
- Unit test
test_genbank_conversion_new_converter
has been added to test the conversion by invoking it from the console script, using the previously added flag -force-new-converter.
- 2 New Test files:
BBa_J23101_from_sbol3_direct.gb
and iGEM_SBOL2_imports_from_sbol3_direct.gb
has been added to aid the above 2 unit tests.
Update::
- Throws ValueError when the sbol3 component has more than 1 sequence. (TODO: Use more specific ErrorClass later)
- The converter used to pick up features from a sbol3 Component in random order every time the conversion was called, leading to different file outputs each time. We discussed this in our last meeting, and I have implemented a lexicographic sorting of features of each component based on the feature location's start and endpoints. This ensures the output stays the same always for a specific input sbol3 document.
- I have made the logger throw warnings to the console whenever, a feature translation lookup does not have any row in the CSV with the role in the given SBOL3/GenBank feature. The logger warns the user of this and mentions the default ontology term it will be using.
Clarification Needed::
- [x] Regarding update 1.; I have made the sequence object required while defining a BioPython
SeqRecord
class as None
when a component does not have a sequence. Is this fine?
- [ ] Regarding update 2.; There may be multiple feature locations for every feature; in this case, how should the sorting be implemented? Currently, it just sorts features based on the start/end points assuming there is only 1 location.
- [x] Resolvement of this issue.