--- type: "example" title: "MolecularDefinition Example: moleculardefinition-examples-header" resource: "MolecularDefinition" example: "moleculardefinition-examples-header" --- # MolecularDefinition Example: moleculardefinition-examples-header ## Narrative ### Sequence and Sequence Representation The following examples illustrate instances of a sequence, each designed to demonstrate different uses of the representation element. #### Literal (String) The following MolecularDefinitions show examples of a sequence represented as a literal. The moleculeType and encoding attributes enable unambiguous interpretation of the sequence value. - [Simple Sequence example DNA A, IUPAC](moleculardefinition-example-sequence-a-dna-iupac) - [Simple Sequence example Amino Acid A, IUPAC](moleculardefinition-example-sequence-a-aa-iupac) #### Code (Accession Number) The following MolecularDefinitions show examples of a sequence represented as a code using an accession number. - [Example of Sequence profile of CYP2C19 as Accession Number](moleculardefinition-example-genomic-cyp2c19-accession) #### Resolvable (URL) The following MolecularDefinitions show examples of a sequence represented as a resolvable URL. - [Sequence example of CYP2C19 as URL](moleculardefinition-example-sequence-cyp2c19-url) #### Resolvable (File) The following MolecularDefinitions show examples of a sequence represented as an attached file. - [Sequence example of CYP2C19 as Attachment](moleculardefinition-example-sequence-cyp2c19-attached) #### Extracted (Subsequence) The following MolecularDefinitions show examples of a sequence represented as a subsequence extracted from a “parent” sequence. In these examples, a sequence representing the CYP2C19 genetic locus is used as the “parent”, from which three subsequences are extracted (corresponding to the upstream region, gene region, and downstream region). - [Example of Sequence profile of CYP2C19 gene region](moleculardefinition-example-sequence-cyp2c19-gene-region) - [Example of Sequence profile of CYP2C19 upstream region](moleculardefinition-example-sequence-cyp2c19-upstream-region) - [Example of Sequence profile of CYP2C19 downstream region](moleculardefinition-example-sequence-cyp2c19-downstream-region) #### Concatenated (Assembly) The following MolecularDefinitions show examples of a sequence represented as a concatenation of sequence instances. In this example, the three subsequences from the Extracted example are reassembled into the full genetic locus. - [Example of Sequence profile of CYP2C19 of concatenated upstream, gene, and downstream regions](moleculardefinition-example-sequence-cyp2c19-Concatenated-regions) #### Repeated (Motif) The following MolecularDefinitions show examples of a sequence represented as a repeated sequence motif. In this use case, the CGG trinucleotide repeat from the FMR1 gene is represented in a compressed form that emphasizes the copyCount (convenient for use cases where the number of repeats is important). - [Example of Sequence profile of FMR1 CGG motif repeated 20 times](moleculardefinition-example-sequence-fmr1-cgg-20x-repeat) #### Relative (Edit) The following MolecularDefinitions show examples of a sequence represented as a relative sequence, which applies an edit to a starting sequence to create the sequence of interest. In this example, the starting sequence is a perfect CGG trinucleotide that was repeated 20 times (see the repeated motif example). The desired sequence is not a perfect repeat, however, and a single nucleotide must be edited to yield the sequence of interest. The result of this edit operation represents an actual CGG repeat region that is found in the FMR1 gene. - [Example of Sequence profile of FMR1 using CGG motifs edited by external referenced sequence resources](moleculardefinition-example-sequence-fmr1-cgg-20x-edited-referenced) ### Contained Resource Many instances of MolecularDefinition reference other instances of MolecularDefinition. When references within a message are not desired, contained resources can be used. This example shows how contained resources can be used to create a standalone message. It is the same content that was used in the relative (edit) example, but the references have been changed to contained resources. - [Example of Sequence profile of FMR1 using CGG motifs edited by contained referenced sequence resources](moleculardefinition-example-sequence-fmr1-cgg-20x-edited-contained) ### Allele The following examples illustrate instances of allele. In this example, the asserted state of the allele is different from the state of the context sequence at the given location. Note: the CG group is still determining how to best represent named alleles; therefore, the reference to the star allele in this example should be considered to be a draft (if not ignored). - [Example of Allele profile including slices for CYP2C19 position 1016](moleculardefinition-example-allelesliced-cyp2c19-1016) - [Example of Allele profile including slices for CYP2C19 position 1016 while leveraging contained resources](moleculardefinition-example-allelesliced-cyp2c19-1016-cont) ### Variation The following examples illustrate instances of variation. In this example, the state of the alternate allele is defined as being different from the state of the reference allele, but the same structure could be used to represent a variation where the two alleles are the same. Note that this example uses a 0-based interval coordinate system. - [Example of Variation profile of CYP2C19 at Position 1015 as SPDI](moleculardefinition-example-variation-cyp2c19-1015-spdi) The following example illustrates a tri-allelic polymorphism. In this example, it is necessary to unambiguously specify the reference and alternate alleles, neither of which might match the state of the context sequence at the specified location. The slices on the representation element are needed to support this use case. - TBD: tri-allelic example in ABCB1 ## Example XML ```xml


