Skip to content

Commit

Permalink
Merge pull request #2 from bmeg/fixtures
Browse files Browse the repository at this point in the history
Fixtures setup
  • Loading branch information
bwalsh authored May 13, 2022
2 parents 4e36ad3 + 875a595 commit 75a1a09
Show file tree
Hide file tree
Showing 92 changed files with 180,799 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/fixtures/anvil/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## AnVIL

### Download anvil_etl output
gs://<google-bucket>/fhir/public

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{"id":"anvil","identifier":[{"system":"https://anvil.terra.bio/program","value":"anvil"}],"resourceType":"Organization"}
{"id":"Public","identifier":[{"system":"https://anvil.terra.bio/consortium","value":"Public"}],"partOf":{"reference":"Organization/anvil"},"resourceType":"Organization"}
{"id":"public","identifier":[{"system":"https://anvil.terra.bio/#FHIR/data-store","value":"public"}],"partOf":{"reference":"Organization/Public"},"resourceType":"Organization"}
{"id":"b44a3c8f-b197-52e2-9a3a-32d3d64c57c2","identifier":[{"system":"https://anvil.terra.bio/#workspaces/anvil-datastorage/","value":"1000G-high-coverage-2019"}],"partOf":{"reference":"Organization/public"},"resourceType":"Organization"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"AnVIL-Team","resourceType":"Practitioner"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"4a3b0c22-6314-57cf-88a7-852a7aff740a","identifier":[{"system":"https://anvil.terra.bio/#workspaces/anvil-datastorage/","value":"1000G-high-coverage-2019"}],"organization":{"reference":"Organization/b44a3c8f-b197-52e2-9a3a-32d3d64c57c2"},"practitioner":{"reference":"Practitioner/AnVIL-Team"},"resourceType":"PractitionerRole"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"1000G-high-coverage-2019","identifier":[{"system":"https://anvil.terra.bio/#workspaces/anvil-datastorage/","value":"1000G-high-coverage-2019"},{"system":"https://anvil.terra.bio/#FHIR/data-store","value":"public"},{"system":"https://anvil.terra.bio/#consortium","value":"Public"}],"sponsor":{"reference":"Organization/b44a3c8f-b197-52e2-9a3a-32d3d64c57c2"},"status":"completed","resourceType":"ResearchStudy"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{
"id": "c5b3fabc-35f6-5395-abbe-a01de4e2d64f",
"code": {
"coding": [
{
"code": "Summary",
"display": "Variable Summary",
"system": "https://nih-ncpi.github.io/ncpi-fhir-ig"
}
]
},
"component": [
{
"code": {
"coding": [
{
"code": "SampleCount",
"display": "Number of Samples",
"system": "https://nih-ncpi.github.io/ncpi-fhir-ig"
}
]
},
"valueInteger": 3202
},
{
"code": {
"coding": [
{
"code": "Participant",
"display": "Number of Participants",
"system": "https://nih-ncpi.github.io/ncpi-fhir-ig"
}
]
},
"valueInteger": 3202
},
{
"code": {
"coding": [
{
"code": "StorageSize",
"display": "Size on Disk",
"system": "https://nih-ncpi.github.io/ncpi-fhir-ig"
}
]
},
"valueQuantity": {
"code": "L",
"system": "http://unitsofmeasure.org",
"value": 90736987729057
}
},
{
"code": {
"coding": [
{
"code": "TerraWorkspace",
"display": "Terra Workspace Name",
"system": "https://nih-ncpi.github.io/ncpi-fhir-ig"
}
]
},
"valueString": "1000G-high-coverage-2019"
},
{
"code": {
"coding": [
{
"code": "PrimaryDisease",
"display": "Primary Disease",
"system": "https://nih-ncpi.github.io/ncpi-fhir-ig"
}
]
}
},
{
"code": {
"coding": [
{
"code": "StudyDesign",
"display": "Study Design",
"system": "https://nih-ncpi.github.io/ncpi-fhir-ig"
}
]
},
"valueString": "Parent-Offspring Trios"
},
{
"code": {
"coding": [
{
"code": "DataType",
"display": "Data Type",
"system": "https://nih-ncpi.github.io/ncpi-fhir-ig"
}
]
},
"valueString": "Whole Genome"
},
{
"code": {
"coding": [
{
"code": "ConsentCodes",
"display": "Consent Codes",
"system": "https://nih-ncpi.github.io/ncpi-fhir-ig"
}
]
},
"valueString": "NRES"
}
],
"focus": [
{
"reference": "ResearchStudy/1000G-high-coverage-2019"
}
],
"status": "final",
"resourceType": "Observation"
}
252 changes: 252 additions & 0 deletions tests/fixtures/anvil/output/gen3/_definitions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
id: _definitions

UUID:
term:
$ref: "_terms.yaml#/UUID"
type: string
pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"

parent_uuids:
type: array
minItems: 1
items:
$ref: "#/UUID"
uniqueItems: true

foreign_key_project:
type: object
# Allow true here because we can have other unique keys defined on
# a target type
additionalProperties: true
#Can either use 'id' which are Gen3 IDs (UUID) or 'code'
#which is the user defined ID for project
properties:
id:
$ref: "#/UUID"
code:
type: string

to_one_project:
anyOf:
- type: array
items:
$ref: "#/foreign_key_project"
minItems: 1
maxItems: 1
- $ref: "#/foreign_key_project"

to_many_project:
anyOf:
- type: array
items:
$ref: "#/foreign_key_project"
minItems: 1
- $ref: "#/foreign_key_project"

foreign_key:
type: object
# Allow true here because we can have other unique keys defined on
# a target type
additionalProperties: True
#Can either use 'id' which are GDC IDs (UUID) or 'submitter_id'
#which are user defined IDs ("submitter IDs in the backend")
properties:
id:
$ref: "#/UUID"
submitter_id:
type: string

to_one:
anyOf:
- type: array
items:
$ref: "#/foreign_key"
minItems: 1
maxItems: 1
- $ref: "#/foreign_key"

to_many:
anyOf:
- type: array
items:
$ref: "#/foreign_key"
minItems: 1
- $ref: "#/foreign_key"

datetime:
oneOf:
- type: string
format: date-time
- type: 'null'
term:
$ref: "_terms.yaml#/datetime"

file_name:
type: string
term:
$ref: "_terms.yaml#/file_name"

file_size:
type: integer
term:
$ref: "_terms.yaml#/file_size"

file_format:
type: string
term:
$ref: "_terms.yaml#/file_format"

ga4gh_drs_uri:
type: string
term:
$ref: "_terms.yaml#/ga4gh_drs_uri"

md5sum:
type: string
term:
$ref: "_terms.yaml#/md5sum"
pattern: "^[a-f0-9]{32}$"

object_id:
type: string
description: "The GUID of the object in the index service."

release_state:
description: "Release state of an entity."
default: unreleased
enum:
- unreleased
- released
- redacted

data_bundle_state:
description: "State of a data bundle."
default: submitted
enum:
- submitted
- validated
- error
- released
- suppressed
- redacted

data_file_error_type:
term:
$ref: "_terms.yaml#/data_file_error_type"
enum:
- file_size
- file_format
- md5sum

state:
term:
$ref: "_terms.yaml#/state"
default: validated
downloadable:
- uploaded
- md5summed
- validating
- validated
- error
- invalid
- released
public:
- live
oneOf:
- enum: #This list covers legacy data
- uploading
- uploaded
- md5summing
- md5summed
- validating
- error
- invalid
- suppressed
- redacted
- live
- enum: #This list covers all future data 1/15/16
- validated
- submitted
- released

file_state:
term:
$ref: "_terms.yaml#/file_state"
default: registered
enum:
- registered
- uploading
- uploaded
- validating
- validated
- submitted
- processing
- processed
- released
- error

qc_metrics_state:
term:
$ref: "_terms.yaml#/qc_metric_state"
enum:
- FAIL
- PASS
- WARN

project_id:
type: string
term:
$ref: "_terms.yaml#/project_id"

data_file_properties:
$ref: "#/ubiquitous_properties"
file_name:
$ref: "#/file_name"
file_size:
$ref: "#/file_size"
file_format:
$ref: "#/file_format"
md5sum:
$ref: "#/md5sum"
object_id:
$ref: "#/object_id"
file_state:
$ref: "#/file_state"
error_type:
$ref: "#/data_file_error_type"
ga4gh_drs_uri:
$ref: "#/ga4gh_drs_uri"

workflow_properties:
$ref: "#/ubiquitous_properties"
workflow_link:
description: "Link to Github hash for the CWL workflow used."
type: string
workflow_version:
description: "Major version for a GDC workflow."
type: string
workflow_start_datetime:
$ref: "#/datetime"
workflow_end_datetime:
$ref: "#/datetime"

ubiquitous_properties:
type:
type: string
id:
$ref: "#/UUID"
systemAlias: node_id
submitter_id:
type:
- string
description: >
A project-specific identifier for a node. This property is the calling card/nickname/alias for
a unit of submission. It can be used in place of the UUID for identifying or recalling a node.
state:
$ref: "#/state"
project_id:
$ref: "#/project_id"
created_datetime:
$ref: "#/datetime"
updated_datetime:
$ref: "#/datetime"
6 changes: 6 additions & 0 deletions tests/fixtures/anvil/output/gen3/_settings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Global settings for the graph

# Is the graph case centric, that we want
# to create a link between all children to case
# to expedite case filter on nodes
enable_case_cache: false
Loading

0 comments on commit 75a1a09

Please sign in to comment.