VisBOL / visbol-js

SBOLv rendering in JavaScript
visbol.org
BSD 2-Clause "Simplified" License
10 stars 3 forks source link

Error in browser rendering attached example #99

Open cjmyers opened 5 years ago

cjmyers commented 5 years ago

TypeError: undefined is not an object (evaluating 'interaction.participants[i].segment.role = null')

yeast_gates_network_example.zip

cjmyers commented 5 years ago

Here is an updated example file. Still get the same browser error.

yeast_gates_network_example2.zip

nroehner commented 5 years ago

I've linked a diagram that shows how I would visualize the attached example. The diagram includes a key that identifies which SO and SBO terms decorate the ComponentDefintions, Participations, and Interactions that make up the example.

https://docs.google.com/presentation/d/15XRxOs1CL1YcMgvKRI7GSsHZPBUAEU621w0YGG9T3SY/edit?usp=sharing

dany-fu commented 5 years ago

Hi Nic,

screen shot 2018-11-20 at 4 59 24 pm

In this screenshot, I think you're saying r2, r10, r7 together create the r7 gRNA (total 4 participants). Are r2 and r10 suppose to be DNA parts like promoter or rbs? The visualizations that we have been creating only have up to 3 participants (usually 2). An activation like the screenshot above would only have a link between the r7 gRNA gene -> r7 gRNA.

cjmyers commented 5 years ago

Hi Nic,

I rebuilt your example (see attached ZIP), and I fixed a number of issues and got the VisBol rendering shown below. Here are some of the issues I fixed:

1) Your RNAs had type RnaRegion, but according to SBOLv 2, they must be type Rna to visualize as RNA objects.

2) Your binding sites were nucleatide_binding_sites which are not currently assigned to any glyph, so I change them to operator site, so you get the binding site glyph. If you prefer the other SO term, then you should advocate to have it assigned to the binding site glyph.

3) You used gene for the CDS, but this is not assigned to any glyph, so I changed it to CDS.

4) I put the binding sites and genes into a CD. There is no way for the visualization to infer that they should be depicted on the same line and in the order you show unless you do this.

5) I changed the interactions to repress each transcriptional unit and be produced from each transcriptional unit.

Here are the issues that remain:

1) The visualizations of all the parts/interactions are in separate boxes and should be combined some. This is a pending issue #85.

2) The interactions are not directed to the correct location. In the current SBOL, there is no way to know where they should point. Better solution would be to put CD in a box, and run the interactions to the box indicate they repress the transcriptional unit and are produced by it.

3) Even better solution, the interactions should actually be separated out into separate MDs and MapsTo should be used to connect them to the composite CD. I believe I sent you an example, but if not let me know. VisBol does not currently handle these MapsTos, but sorting this out is a priority.

yeastGate.zip figure-8

asadeg02 commented 5 years ago

@cjmyers As for putting the CDs in the box, do you want the nonDNA participants to be left aligned or do you want it to point to the center of dotted box? both is bossible. I think for this version, Considering the fact that we always have one non-DNA on top of CD, it would visually be better to have center alignment.

Example of left alignment: dottet-box

Example of center alignment: dottd3

Example of center alignment in other renderings: dotted-2

cjmyers commented 5 years ago

If there is just one interaction, then center alignment does look the best. However, if you consider your example of the "r7 gRNA gene", there are multiple interactions that involve the DNA component. Ideally, these interactions would be combined. In this case, the interactions should be ordered where the inhibition or stimulation interactions come first, then the production interaction(s). The set of interactions would then be centered on top.

cjmyers commented 5 years ago

Here is the improved image for Nic's example:

figure-9

cjmyers commented 5 years ago

This looks much improved to me. The objects rendered in the interactions do not need to be also rendered as separate components at the top, though anything not rendered in an interaction should be. Also, for r2 gRNA, the text could be lower so it does not run over the arrow.

cjmyers commented 5 years ago

Should move RNA gene label lower and avoid it overlapping arrow.