Skip to content

Commit

Permalink
update SM gks-core reorg (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
larrybabb authored Nov 1, 2024
1 parent db9c926 commit 2b2aeec
Show file tree
Hide file tree
Showing 34 changed files with 161 additions and 163 deletions.
5 changes: 5 additions & 0 deletions schema/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
all:
(cd cat-vrs; make all)

clean:
(cd cat-vrs; make clean)
47 changes: 40 additions & 7 deletions schema/cat-vrs/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,44 @@
all: core-build profiles-build
.SECONDARY:
.DELETE_ON_ERROR:

core-build:
(cd core; make all)
BUILD_DIR := build
DEF_DIR := def
JSON_DIR := json
IMPORT_DIR := import

profiles-build:
(cd profiles; make all)
vpath %tag $(BUILD_DIR)
vpath %.classes $(BUILD_DIR)

SOURCES := $(wildcard *-source.yaml)
TAGS := $(SOURCES:-source.yaml=.tag)
IMPORTS := $(wildcard $(IMPORT_DIR)/*-source.yaml)

all: build-ordered ${TAGS} prune-tag

build-ordered: | $(BUILD_DIR)

$(BUILD_DIR):
mkdir $(BUILD_DIR)

%.tag: %.classes %.json-tag %.defs-tag
touch $(BUILD_DIR)/$@

%.classes: %-source.yaml
source2classes $< >${BUILD_DIR}/$@

%.json-tag: %-source.yaml ${IMPORTS}
source2splitjs $<
touch $(BUILD_DIR)/$@

%.defs-tag: %-source.yaml ${IMPORTS}
y2t $<
touch $(BUILD_DIR)/$@

prune-tag: ${TAGS}
$(MAKE) -f prune.mk
touch $(BUILD_DIR)/$@

clean:
(cd core; make clean)
(cd profiles; make clean)
rm $(BUILD_DIR)/*
rm $(DEF_DIR)/*
rm $(JSON_DIR)/*
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
$schema: "https://json-schema.org/draft/2020-12/schema"
$id: "https://w3id.org/ga4gh/schema/cat-vrs/1.x/profiles/cat-vrs-profiles-source.yaml"
title: GA4GH-Cat-VRS-Definitions
$id: "https://w3id.org/ga4gh/schema/cat-vrs/1.x/cat-vrs-recipes-source.yaml"
title: GA4GH-Cat-VRS-Recipe-Definitions
type: object

imports:
gks.core-im: ../../core-im/core-im-source.yaml
vrs: ../../vrs/vrs-source.yaml
cat.core: ../core/cat-vrs-core-source.yaml
gks.core-im: ../gks-core/gks-core-source.yaml
vrs: ../vrs/vrs-source.yaml
cat-vrs: ./cat-vrs-source.yaml

$defs:
ProteinSequenceConsequenceProperties:
Expand All @@ -18,7 +18,7 @@ $defs:
constraints:
contains:
allOf:
- $ref: "/ga4gh/schema/cat-vrs/1.x/core/json/DefiningContextConstraint"
- $ref: "/ga4gh/schema/cat-vrs/1.x/json/DefiningContextConstraint"
- type: object
properties:
relations:
Expand All @@ -37,7 +37,7 @@ $defs:
that is representative of a collection of congruent Protein Alleles that share the same altered codon(s).
allOf:
- $ref: "#/$defs/ProteinSequenceConsequenceProperties"
- $ref: "/ga4gh/schema/cat-vrs/1.x/core/json/CategoricalVariant"
- $ref: "/ga4gh/schema/cat-vrs/1.x/json/CategoricalVariant"

CanonicalAlleleProperties:
type: object
Expand All @@ -48,7 +48,7 @@ $defs:
constraints:
contains:
allOf:
- $ref: "/ga4gh/schema/cat-vrs/1.x/core/json/DefiningContextConstraint"
- $ref: "/ga4gh/schema/cat-vrs/1.x/json/DefiningContextConstraint"
- type: object
properties:
relations:
Expand All @@ -71,7 +71,7 @@ $defs:
across different genome assemblies and associated cDNA transcript representations.
allOf:
- $ref: "#/$defs/CanonicalAlleleProperties"
- $ref: "/ga4gh/schema/cat-vrs/1.x/core/json/CategoricalVariant"
- $ref: "/ga4gh/schema/cat-vrs/1.x/core/CategoricalVariant"

CategoricalCnvProperties:
type: object
Expand All @@ -83,16 +83,16 @@ $defs:
allOf:
- contains:
allOf:
- $ref: "/ga4gh/schema/cat-vrs/1.x/core/json/DefiningContextConstraint"
- $ref: "/ga4gh/schema/cat-vrs/1.x/json/DefiningContextConstraint"
- type: object
properties:
relations:
contains:
const: sequence_liftover
- contains:
anyOf:
- $ref: "/ga4gh/schema/cat-vrs/1.x/core/json/CopyCountConstraint"
- $ref: "/ga4gh/schema/cat-vrs/1.x/core/json/CopyChangeConstraint"
- $ref: "/ga4gh/schema/cat-vrs/1.x/json/CopyCountConstraint"
- $ref: "/ga4gh/schema/cat-vrs/1.x/json/CopyChangeConstraint"
required:
- constraints

Expand All @@ -103,4 +103,4 @@ $defs:
A representation of the constraints for matching knowledge about CNVs.
allOf:
- $ref: "#/$defs/CategoricalCnvProperties"
- $ref: "/ga4gh/schema/cat-vrs/1.x/core/json/CategoricalVariant"
- $ref: "/ga4gh/schema/cat-vrs/1.x/json/CategoricalVariant"
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
$schema: "https://json-schema.org/draft/2020-12/schema"
$id: "https://w3id.org/ga4gh/schema/cat-vrs/1.x/core/cat-vrs-core-source.yaml"
$id: "https://w3id.org/ga4gh/schema/cat-vrs/1.x/cat-vrs-source.yaml"
title: GA4GH-Cat-VRS-Definitions
type: object
strict: true

imports:
gks.core-im: ../../core-im/core-im-source.yaml
vrs: ../../vrs/vrs-source.yaml
gks-core: ../gks-core/gks-core-source.yaml
vrs: ../vrs/vrs-source.yaml

$defs:

Expand All @@ -16,7 +16,7 @@ $defs:

CategoricalVariant:
type: object
inherits: gks.core-im:DomainEntity
inherits: gks-core:DomainEntity
maturity: draft
description: >-
A representation of a categorically-defined domain for variation, in which individual
Expand All @@ -36,7 +36,7 @@ $defs:
items:
oneOf:
- $ref: /ga4gh/schema/vrs/2.x/json/Variation
- $ref: /ga4gh/schema/gks-common/1.x/core-im/json/IRI
- $ref: /ga4gh/schema/gks-core/1.x/gks-core/json/IRI
constraints:
type: array
ordered: false
Expand Down Expand Up @@ -78,7 +78,7 @@ $defs:
oneOf:
- $ref: /ga4gh/schema/vrs/2.x/json/Variation
- $ref: /ga4gh/schema/vrs/2.x/json/Location
- $ref: /ga4gh/schema/gks-common/1.x/core-im/json/IRI
- $ref: /ga4gh/schema/gks-core/1.x/json/IRI
relations:
type: array
ordered: false
Expand Down Expand Up @@ -129,7 +129,7 @@ $defs:
default: CopyChangeConstraint
description: 'MUST be "CopyChangeConstraint"'
copyChange:
$ref: /ga4gh/schema/gks-common/1.x/core-im/json/Coding
$ref: /ga4gh/schema/gks-core/1.x/json/Coding
items:
properties:
code:
Expand Down
44 changes: 0 additions & 44 deletions schema/cat-vrs/core/Makefile

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@

.. warning:: This data class is at a **draft** maturity level and may change
significantly in future releases. Maturity levels are described in
the :ref:`maturity-model`.


**Computational Definition**

A canonical allele is defined by an `Allele <https://vrs.ga4gh.org/en/2.x/concepts/MolecularVariation/Allele.html#>`_ that is representative of a collection of congruent Alleles, each of which depict the same nucleic acid change on different underlying reference sequences. Congruent representations of an Allele often exist across different genome assemblies and associated cDNA transcript representations.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@

.. warning:: This data class is at a **draft** maturity level and may change
significantly in future releases. Maturity levels are described in
the :ref:`maturity-model`.


**Computational Definition**

Cat-VRS Constraints found in Canonical Alleles.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@

.. warning:: This data class is at a **draft** maturity level and may change
significantly in future releases. Maturity levels are described in
the :ref:`maturity-model`.


**Computational Definition**

A representation of the constraints for matching knowledge about CNVs.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@

.. warning:: This data class is at a **draft** maturity level and may change
significantly in future releases. Maturity levels are described in
the :ref:`maturity-model`.


**Computational Definition**

Cat-VRS Constraints found in CategoricalCnvs.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@

.. warning:: This data class is at a **draft** maturity level and may change
significantly in future releases. Maturity levels are described in
the :ref:`maturity-model`.


**Computational Definition**

A representation of a categorically-defined domain for variation, in which individual contextual variation instances may be members of the domain.

**Information Model**

Some CategoricalVariant attributes are inherited from :ref:`gks.core-im:DomainEntity`.
Some CategoricalVariant attributes are inherited from :ref:`gks-core:DomainEntity`.

.. list-table::
:class: clean-wrap
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@

.. warning:: This data class is at a **draft** maturity level and may change
significantly in future releases. Maturity levels are described in
the :ref:`maturity-model`.


**Computational Definition**

Constraints are used to construct an intensional semantics of categorical variant types.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@

.. warning:: This data class is at a **draft** maturity level and may change
significantly in future releases. Maturity levels are described in
the :ref:`maturity-model`.


**Computational Definition**

A representation of copy number change
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@

.. warning:: This data class is at a **draft** maturity level and may change
significantly in future releases. Maturity levels are described in
the :ref:`maturity-model`.


**Computational Definition**

The absolute number of copies in a system
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@

.. warning:: This data class is at a **draft** maturity level and may change
significantly in future releases. Maturity levels are described in
the :ref:`maturity-model`.


**Computational Definition**

The location or location-state, congruent with other reference sequences, about which categorical variation is being described.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@

.. warning:: This data class is at a **draft** maturity level and may change
significantly in future releases. Maturity levels are described in
the :ref:`maturity-model`.


**Computational Definition**

Cat-VRS Constraints found in Protein Sequence Consequences.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://w3id.org/ga4gh/schema/cat-vrs/1.x/profiles/json/CanonicalAllele",
"$id": "https://w3id.org/ga4gh/schema/cat-vrs/1.x/json/CanonicalAllele",
"title": "CanonicalAllele",
"type": "object",
"maturity": "draft",
"description": "A canonical allele is defined by an [Allele](https://vrs.ga4gh.org/en/2.x/concepts/MolecularVariation/Allele.html#) that is representative of a collection of congruent Alleles, each of which depict the same nucleic acid change on different underlying reference sequences. Congruent representations of an Allele often exist across different genome assemblies and associated cDNA transcript representations.",
"allOf": [
{
"$ref": "/ga4gh/schema/cat-vrs/1.x/profiles/json/CanonicalAlleleProperties"
"$ref": "/ga4gh/schema/cat-vrs/1.x/json/CanonicalAlleleProperties"
},
{
"$ref": "/ga4gh/schema/cat-vrs/1.x/core/json/CategoricalVariant"
"$ref": "/ga4gh/schema/cat-vrs/1.x/json/CategoricalVariant"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://w3id.org/ga4gh/schema/cat-vrs/1.x/profiles/json/CanonicalAlleleProperties",
"$id": "https://w3id.org/ga4gh/schema/cat-vrs/1.x/json/CanonicalAlleleProperties",
"title": "CanonicalAlleleProperties",
"type": "object",
"maturity": "draft",
Expand All @@ -10,7 +10,7 @@
"contains": {
"allOf": [
{
"$ref": "/ga4gh/schema/cat-vrs/1.x/core/json/DefiningContextConstraint"
"$ref": "/ga4gh/schema/cat-vrs/1.x/json/DefiningContextConstraint"
},
{
"type": "object",
Expand Down
Loading

0 comments on commit 2b2aeec

Please sign in to comment.