Sequence and Sequence Representation

The following examples illustrate instances of a sequence, each designed to demonstrate different uses of the representation element.

Literal (String)

The following MolecularDefinitions show examples of a sequence represented as a literal. The moleculeType and encoding attributes enable unambiguous interpretation of the sequence value.

Code (Accession Number)

The following MolecularDefinitions show examples of a sequence represented as a code using an accession number.

Resolvable (URL)

The following MolecularDefinitions show examples of a sequence represented as a resolvable URL.

Resolvable (File)

The following MolecularDefinitions show examples of a sequence represented as an attached file.

Extracted (Subsequence)

The following MolecularDefinitions show examples of a sequence represented as a subsequence extracted from a “parent” sequence. In these examples, a sequence representing the CYP2C19 genetic locus is used as the “parent”, from which three subsequences are extracted (corresponding to the upstream region, gene region, and downstream region).

Concatenated (Assembly)

The following MolecularDefinitions show examples of a sequence represented as a concatenation of sequence instances. In this example, the three subsequences from the Extracted example are reassembled into the full genetic locus.

Repeated (Motif)

The following MolecularDefinitions show examples of a sequence represented as a repeated sequence motif. In this use case, the CGG trinucleotide repeat from the FMR1 gene is represented in a compressed form that emphasizes the copyCount (convenient for use cases where the number of repeats is important).

Relative (Edit)

The following MolecularDefinitions show examples of a sequence represented as a relative sequence, which applies an edit to a starting sequence to create the sequence of interest. In this example, the starting sequence is a perfect CGG trinucleotide that was repeated 20 times (see the repeated motif example). The desired sequence is not a perfect repeat, however, and a single nucleotide must be edited to yield the sequence of interest. The result of this edit operation represents an actual CGG repeat region that is found in the FMR1 gene.

Contained Resource

Many instances of MolecularDefinition reference other instances of MolecularDefinition. When references within a message are not desired, contained resources can be used. This example shows how contained resources can be used to create a standalone message. It is the same content that was used in the relative (edit) example, but the references have been changed to contained resources.

Allele

The following examples illustrate instances of allele. In this example, the asserted state of the allele is different from the state of the context sequence at the given location. Note: the CG group is still determining how to best represent named alleles; therefore, the reference to the star allele in this example should be considered to be a draft (if not ignored).

Variation

The following examples illustrate instances of variation. In this example, the state of the alternate allele is defined as being different from the state of the reference allele, but the same structure could be used to represent a variation where the two alleles are the same. Note that this example uses a 0-based interval coordinate system.

The following example illustrates a tri-allelic polymorphism. In this example, it is necessary to unambiguously specify the reference and alternate alleles, neither of which might match the state of the context sequence at the specified location. The slices on the representation element are needed to support this use case.

```