diff --git a/dataservice/api/genomic_file/schemas.py b/dataservice/api/genomic_file/schemas.py index 56e62918..99cf052e 100644 --- a/dataservice/api/genomic_file/schemas.py +++ b/dataservice/api/genomic_file/schemas.py @@ -130,7 +130,24 @@ "Variant Calling Metrics", "Variant Summary", "WGS Metric", - "WXS Metric"} + "WXS Metric", + "Adapter Stats", + "Alignment Metrics", + "Alignment Stats", + "Artifact Metrics", + "Chimeric Aligned Reads", + "Cutadapter Metrics", + "GC Metrics", + "Gender Metrics", + "Gender QC Metrics", + "Genome Aligned Reads", + "Genome Aligned Reads Index", + "Het Call QC Metrics", + "Insert Size Metrics", + "QC Metrics", + "WGS Metrics", + "WXS Metrics", +} PAIRED_END_ENUM = {1, 2} @@ -145,6 +162,12 @@ "Somatic-Mutation", } +RELEASE_STATUS_ENUM = { + "latest", + "previous", + "unharmonized", +} + class GenomicFileSchema(BaseSchema, IndexdFileSchema): class Meta(BaseSchema.Meta, IndexdFileSchema.Meta): @@ -178,6 +201,10 @@ class Meta(BaseSchema.Meta, IndexdFileSchema.Meta): GenomicFile, 'workflow_type', validate=enum_validation_generator(WORKFLOW_TYPE_ENUM) ) + release_status = field_for( + GenomicFile, 'release_status', + validate=enum_validation_generator(RELEASE_STATUS_ENUM) + ) _links = ma.Hyperlinks({ 'self': ma.URLFor(Meta.resource_url, kf_id=''), diff --git a/tests/data.json b/tests/data.json index d6203812..f892529c 100644 --- a/tests/data.json +++ b/tests/data.json @@ -114,7 +114,7 @@ "workflow_type": "Alignment", "workflow_tool": "tool", "workflow_version": "v1", - "release_status": "released", + "release_status": "latest", "data_category": "foo", "visible": true }, @@ -281,7 +281,8 @@ "controlled_access": true, "paired_end": 1, "data_type": "Expression", - "workflow_type": "Alignment" + "workflow_type": "Alignment", + "release_status": "latest" }, "invalid": [ { "paired_end": -1 }, @@ -289,7 +290,8 @@ { "controlled_access": "hello", "size": "hello" }, { "availability": "availble for download" }, { "data_type": "read" }, - { "workflow_type": "foo" } + { "workflow_type": "foo" }, + { "release_status": "foo" } ] }, "/biospecimen-genomic-files": {