Skip to content

Commit

Permalink
feat!: SequenceLocation.sequence --> SequenceLocation.sequenceReference
Browse files Browse the repository at this point in the history
- Updated models.yaml with the name change
  • Loading branch information
korikuzma committed Aug 31, 2023
1 parent 21a9d2d commit 248bc9c
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 67 deletions.
10 changes: 5 additions & 5 deletions schema/vrs-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ $defs:
- $ref: "#/defs/Allele"
- $ref_curie: gks.core:IRI
description: >-
A list of :ref:`Alleles <Allele>` (or IRI references to `Alleles`) that comprise a Haplotype. Since each
`Haplotype` member MUST be an `Allele`, and all members MUST share a common :ref:`SequenceReference`,
implementations MAY use a compact representation of Haplotype that omits type and :ref:`SequenceReference`
information in individual Haplotype members. Implementations MUST transform compact `Allele` representations
A list of :ref:`Alleles <Allele>` (or IRI references to `Alleles`) that comprise a Haplotype. Since each
`Haplotype` member MUST be an `Allele`, and all members MUST share a common :ref:`SequenceReference`,
implementations MAY use a compact representation of Haplotype that omits type and :ref:`SequenceReference`
information in individual Haplotype members. Implementations MUST transform compact `Allele` representations
into an `Allele` when computing GA4GH identifiers.
required: [ "members" ]

