Repository navigation
Use SO_FORWARD/SO_REVERSE instead of deprecated SBOL orientations (fixes #204) - #371
Open
anshuman83-40 wants to merge 1 commit into
Open
anshuman83-40 wants to merge 1 commit into
anshuman83-40 wants to merge 1 commit into
Conversation
SynBioDex#204) SBOL 3.0.1 deprecated sbol3.SBOL_INLINE and sbol3.SBOL_REVERSE_COMPLEMENT in favor of the Sequence Ontology terms SO_FORWARD and SO_REVERSE. - excel_to_sbol: emit SO_FORWARD / SO_REVERSE for SubComponent orientation - convert2to3: map SBOL2 inline / reverseComplement to SO_FORWARD / SO_REVERSE - convert3to2: map SO_FORWARD / SO_REVERSE to SBOL2, while still accepting the deprecated SBOL3 terms so older documents continue to convert - update the expected-output test files generated from Excel (and the library expansions derived from them) to the SO terms; only orientation triples change Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SBOL 3.0.1 deprecated
sbol3.SBOL_INLINE/sbol3.SBOL_REVERSE_COMPLEMENTin favor of theSequence Ontology terms
sbol3.SO_FORWARD/sbol3.SO_REVERSE. This PR switches the places whereSBOL Utilities produces orientations over to the SO terms. Where it reads them, it still
accepts the deprecated terms, so existing documents keep working.
Changes
excel_to_sbol.py: SubComponent orientation is nowSO_REVERSE/SO_FORWARD.conversion.py–convert2to3: SBOL2inline/reverseComplementnow map toSO_FORWARD/SO_REVERSE.conversion.py–convert3to2: mapsSO_FORWARD/SO_REVERSEto the SBOL2 terms, and still mapsthe deprecated SBOL3 terms so older documents continue to convert.
sbol3_genbank_conversion.py: unchanged. It already accepts both the SO and the deprecated terms on input.Test files
This is the part where #225 got stuck. The expected-output files generated from Excel, and the library
expansions derived from them, are updated to the SO terms:
simple_library.nt,two_backbones.nt,constraints_library.nt,incomplete_constraints_library.nt,circular_sequence_inference.nt,expanded_simple_library.nt,expanded_with_sequences.nt.Only
sbol3:orientationtriples change: 217inline→SO:0001030and 8reverseComplement→SO:0001031.The files were re-serialized with
sbol3.SORTED_NTRIPLES, so the byte-level round-trip comparison intest_3to2_conversionstill lines up.feature_orientation_conversion.ntandiGEM_SBOL2_imports.ntdeliberately keep the deprecated terms.They are inputs to
test_3to2_orientation_conversionand now act as backward-compatibility coverage.Testing
Locally (Windows 11, Python 3.13), I ran the full suite before and after the change
(excluding docstring coverage and the IDT tests): 68 passed both before and after; the set of failing tests is identical.
The 10 tests that fail locally fail on unmodified
developtoo, because Node.js and Graphviz aren't installed on my machine(the
test_conversion.pyJS-converter tests andtest_dotfile_generation). I'm relying on CI for those, including thetest_3to2_conversionround trip.Side note: with the current Biopython (1.88),
test_genbank_sbol3_direct.pyfails ondevelopwithAttributeError: 'SeqFeature' object has no attribute 'strand'. I pinned Biopython 1.85 locally to run those tests.I'm happy to open a separate issue/PR for that.