Conversation
| "source": [ | ||
| "# MapsTo in pySBOL2\n", | ||
| "\n", | ||
| "The `MapsTo` class in the Synthetic Biology Open Language (SBOL) is used to explicitly state that two `ComponentInstance` objects, often from different levels of design hierarchy, represent the same biological entity. It is most often used when `ModuleDefinition` and `ComponentDefinition` objects are composed using `Module` and `ComponentInstance` objects.\n", |
There was a problem hiding this comment.
Give an intuitive example of what this means - why would you want to do this, biologically?
There was a problem hiding this comment.
For example, to design a genetic "toggle switch" ModuleDefinition we can compose two mutually repressing transcriptional units as its Modules. The transcriptional units ModuleDefinition might be one where its promoter is repressed by the cI transcription factor (TF) protein ComponentInstance and its CDS codes for the LacI TF protein ComponentInstance. And the the other where its prmoter is repressed by LacI and its CDS codes for cI.
In this context we would like to know that the proteins expressed by each transcriptional unit is the one repressing the other. To do this we "map" LacI and ci ComponentInstance from one ModuleDefinition to the other.
| "- `remote`: Refers to the `ComponentInstance` in the lower-level design. The referenced instance must have `access=\"public\"`.\n", | ||
| "- `refinement`: Specifies how to interpret the relationship between the local and remote instances using a URI. For example: `http://sbols.org/v2#useRemote`.\n", | ||
| "\n", | ||
| "This example demonstrates linking a `FunctionalComponent` in a high-level toggle switch module to one in a lower-level LacI inverter using a `MapsTo` object. We will:\n", |
There was a problem hiding this comment.
Again, we need to explain what this means biologically
There was a problem hiding this comment.
We think the example will provide enought link between the biology and its representation.
| "id": "cell-004", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "Creating a MapsTo Object" |
There was a problem hiding this comment.
Say what we're actually doing, biologically
| "source": [ | ||
| "# Create lower-level ModuleDefinition\n", | ||
| "inverter_md = sbol2.ModuleDefinition('laci_inverter')\n", | ||
| "tf_fc = inverter_md.functionalComponents.create('TF')\n", |
There was a problem hiding this comment.
now included in the example
| "tf_fc = inverter_md.functionalComponents.create('TF')\n", | ||
| "tf_fc.definition = tf_fc\n", | ||
| "tf_fc.access = sbol2.SBOL_ACCESS_PUBLIC\n", | ||
| "tf_fc.direction = sbol2.SBOL_DIRECTION_IN_OUT\n", |
There was a problem hiding this comment.
@GeneCodeSavvy TBI give readable and explicit names
| "# Create lower-level ModuleDefinition\n", | ||
| "inverter_md = sbol2.ModuleDefinition('laci_inverter')\n", | ||
| "tf_fc = inverter_md.functionalComponents.create('TF')\n", | ||
| "tf_fc.definition = tf_fc\n", |
There was a problem hiding this comment.
This is incorrect, and it shouldn't be letting us get away with this. This should be pointing at a ComponentDefinition.
| "# Create higher-level ModuleDefinition\n", | ||
| "toggle_md = sbol2.ModuleDefinition('toggle_switch')\n", | ||
| "laci_fc = toggle_md.functionalComponents.create('LacI')\n", | ||
| "laci_fc.definition = laci_fc\n", |
There was a problem hiding this comment.
This is incorrect, and it shouldn't be letting us get away with this. This should be pointing at a ComponentDefinition.
There was a problem hiding this comment.
@GeneCodeSavvy create a ComponentDefinition for each object that needs it, then create the functionalComponents pointing to them.
| "\n", | ||
| "# Create higher-level ModuleDefinition\n", | ||
| "toggle_md = sbol2.ModuleDefinition('toggle_switch')\n", | ||
| "laci_fc = toggle_md.functionalComponents.create('LacI')\n", |
There was a problem hiding this comment.
Explain what this is for, biologically: why do we need this here if it is private and not interacting with anything?
| "mod = toggle_md.modules.create('laci_inverter_instance')\n", | ||
| "mod.definition = inverter_md.identity\n", | ||
| "\n", | ||
| "# Create the MapsTo\n", |
There was a problem hiding this comment.
Explain what this means, intuitively.
| "outputs": [], | ||
| "source": [ | ||
| "# Validate the document\n", | ||
| "report = doc.validate()\n", |
There was a problem hiding this comment.
Can you do something with the contents of the document to show it's correct and useful besides just validate it?
There was a problem hiding this comment.
do you have any idea in how to do it? We can use it as input fora model (like iBioSim)?
There was a problem hiding this comment.
I was thinking something like starting with LacI and tracing the Interactions to show that the linkages go around in a circle.
There was a problem hiding this comment.
@GeneCodeSavvy please implement this idea so we can review it in the 1o1
|
I have considered all the comments and added more biological context overall, with the help of @Gonza10V explanation. |
| "gene_out = laci_inverter_md.functionalComponents.create('output_gene')\n", | ||
| "gene_out.definition = cI_cds.identity\n", | ||
| "gene_out.access = sbol2.SBOL_ACCESS_PUBLIC\n", | ||
| "gene_out.direction = sbol2.SBOL_DIRECTION_OUT\n", |
There was a problem hiding this comment.
This ModuleDefinition is incomplete without the Interaction objects that link the Promoter to the TF to the output gene.
As such, you should either add the two Interaction objects (my preference) or should add a comment saying that they have been omitted for simplicity.
Same for the other inverter ModuleDefinition
There was a problem hiding this comment.
Okay I will include it.
| "source": [ | ||
| "# Map 1: LacI protein is the input to the LacI inverter\n", | ||
| "map1 = laci_inverter_instance.mapsTos.create('map_laci_in')\n", | ||
| "map1.refinement = sbol2.SBOL_REFINEMENT_USE_REMOTE\n", |
There was a problem hiding this comment.
Shouldn't the others have their refinement values set as well?
There was a problem hiding this comment.
Sorry, missed this.
Updated.
| "outputs": [], | ||
| "source": [ | ||
| "# Validate the document\n", | ||
| "report = doc.validate()\n", |
There was a problem hiding this comment.
I was thinking something like starting with LacI and tracing the Interactions to show that the linkages go around in a circle.
Co-authored-by: Jacob Beal <jakebeal@gmail.com>
| "outputs": [], | ||
| "source": [ | ||
| "# Validate the document\n", | ||
| "report = doc.validate()\n", |
There was a problem hiding this comment.
@GeneCodeSavvy please implement this idea so we can review it in the 1o1
007e0c8 to
7a2f6ad
Compare
5ab2589 to
2523b19
Compare
Solves #22