Expand Down Expand Up @@ -402,7 +402,7 @@ $defs:
const: "SequenceLocation"
default: "SequenceLocation"
description: MUST be "SequenceLocation"
sequence:
sequenceReference:
oneOf:
- $ref_curie: gks.core:IRI
- $ref: "#/$defs/SequenceReference"
Expand Down
2 changes: 1 addition & 1 deletion schema/vrs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ $defs:
algorithm.
type: string
pattern: '[0-9A-Za-z_\-]{32}'
sequence:
sequenceReference:
oneOf:
- $ref: '#/$defs/SequenceReference'
- $ref: core.json#/$defs/IRI
Expand Down
126 changes: 65 additions & 61 deletions validation/models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,66 +3,60 @@ SequenceReference:
-
in:
type: SequenceReference
refgetAccession: "SQ.F-LrLMe1SRpfUZHkQmvkVKFEGaoDeHul"
refgetAccession: SQ.F-LrLMe1SRpfUZHkQmvkVKFEGaoDeHul
out:
ga4gh_digest: OFEyBMeo55q3QRrxAY5FiDqnkdyf0GTV
ga4gh_identify: ga4gh:SQR.OFEyBMeo55q3QRrxAY5FiDqnkdyf0GTV
ga4gh_serialize: '{"refgetAccession":"SQ.F-LrLMe1SRpfUZHkQmvkVKFEGaoDeHul","type":"SequenceReference"}'
SequenceLocation:
- name: "SequenceLocation w/ sequence IRI"
- name: "SequenceLocation w/ SequenceReference"
in:
end: 44908822
start: 44908821
sequence: "ga4gh:SQ.IIB53T8CNeJJdUqzn9V_JnRtQadwWCbl"
type: SequenceLocation
out:
ga4gh_digest: O0FhLLKF6kLwQSneFGIztw-11r7wXtrZ
ga4gh_identify: ga4gh:SL.O0FhLLKF6kLwQSneFGIztw-11r7wXtrZ
ga4gh_serialize: '{"end":44908822,"sequence":"IIB53T8CNeJJdUqzn9V_JnRtQadwWCbl","start":44908821,"type":"SequenceLocation"}'
- name: "SequenceLocation w/ sequence reference"
in:
end: 44908822
start: 44908821
sequence:
sequenceReference:
type: SequenceReference
refgetAccession: "SQ.F-LrLMe1SRpfUZHkQmvkVKFEGaoDeHul"
refgetAccession: SQ.F-LrLMe1SRpfUZHkQmvkVKFEGaoDeHul
type: SequenceLocation
out:
ga4gh_digest: bd7aI8tGhWsbTzvRSCF8yd_hn742Osyj
ga4gh_identify: ga4gh:SL.bd7aI8tGhWsbTzvRSCF8yd_hn742Osyj
ga4gh_serialize: '{"end":44908822,"sequence":"OFEyBMeo55q3QRrxAY5FiDqnkdyf0GTV","start":44908821,"type":"SequenceLocation"}'
- name: "SequenceLocation w/ sequence reference and Ranges"
ga4gh_digest: p71XUj3t5PFaHqAA_oKteJbBBhG_T4rQ
ga4gh_identify: ga4gh:SL.p71XUj3t5PFaHqAA_oKteJbBBhG_T4rQ
ga4gh_serialize: '{"end":44908822,"sequenceReference":"OFEyBMeo55q3QRrxAY5FiDqnkdyf0GTV","start":44908821,"type":"SequenceLocation"}'
- name: "SequenceLocation w/ SequenceReference and Ranges"
in:
end: [44908822,44908922]
start: [44908721,44908821]
sequence:
sequenceReference:
type: SequenceReference
refgetAccession: "SQ.F-LrLMe1SRpfUZHkQmvkVKFEGaoDeHul"
refgetAccession: SQ.F-LrLMe1SRpfUZHkQmvkVKFEGaoDeHul
type: SequenceLocation
out:
ga4gh_digest: xYWzLpyUKMrRJd88IZk9KqEZ-mpkDI23
ga4gh_identify: ga4gh:SL.xYWzLpyUKMrRJd88IZk9KqEZ-mpkDI23
ga4gh_serialize: '{"end":[44908822,44908922],"sequence":"OFEyBMeo55q3QRrxAY5FiDqnkdyf0GTV","start":[44908721,44908821],"type":"SequenceLocation"}'
ga4gh_digest: NKkfN6jqDOiMfSl-53n4DVWwx0ffHaD_
ga4gh_identify: ga4gh:SL.NKkfN6jqDOiMfSl-53n4DVWwx0ffHaD_
ga4gh_serialize: '{"end":[44908822,44908922],"sequenceReference":"OFEyBMeo55q3QRrxAY5FiDqnkdyf0GTV","start":[44908721,44908821],"type":"SequenceLocation"}'
- name: "SequenceLocation w/Definite and Indefinite Ranges"
in:
end: [44908822,null]
start: [44908721,44908821]
sequence: ga4gh:SQ.IIB53T8CNeJJdUqzn9V_JnRtQadwWCbl
sequenceReference:
type: SequenceReference
refgetAccession: SQ.jdEWLvLvT8827O59m1Agh5H3n6kTzBsJ
type: SequenceLocation
out:
ga4gh_digest: hNmnOotIt0A7lSIgK9EDWr-XajFoi_fz
ga4gh_identify: ga4gh:SL.hNmnOotIt0A7lSIgK9EDWr-XajFoi_fz
ga4gh_serialize: '{"end":[44908822,null],"sequence":"IIB53T8CNeJJdUqzn9V_JnRtQadwWCbl","start":[44908721,44908821],"type":"SequenceLocation"}'
ga4gh_digest: _keTJceln2psdQ26ZmAiZ5AL9AGyUrsR
ga4gh_identify: ga4gh:SL._keTJceln2psdQ26ZmAiZ5AL9AGyUrsR
ga4gh_serialize: '{"end":[44908822,null],"sequenceReference":"UCYJSoScPO00LY6YI7YRIwnrdgM_MUxZ","start":[44908721,44908821],"type":"SequenceLocation"}'
- name: "SequenceLocation w/more Definite and Indefinite Ranges"
in:
end: [null,44908822]
start: [44908721,44908821]
sequence: ga4gh:SQ.IIB53T8CNeJJdUqzn9V_JnRtQadwWCbl
sequenceReference:
type: SequenceReference
refgetAccession: SQ.jdEWLvLvT8827O59m1Agh5H3n6kTzBsJ
type: SequenceLocation
out:
ga4gh_digest: SvQbPR1RWkQjgjCwKUWdYloasBlBKJIA
ga4gh_identify: ga4gh:SL.SvQbPR1RWkQjgjCwKUWdYloasBlBKJIA
ga4gh_serialize: '{"end":[null,44908822],"sequence":"IIB53T8CNeJJdUqzn9V_JnRtQadwWCbl","start":[44908721,44908821],"type":"SequenceLocation"}'
ga4gh_digest: 0mQP-Oxr6Lb_2N5yMZvj-m7Lgn5uLiAR
ga4gh_identify: ga4gh:SL.0mQP-Oxr6Lb_2N5yMZvj-m7Lgn5uLiAR
ga4gh_serialize: '{"end":[null,44908822],"sequenceReference":"UCYJSoScPO00LY6YI7YRIwnrdgM_MUxZ","start":[44908721,44908821],"type":"SequenceLocation"}'
#ChromosomeLocation: TODO - how to replace ChromosomeLocation in 2-alpha
# - name: "19q13.32 Example"
# in:
Expand All @@ -85,7 +79,7 @@ SequenceLocation:
# start:
# type: Number
# value: 44908821
# sequence_id: ga4gh:SQ.IIB53T8CNeJJdUqzn9V_JnRtQadwWCbl
# sequence_id: ga4gh:SQ.jdEWLvLvT8827O59m1Agh5H3n6kTzBsJ
# type: SequenceLocation
# reverse_complement: false
# type: DerivedSequenceExpression
Expand Down Expand Up @@ -113,7 +107,7 @@ LiteralSequenceExpression:
# start:
# type: Number
# value: 44908821
# sequence_id: ga4gh:SQ.IIB53T8CNeJJdUqzn9V_JnRtQadwWCbl
# sequence_id: ga4gh:SQ.jdEWLvLvT8827O59m1Agh5H3n6kTzBsJ
# type: SequenceLocation
# reverse_complement: false
# type: DerivedSequenceExpression
Expand All @@ -126,24 +120,28 @@ Allele:
location:
end: 44908822
start: 44908821
sequence: ga4gh:SQ.IIB53T8CNeJJdUqzn9V_JnRtQadwWCbl
sequenceReference:
type: SequenceReference
refgetAccession: SQ.jdEWLvLvT8827O59m1Agh5H3n6kTzBsJ
type: SequenceLocation
state:
sequence: T
type: LiteralSequenceExpression
type: Allele
out:
ga4gh_digest: b3xx6O8ARnBOv0TniYzU8PNVaJmVet24
ga4gh_identify: ga4gh:VA.b3xx6O8ARnBOv0TniYzU8PNVaJmVet24
ga4gh_serialize: '{"location":"O0FhLLKF6kLwQSneFGIztw-11r7wXtrZ","state":{"sequence":"T","type":"LiteralSequenceExpression"},"type":"Allele"}'
ga4gh_digest: P4Jonp408BOHLR0fDWwgCLmd-cmML0-0
ga4gh_identify: ga4gh:VA.P4Jonp408BOHLR0fDWwgCLmd-cmML0-0
ga4gh_serialize: '{"location":"C6TfiPZdUx7ix-rtlvs06vjVUlp7niVs","state":{"sequence":"T","type":"LiteralSequenceExpression"},"type":"Allele"}'
Haplotype:
- name: "APOE1 on GRCh38, inline"
in:
members:
- location:
end: 44908822
start: 44908821
sequence: ga4gh:SQ.IIB53T8CNeJJdUqzn9V_JnRtQadwWCbl
sequenceReference:
type: SequenceReference
refgetAccession: SQ.jdEWLvLvT8827O59m1Agh5H3n6kTzBsJ
type: SequenceLocation
state:
sequence: C
Expand All @@ -152,17 +150,19 @@ Haplotype:
- location:
end: 44908684
start: 44908683
sequence: ga4gh:SQ.IIB53T8CNeJJdUqzn9V_JnRtQadwWCbl
sequenceReference:
type: SequenceReference
refgetAccession: SQ.jdEWLvLvT8827O59m1Agh5H3n6kTzBsJ
type: SequenceLocation
state:
sequence: C
type: LiteralSequenceExpression
type: Allele
type: Haplotype
out:
ga4gh_digest: enhmK4WDeAa87Wz4tPwRRyQKoILV4AYE
ga4gh_identify: ga4gh:HT.enhmK4WDeAa87Wz4tPwRRyQKoILV4AYE
ga4gh_serialize: '{"members":["IqFpfTbT23RtgCuJ3IZOCOMOA-q2FOYa","dktZ-qKLi4BotmQACHYWXYUvguG-xJ5c"],"type":"Haplotype"}'
ga4gh_digest: j4MvWwApHLtKp6arfMAwuQQyc4ZFOXHi
ga4gh_identify: ga4gh:HT.j4MvWwApHLtKp6arfMAwuQQyc4ZFOXHi
ga4gh_serialize: '{"members":["Jnm5HEvns3AfW_C242rTpJRqR5eBAF9s","ssuHPJTyZ_NziLGr38aHXwXW7m--P7wF"],"type":"Haplotype"}'
- name: "APOE1 on GRCh38, referenced"
in:
members:
Expand All @@ -186,9 +186,9 @@ Genotype:
- type: Allele
location:
type: SequenceLocation
sequence:
sequenceReference:
type: SequenceReference
refgetAccession: ga4gh:SQ.KEO-4XBcm1cxeo_DIQ8_ofqGUkp4iZhI
refgetAccession: SQ.KEO-4XBcm1cxeo_DIQ8_ofqGUkp4iZhI
start: 128325834
end: 128325835
state:
Expand All @@ -197,9 +197,9 @@ Genotype:
- type: Allele
location:
type: SequenceLocation
sequence:
sequenceReference:
type: SequenceReference
refgetAccession: ga4gh:SQ.KEO-4XBcm1cxeo_DIQ8_ofqGUkp4iZhI
refgetAccession: SQ.KEO-4XBcm1cxeo_DIQ8_ofqGUkp4iZhI
start: 128325809
end: 128325810
state:
Expand All @@ -211,47 +211,51 @@ Genotype:
type: Allele
location:
type: SequenceLocation
sequence:
sequenceReference:
type: SequenceReference
refgetAccession: ga4gh:SQ.KEO-4XBcm1cxeo_DIQ8_ofqGUkp4iZhI
refgetAccession: SQ.KEO-4XBcm1cxeo_DIQ8_ofqGUkp4iZhI
start: 128322879
end: 128322891
state:
type: LiteralSequenceExpression
sequence: G
count: 1
out:
ga4gh_digest: Wq0haS0V1I7fNlPHC5bpqU-tTr3xGREr
ga4gh_identify: ga4gh:GT.Wq0haS0V1I7fNlPHC5bpqU-tTr3xGREr
ga4gh_serialize: '{"count":1,"members":[{"count":1,"type":"GenotypeMember","variation":"i7MKrP2OU1nH0WQfwc4W_8DWVU0bac8X"},{"count":1,"type":"GenotypeMember","variation":"DTN6tOnsmQ0aFodIDAzhkCzZUlfskiGb"}],"type":"Genotype"}'
ga4gh_digest: 2KEf9sLt_tilMr4qqrXvqrAjKDwhDNjC
ga4gh_identify: ga4gh:GT.2KEf9sLt_tilMr4qqrXvqrAjKDwhDNjC
ga4gh_serialize: '{"count":1,"members":[{"count":1,"type":"GenotypeMember","variation":"_dvISJcVVmZdJ8oLfojt-GKsaFVFbdhz"},{"count":1,"type":"GenotypeMember","variation":"1iuxFspkgxPDFYlGwVBox3XiMwsNLGVV"}],"type":"Genotype"}'
CopyNumberCount:
- name: ">=3 copies APOE"
in:
copies: [3,null]
subject:
sequence: ga4gh:SQ.IIB53T8CNeJJdUqzn9V_JnRtQadwWCbl
sequenceReference:
type: SequenceReference
refgetAccession: SQ.jdEWLvLvT8827O59m1Agh5H3n6kTzBsJ
end: 44909393
start: 44905795
type: SequenceLocation
type: CopyNumberCount
out:
ga4gh_digest: I1mI1ATW6UnHMmZkPUzPKl8zVMZMWUoG
ga4gh_identify: ga4gh:CN.I1mI1ATW6UnHMmZkPUzPKl8zVMZMWUoG
ga4gh_serialize: '{"copies":[3,null],"subject":"pwXpQIUlYM2W2DNhPPn82-95OSi2TZXj","type":"CopyNumberCount"}'
ga4gh_digest: mXhoZQwAHwpeolsIEb9snxZAVqtjsk79
ga4gh_identify: ga4gh:CN.mXhoZQwAHwpeolsIEb9snxZAVqtjsk79
ga4gh_serialize: '{"copies":[3,null],"subject":"k2jqs0d7563nxAUJA1UItMG549mx36A0","type":"CopyNumberCount"}'
CopyNumberChange:
- name: "Low-level copy gain of BRCA1"
in:
copyChange: efo:0030071
subject:
sequence: ga4gh:SQ.IIB53T8CNeJJdUqzn9V_JnRtQadwWCbl
sequenceReference:
type: SequenceReference
refgetAccession: SQ.jdEWLvLvT8827O59m1Agh5H3n6kTzBsJ
end: 44909393
start: 44905795
type: SequenceLocation
type: CopyNumberChange
out:
ga4gh_digest: Zc9sRUG1Lyzm4sKjUQ9npjxkdlsTvY7i
ga4gh_identify: ga4gh:CX.Zc9sRUG1Lyzm4sKjUQ9npjxkdlsTvY7i
ga4gh_serialize: '{"copyChange":"efo:0030071","subject":"pwXpQIUlYM2W2DNhPPn82-95OSi2TZXj","type":"CopyNumberChange"}'
ga4gh_digest: hD5zkLJuTb9v7Ji_qTM9IazfZTWMM78L
ga4gh_identify: ga4gh:CX.hD5zkLJuTb9v7Ji_qTM9IazfZTWMM78L
ga4gh_serialize: '{"copyChange":"efo:0030071","subject":"k2jqs0d7563nxAUJA1UItMG549mx36A0","type":"CopyNumberChange"}'
#Text: TODO Text not currently supported in 2-alpha
# -
# in:
Expand All @@ -272,7 +276,7 @@ CopyNumberChange:
# start:
# type: Number
# value: 44908821
# sequence_id: ga4gh:SQ.IIB53T8CNeJJdUqzn9V_JnRtQadwWCbl
# sequence_id: ga4gh:SQ.jdEWLvLvT8827O59m1Agh5H3n6kTzBsJ
# type: SequenceLocation
# state:
# sequence: C
Expand All @@ -285,7 +289,7 @@ CopyNumberChange:
# start:
# type: Number
# value: 44908683
# sequence_id: ga4gh:SQ.IIB53T8CNeJJdUqzn9V_JnRtQadwWCbl
# sequence_id: ga4gh:SQ.jdEWLvLvT8827O59m1Agh5H3n6kTzBsJ
# type: SequenceLocation
# state:
# sequence: C
Expand Down

0 comments on commit 248bc9c

Please sign in to comment.