Answers.Body: <p>Typically you want to use a <code>ComponentDefinition</code> when an sub-structure is something you might want to pull out and re-use in another genetic design, and a <code>SequenceAnnotation</code> whenever it is not.</p>
  
  <p>For example:</p>
  
  <ul>
  <li>Promoters, terminators, and protein coding sequences are typically best represented with their own <code>ComponentDefinition</code>, since these are often pulled out and re-combined in new genetic designs.  Representing such an element with a <code>ComponentDefinition</code> makes it easy to find the commonalities between designs.</li>
  <li>Assembly scars, binding sites, and cut sites are typically best represented with a <code>SequenceAnnotation</code> because they are typically not very interesting except in the context of their surrounding genetic context. Representing such an element with a <code>SequenceAnnotation</code> helps keep them associated tightly with that context.</li>
  </ul>
  
  <p>Not every case is cut and dried, however.  For example, ribosome entry sites are often treated as separable components, but their performance is very tightly tied to the specifics of the coding sequence that they modulate.  Thus, in some cases it may make more sense to represent them separately as a <code>ComponentDefinition</code> and in others to represent them as a <code>SequenceAnnotation</code> on a joint RES/CDS <code>ComponentDefinition</code>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-16T21:55:13.623Z
Answers.Text: Note that this answer was written for SBOL 2.  For SBOL 3, change `ComponentDefinition` to `Component` and `SequenceAnnotation` to `SequenceFeature`. There are also shortcuts in SBOL 3 for representing things in other databases like UniProt and ChEBI
Answers.UserDisplayName: jakebeal
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-25T00:15:54.680Z
Answers.LastActivityDate: 2019-07-29T10:29:45.007Z
Answers.LastEditDate: 2019-07-29T10:29:45.007Z
Answers.UserDisplayName: jakebeal
Body: <p>When representing a DNA sequence in SBOL as a <code>ComponentDefinition</code>, you can mark things like promoters and coding sequences in two different ways:</p>
  
  <ul>
  <li>either as a <code>SequenceAnnotation</code> in the <code>ComponentDefinition</code>, or </li>
  <li>as a <code>Component</code> linking to a <code>ComponentDefinition</code> for the sub-comoponent</li>
  </ul>
  
  <p>When should you choose one over the other?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-07-26T13:55:36.453Z
Comments.Text: @James McLaughlin. If there is some error on the question and answers about the class I think it would be better if you provide a comment it could be a misunderstanding (unless it has changed and you are updating the question which it would be nice to know in the edit summary)
Comments.UserDisplayName: llrs
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-07-29T09:09:09.183Z
Comments.Text: @jakebeal, there is a pending edit for both [your question](https://bioinformatics.stackexchange.com/review/suggested-edits/2527) and [your answer](https://bioinformatics.stackexchange.com/review/suggested-edits/2526) (you might not have access to those links, if you don't just click on the "edit" under each or the notification in your inbox) changing `SequenceFeature` to  `SequenceAnnotation`. Please confirm which of those is the correct class name.
Comments.UserDisplayName: terdon
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-07-29T10:30:19.030Z
Comments.Text: @terdon Ah, James was right --- I typo'ed the names.  Edit accepted.
Comments.UserDisplayName: jakebeal
Tags: <sequence-annotation><sbol>
Title: In SBOL, when should I annotate a DNA sequence vs. making sub-components?
ThreadText: # In SBOL, when should I annotate a DNA sequence vs. making sub-components?
  
  (Asked by: username_0 on 2019-07-24)
  
  When representing a DNA sequence in SBOL as a `ComponentDefinition`, you can mark things like promoters and coding sequences in two different ways:
  
  * either as a `SequenceAnnotation` in the `ComponentDefinition`, or
  * as a `Component` linking to a `ComponentDefinition` for the sub-comoponent
  
  When should you choose one over the other?
  
  **Tags:** sequence-annotation, sbol
  
  > **Comments:**
  > **username_1**: @James McLaughlin. If there is some error on the question and answers about the class I think it would be better if you provide a comment it could be a misunderstanding (unless it has changed and you are updating the question which it would be nice to know in the edit summary)  
  > **username_2**: @username_0, there is a pending edit for both [your question](https://bioinformatics.stackexchange.com/review/suggested-edits/2527) and [your answer](https://bioinformatics.stackexchange.com/review/suggested-edits/2526) (you might not have access to those links, if you don't just click on the "edit" under each or the notification in your inbox) changing `SequenceFeature` to  `SequenceAnnotation`. Please confirm which of those is the correct class name.  
  > **username_0**: @username_2 Ah, James was right --- I typo'ed the names.  Edit accepted.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-07-25. Score: 4
  
  Typically you want to use a `ComponentDefinition` when an sub-structure is something you might want to pull out and re-use in another genetic design, and a `SequenceAnnotation` whenever it is not.
  
  For example:
  
  * Promoters, terminators, and protein coding sequences are typically best represented with their own `ComponentDefinition`, since these are often pulled out and re-combined in new genetic designs. Representing such an element with a `ComponentDefinition` makes it easy to find the commonalities between designs.
  * Assembly scars, binding sites, and cut sites are typically best represented with a `SequenceAnnotation` because they are typically not very interesting except in the context of their surrounding genetic context. Representing such an element with a `SequenceAnnotation` helps keep them associated tightly with that context.
  
  Not every case is cut and dried, however. For example, ribosome entry sites are often treated as separable components, but their performance is very tightly tied to the specifics of the coding sequence that they modulate. Thus, in some cases it may make more sense to represent them separately as a `ComponentDefinition` and in others to represent them as a `SequenceAnnotation` on a joint RES/CDS `ComponentDefinition`.
  
  > **Comments:**
  > **username_0**: Note that this answer was written for SBOL 2.  For SBOL 3, change `ComponentDefinition` to `Component` and `SequenceAnnotation` to `SequenceFeature`. There are also shortcuts in SBOL 3 for representing things in other databases like UniProt and ChEBI  
  
  ---
  
  