Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ComposedSequenceExpressions #376

Merged
merged 3 commits into from
Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions docs/source/terms_and_model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,46 @@ large-scale tandem duplications.
"type": "RepeatedSequenceExpression"
}

.. _ComposedSequenceExpression:

ComposedSequenceExpression
##########################

*Composed Sequence* is a class of sequence expression where two or more
constitutive sequence expressions are expressed as an ordered list,
representing a concatenated sequence. This class is useful for expressing
concepts such as the OPMD polyalanine alleles [2]_.

.. [2] Brais b, et al. *Short CCG expansions in the PABP2 gene cause
oculopharyngeal muscular dystrophy* Nat Genet. (1998).

.. include:: defs/ComposedSequenceExpression.rst

**Examples**

.. parsed-literal::

{
"type": "ComposedSequenceExpression",
"components": [
{
"type": "RepeatedSequenceExpression",
"seq_expr": { "type": "LiteralSequenceExpression", "sequence": "GCG" },
"count": { "type": "Number", "value": 11 }
},
{
"type": "RepeatedSequenceExpression",
"seq_expr": { "type": "LiteralSequenceExpression", "sequence": "GCA" },
"count": { "type": "Number", "value": 3 }
},
{
"type": "RepeatedSequenceExpression",
"seq_expr": { "type": "LiteralSequenceExpression", "sequence": "GCG" },
"count": { "type": "Number", "value": 1 }
}
]
}


.. _Feature:

Expand Down
26 changes: 26 additions & 0 deletions schema/defs/vrs/ComposedSequenceExpression.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
**Computational Definition**

An expression of a sequence composed from multiple other :ref:`Sequence Expressions<SequenceExpression>` objects. MUST have at least one component that is not a ref:`LiteralSequenceExpression`. CANNOT be composed from nested composed sequence expressions.

**Information Model**

Some ComposedSequenceExpression attributes are inherited from :ref:`SequenceExpression`.

.. list-table::
:class: clean-wrap
:header-rows: 1
:align: left
:widths: auto

* - Field
- Type
- Limits
- Description
* - type
- string
- 1..1
- MUST be "ComposedSequenceExpression"
* - components
- :ref:`LiteralSequenceExpression` | :ref:`RepeatedSequenceExpression` | :ref:`DerivedSequenceExpression`
- 2..m
- An ordered list of :ref:`SequenceExpression` components comprising the expression.
33 changes: 33 additions & 0 deletions schema/vrs-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ definitions:
- $ref: "#/definitions/LiteralSequenceExpression"
- $ref: "#/definitions/DerivedSequenceExpression"
- $ref: "#/definitions/RepeatedSequenceExpression"
- $ref: "#/definitions/ComposedSequenceExpression"
discriminator:
propertyName: type
heritable_properties:
Expand Down Expand Up @@ -568,6 +569,38 @@ definitions:
minimum: 0
required: [ "seq_expr", "count" ]

ComposedSequenceExpression:
description: >-
An expression of a sequence composed from multiple other
:ref:`Sequence Expressions<SequenceExpression>`
objects. MUST have at least one component that is not a
ref:`LiteralSequenceExpression`. CANNOT be composed from
nested composed sequence expressions.
additionalProperties: false
type: object
properties:
type:
type: string
const: "ComposedSequenceExpression"
description: MUST be "ComposedSequenceExpression"
components:
type: array
uniqueItems: true
minItems: 2
items:
oneOf:
- $ref: "#/definitions/LiteralSequenceExpression"
- $ref: "#/definitions/RepeatedSequenceExpression"
- $ref: "#/definitions/DerivedSequenceExpression"
contains:
oneOf:
- $ref: "#/definitions/RepeatedSequenceExpression"
- $ref: "#/definitions/DerivedSequenceExpression"
description: >-
An ordered list of :ref:`SequenceExpression` components
comprising the expression.
required: [ "components" ]

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Feature

Expand Down
48 changes: 48 additions & 0 deletions schema/vrs.json
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,9 @@
},
{
"$ref": "#/definitions/RepeatedSequenceExpression"
},
{
"$ref": "#/definitions/ComposedSequenceExpression"
}
],
"discriminator": {
Expand Down Expand Up @@ -776,6 +779,51 @@
"type"
]
},
"ComposedSequenceExpression": {
"description": "An expression of a sequence composed from multiple other Sequence Expressions objects. MUST have at least one component that is not a ref:`LiteralSequenceExpression`. CANNOT be composed from nested composed sequence expressions.",
"additionalProperties": false,
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "ComposedSequenceExpression",
"description": "MUST be \"ComposedSequenceExpression\""
},
"components": {
"type": "array",
"uniqueItems": true,
"minItems": 2,
"items": {
"oneOf": [
{
"$ref": "#/definitions/LiteralSequenceExpression"
},
{
"$ref": "#/definitions/RepeatedSequenceExpression"
},
{
"$ref": "#/definitions/DerivedSequenceExpression"
}
]
},
"contains": {
"oneOf": [
{
"$ref": "#/definitions/RepeatedSequenceExpression"
},
{
"$ref": "#/definitions/DerivedSequenceExpression"
}
]
},
"description": "An ordered list of SequenceExpression components comprising the expression."
}
},
"required": [
"components",
"type"
]
},
"Feature": {
"description": "A named entity that can be mapped to a Location. Genes, protein domains, exons, and chromosomes are some examples of common biological entities that may be Features.",
"oneOf": [
Expand Down
30 changes: 30 additions & 0 deletions schema/vrs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ definitions:
- $ref: '#/definitions/LiteralSequenceExpression'
- $ref: '#/definitions/DerivedSequenceExpression'
- $ref: '#/definitions/RepeatedSequenceExpression'
- $ref: '#/definitions/ComposedSequenceExpression'
discriminator:
propertyName: type
LiteralSequenceExpression:
Expand Down Expand Up @@ -471,6 +472,35 @@ definitions:
- count
- seq_expr
- type
ComposedSequenceExpression:
description: An expression of a sequence composed from multiple other Sequence
Expressions objects. MUST have at least one component that is not a ref:`LiteralSequenceExpression`.
CANNOT be composed from nested composed sequence expressions.
additionalProperties: false
type: object
properties:
type:
type: string
const: ComposedSequenceExpression
description: MUST be "ComposedSequenceExpression"
components:
type: array
uniqueItems: true
minItems: 2
items:
oneOf:
- $ref: '#/definitions/LiteralSequenceExpression'
- $ref: '#/definitions/RepeatedSequenceExpression'
- $ref: '#/definitions/DerivedSequenceExpression'
contains:
oneOf:
- $ref: '#/definitions/RepeatedSequenceExpression'
- $ref: '#/definitions/DerivedSequenceExpression'
description: An ordered list of SequenceExpression components comprising
the expression.
required:
- components
- type
Feature:
description: A named entity that can be mapped to a Location. Genes, protein domains,
exons, and chromosomes are some examples of common biological entities that
Expand Down