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

Issue with Component Definition with Sequence Constraints #111

Open
PrashantVaidyanathan opened this issue Oct 17, 2019 · 8 comments
Open

Comments

@PrashantVaidyanathan
Copy link

If there is a Component Definition with sequence constraints and components, but no sequence annotations, the image rendered shows parts as "unknown type" instead of the rendering the part based on the role assigned to the component e.g. Promoter/RBS etc.

image

I believe this happens due to this part in the code:

roles : [],

Where if there is no sequence annotation found that matches a specific component, a new sequence annotation is created however, the role field is an empty list and does not inherit the role(s) of the component.

Here's an intermediate json representation of the structure that reproduces the error observed.

visbolsc_repro.txt

@cjmyers
Copy link
Collaborator

cjmyers commented Oct 17, 2019

Do you have an XML version of your example?

@cjmyers
Copy link
Collaborator

cjmyers commented Oct 17, 2019

I see a problem though. Do not put roles on the Component, they only need to be on the definitions. I don't think roles on Components are supported.

@PrashantVaidyanathan
Copy link
Author

Here's the XML for the same.
visbolsc_reporxml.txt

If I run getDisplayList on the componentDefinition with the name device (the same component that has the SequenceConstraints and Components), the sequences in the displaylist do not have any type associated with them.

@cjmyers
Copy link
Collaborator

cjmyers commented Oct 17, 2019

I dropped your file into visbol.org and it works fine. Have you tried that?

@PrashantVaidyanathan
Copy link
Author

I did and saw that it works in visbol.
We get the displaylist by invoking getDisplayList for each component definition. For some reason, the transcriptional unit does not render correctly. Is there another way/correct way of generating visbol images from an sboljs data structure?

@cjmyers
Copy link
Collaborator

cjmyers commented Oct 17, 2019

One thing you might try to get more information is to print the result of your getDisplayList call and compare it with what you see under the display list tab on visbol.org. It could be that visbol.org is running on a different version than the latest. Which version of the visbol library are you using?

@cjmyers
Copy link
Collaborator

cjmyers commented Oct 18, 2019

These may not be causing your VisBol problems (though they might be), your URIs are not compliant. First of all, the URIs should not end with a "/". They should end with the version number. Second, your child URIs are also not formed correctly, for example, for CD:
http://www.microsoft.com/gec/db/device/1
It has Component:
http://www.microsoft.com/gec/db/r0011/r0011/1/component/
but is should be:
http://www.microsoft.com/gec/db/device/r0011/1
OR
http://www.microsoft.com/gec/db/device/r0011_component/1
It has SequenceConstraint:
http://www.microsoft.com/gec/db/device/1/sc0/
but it should be:
http://www.microsoft.com/gec/db/device/sc0/1

@cjmyers
Copy link
Collaborator

cjmyers commented Oct 18, 2019

Also, how similar is your code to that around line 232 here:
https://github.com/VisBOL/visbol-js/blob/master/browser.js
You don't need the ModuleDefinition loop, but the rest should be similar.

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