Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy Methods Do Not Update Versions of Component Properties for Sequence Annotations #89

Open
nroehner opened this issue May 2, 2019 · 0 comments
Assignees
Labels

Comments

@nroehner
Copy link
Member

nroehner commented May 2, 2019

When copying a ComponentDefinition that has a SequenceAnnotation with a component property, the component property is imported from one namespace to another if that parameter is specified, but the version is not updated.

Example code:

from sbol import *

Config.setOption('sbol_typed_uris', False)
setHomespace('http://examples.org')

doc = Document()

lacZ = ComponentDefinition('lacZ_cassette', BIOPAX_DNA, '1')
doc.addComponentDefinition(lacZ)

pLac = ComponentDefinition('pLac', BIOPAX_DNA, '1')
doc.addComponentDefinition(pLac)

pLac_comp = lacZ.components.create('pLac_comp')
pLac_comp.definition = pLac.identity

pLac_anno = lacZ.sequenceAnnotations.create('pLac_anno')
pLac_anno.locations.createGenericLocation('pLac_loc')
pLac_anno.component = pLac_comp.identity

setHomespace('http://testing.org')

lacZ.copy(doc, 'http://examples.org')

doc.write('copy_test.xml')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants