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

Combinatorial Derivations Have some issues #412

Open
JMante1 opened this issue Dec 21, 2021 · 1 comment
Open

Combinatorial Derivations Have some issues #412

JMante1 opened this issue Dec 21, 2021 · 1 comment
Assignees

Comments

@JMante1
Copy link

JMante1 commented Dec 21, 2021

It seems like there is something going wrong with the way they are initialised as opposed to other objects as the xml out is:
for the command sbol2.CombinatorialDerivation('pAOX4').

Additionally, it doesn't seem like sbol:variant checks if the value given actually references an existing component definition.

@tcmitchell
Copy link
Collaborator

As with #410, there isn't enough in this bug report for me to understand or reproduce this issue. Some code would be useful to help me to debug, or to at least see the problem. My results don't agree with what you show, so I'm guessing you are doing something different from what I tried, or your settings are different from the default, or both. Here is my complete Python session which shows pAOX4 incorporated into the identity of the CombinatorialDerivation. Additionally, the resulting identity matches a similar initialization of a sbol2.Sequence.

python3
Python 3.8.5 (v3.8.5:580fbb018f, Jul 20 2020, 12:11:27) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sbol2
RDFLib Version: 6.0.0
>>> cd = sbol2.CombinatorialDerivation('pAOX4')
>>> cd
<sbol2.combinatorialderivation.CombinatorialDerivation object at 0x7f8f6004af10>
>>> cd.displayId
'example'
>>> cd.identity
'http://examples.org/pAOX4/example/1'
>>> s = sbol2.Sequence()
>>> s
<sbol2.sequence.Sequence object at 0x7f8f6008ec70>
>>> s.displayId
'example'
>>> s.identity
'http://examples.org/Sequence/example/1'
>>> 

Additionally, it doesn't seem like sbol:variant checks if the value given actually references an existing component definition.

I'm guessing that you are referring to sbol2.VariableComponent.variants here. You are probably correct that it does not check the value provided when setting this attribute. I think that's typical of both pySBOL2 and pySBOL3. These libraries allow latitude to the developer to construct objects and documents in a way that suits their application. If the libraries are too strict about enforcing constraints it has led to frustration in the past. Do you know if validation detects a variant that does not reference an existing component definition? That's where I would expect this problem to be detected. If it is not detected on validation please file a bug for that, along with a short test case.

Thanks in advance for any additional information that you can provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants