<p>Your choices match the same choices that I've made when designated types for inserts and vectors.</p>
<p>The more specific plasmid types are reasonable to use as well, but choosing just &quot;plasmid&quot; is certainly safe. That's why I have preferred to use that in my code because (1) my code might sometimes be applied to a different sort of plasmid, (2) I don't currently have a purpose for making the finer distinction, and (3) circular DNA would be indicated by SO.circular (SO:0000988) in any case.</p>
<p><em>Side note: I would suggest using the <a href="https://github.com/SynBioDex/tyto" rel="nofollow noreferrer">tyto</a> package so that your code can use names like <code>SO.plasmid</code> in your code instead of opaque symbols like <code>SO:0000155</code>.</em></p>

CC BY-SA 4.0
2021-08-23T17:31:48.820Z
2021-08-23T17:31:48.820Z
jakebeal
<p>I want to encode two different DNAs using pySBOL3. First dna is an engineered region usually composed by a transcriptional unit (TU) or a set of TUs. The second is vector which is a basically a plasmid that contains a set of the previously described dna. This is for differentiate between engineered on different plasmids.</p>
<p>Now for dna I used as type: <code>sbol3.SBO_DNA</code> and role: <code>sbol3.SO_ENGINEERED_REGION</code> and for vector I used as type: <code>sbol3.SBO_DNA</code> and role: <code>SO:0000155</code> (plasmid).</p>
<p>I would like to have feedback on this choice. For example the plasmid could also be an engineered plasmid <code>SO:0000637</code> or circular plasmid <code>SO:0002211</code> or just circular <code>SO:0000988</code>.</p>
<p>Here is my actual implementation:</p>
<pre><code>for dna_id in params.get('dna'):
    #this needs to be handlded by vector
    dnas = Dna.object().filter(dna_id)
    dna = sbol3.Component(dnas.name(), sbol3.SBO_DNA)
    dna.roles = sbol3.SO_ENGINEERED_REGION
    dna.name = dnas.name
    dna.description = dnas.description
    if dnas == None:
        print('No dnas specified')

for vector_id in params.get('vector'):
    vectors =Vectors.object().filter(vector_id)
    vector = sbol3.Component(vectors.name(), sbol3.SBO_DNA)
    vector.roles = SO:0000155
    vector.name =vectors.name
    vector.description = vectors.description()
</code></pre>

<phylogenetics><sbol>
Encoding different DNAs in pySBOL3?
# Encoding different DNAs in pySBOL3?

(Asked by: username_0 on 2021-08-23)

I want to encode two different DNAs using pySBOL3. First dna is an engineered region usually composed by a transcriptional unit (TU) or a set of TUs. The second is vector which is a basically a plasmid that contains a set of the previously described dna. This is for differentiate between engineered on different plasmids.
Now for dna I used as type: sbol3.SBO_DNA and role: sbol3.SO_ENGINEERED_REGION and for vector I used as type: sbol3.SBO_DNA and role: SO:0000155 (plasmid).
I would like to have feedback on this choice. For example the plasmid could also be an engineered plasmid SO:0000637 or circular plasmid SO:0002211 or just circular SO:0000988.
Here is my actual implementation:
for dna_id in params.get('dna'):
    #this needs to be handlded by vector
    dnas = Dna.object().filter(dna_id)
    dna = sbol3.Component(dnas.name(), sbol3.SBO_DNA)
    dna.roles = sbol3.SO_ENGINEERED_REGION
    dna.name = dnas.name
    dna.description = dnas.description
    if dnas == None:
        print('No dnas specified')

for vector_id in params.get('vector'):
    vectors =Vectors.object().filter(vector_id)
    vector = sbol3.Component(vectors.name(), sbol3.SBO_DNA)
    vector.roles = SO:0000155
    vector.name =vectors.name
    vector.description = vectors.description()

**Tags:** phylogenetics, sbol

---

## 1 answers

### Answer by username_1 on 2021-08-23. Score: 1 | Accepted answer

Your choices match the same choices that I've made when designated types for inserts and vectors.

The more specific plasmid types are reasonable to use as well, but choosing just "plasmid" is certainly safe. That's why I have preferred to use that in my code because (1) my code might sometimes be applied to a different sort of plasmid, (2) I don't currently have a purpose for making the finer distinction, and (3) circular DNA would be indicated by SO.circular (SO:0000988) in any case.

*Side note: I would suggest using the [tyto](https://github.com/SynBioDex/tyto) package so that your code can use names like `SO.plasmid` in your code instead of opaque symbols like `SO:0000155`.*


---

