Update schema tests for upstreams release 33
authorDiane Trout <diane@ghic.org>
Tue, 27 Oct 2015 18:18:03 +0000 (11:18 -0700)
committerDiane Trout <diane@ghic.org>
Tue, 27 Oct 2015 18:18:03 +0000 (11:18 -0700)
htsworkflow/submission/test/library.json
htsworkflow/submission/test/test_encoded.py

index f694e10068d66eb3b6f5382966cee10d5de49908..093a5d3d5f12d6920a5c3bf4bcc93b34f2887b89 100644 (file)
 {
+    "title": "Library",
+    "description": "Schema for submitting a molecular library.",
+    "id": "/profiles/library.json",
+    "$schema": "http://json-schema.org/draft-04/schema#",
+    "type": "object",
+    "required": [ "award", "lab", "nucleic_acid_term_id"],
+    "identifyingProperties": ["uuid","accession", "aliases"],
+    "additionalProperties": false,
+    "mixinProperties": [
+        { "$ref": "mixins.json#/schema_version" },
+        { "$ref": "mixins.json#/uuid" },
+        { "$ref": "mixins.json#/accession" },
+        { "$ref": "mixins.json#/aliases" },
+        { "$ref": "mixins.json#/attribution" },
+        { "$ref": "mixins.json#/accessioned_status" },
+        { "$ref": "mixins.json#/submitted" },
+        { "$ref": "mixins.json#/source" },
+        { "$ref": "mixins.json#/product_id" },
+        { "$ref": "mixins.json#/lot_id" },
+        { "$ref": "mixins.json#/notes" }
+    ],
+    "facets": {
+        "status": {
+            "title": "Library status",
+            "type": "string"
+        }
+    },
+    "dependencies": {
+        "nucleic_acid_term_id": ["nucleic_acid_term_name"],
+        "nucleic_acid_term_name": ["nucleic_acid_term_id"],
+        "nucleic_acid_starting_quantity_units": ["nucleic_acid_starting_quantity"],
+        "nucleic_acid_starting_quantity": ["nucleic_acid_starting_quantity_units"],
+        "depleted_in_term_name": ["depleted_in_term_id"],
+        "depleted_in_term_id": ["depleted_in_term_name"],
+        "product_id": ["source"],
+        "lot_id": ["source", "product_id"]
+    },
     "properties": {
+        "schema_version": {
+            "default": "4"
+        },
         "accession": {
-            "comment": "Only admins are allowed to set or update this value.",
-            "accessionType": "LB",
-            "description": "A unique identifier to be used to reference the object.",
-            "permission": "import_items",
-            "serverDefault": "accession",
-            "format": "accession",
-            "title": "Accession",
-            "type": "string"
+            "accessionType": "LB"
         },
-        "alternate_accessions": {
-            "description": "Accessions previously assigned to objects that have been merged with this object.",
-            "title": "Alternate accessions",
+        "spikeins_used": {
+            "title": "Spike-ins datasets used",
+            "description": "The datasets containing the fasta and the concentrations of the library spike-ins.",
+            "type": "array",
             "default": [],
-            "items": {
-                "comment": "Only admins are allowed to set or update this value.",
-                "format": "accession",
+            "items" : {
+                "title": "A spike-ins dataset.",
+                "description": "A specific spike-ins type dataset",
+                "comment": "See dataset.json for available identifiers.",
                 "type": "string",
-                "description": "An accession previously assigned to an object that has been merged with this object.",
-                "title": "Alternate Accession"
-            },
-            "permission": "import_items",
-            "type": "array"
+                "linkTo": "Dataset"
+            }
         },
-        "lot_id": {
+        "biosample": {
+            "title": "Biosample",
+            "description": "The biosample that nucleic acid was isolated from to generate the library.",
+            "comment": "See biosample.json for available identifiers.",
             "type": "string",
-            "description": "The lot identifier provided by the originating lab or vendor.",
-            "title": "Lot ID"
+            "linkTo": "Biosample"
         },
-        "aliases": {
-            "default": [],
-            "items": {
-                "comment": "Current convention is colon separated lab name and lab identifier. (e.g. john-doe:42).",
-                "pattern": "^\\S+:\\S+",
-                "type": "string",
-                "description": "A lab specific identifier to reference an object.",
-                "title": "Lab alias"
-            },
-            "type": "array",
-            "description": "Lab specific identifiers to reference an object.",
-            "title": "Lab aliases"
+        "product_id": {
+            "description": "The product identifier provided by the vendor, for nucleic acids or proteins purchased directly from a vendor (e.g. total RNA)."
         },
-        "submitted_by": {
-            "comment": "Do not submit, value is assigned by the server. The user that created the object.",
-            "linkTo": "user",
-            "title": "Submitted by",
-            "serverDefault": "userid",
-            "permission": "import_items",
-            "type": "string"
+        "lot_id":{
+            "description": "The lot identifier provided by the vendor, for nucleic acids or proteins purchased directly from a vendor (e.g. total RNA)."
+        },
+        "source": {
+            "description": "The vendor, for nucleic acids or proteins purchased directly from a vendor (e.g. total RNA)."
+        },
+        "nucleic_acid_term_name": {
+            "@id": null,
+            "title": "Molecule term",
+            "description": "SO (Sequence Ontology) term best matching the molecule isolated to generate the library (e.g. 'RNA' for a total RNA library, even if that library is subsequently reverse transcribed for DNA sequencing.)",
+            "type": "string",
+            "enum": [
+                "DNA",
+                "RNA",
+                "polyadenylated mRNA",
+                "miRNA",
+                "protein"
+            ]
+        },
+        "nucleic_acid_term_id": {
+            "@type": "@id",
+            "title": "Molecule ID",
+            "description": "SO (Sequence Ontology) identifier best matching the nucleic acid isolated to generate the library",
+            "comment": "Based on the choice in nucleic_acid_term_name use the following guide: DNA - SO:0000352, RNA - SO:0000356,  polyadenylated mRNA - SO:0000871, miRNA - SO:0000276 or protein - SO:0000104" ,
+            "type": "string",
+            "enum": [
+                "SO:0000352",
+                "SO:0000356",
+                "SO:0000871",
+                "SO:0000276",
+                "SO:0000104"
+            ]
         },
         "documents": {
+            "title": "Protocol documents",
+            "description": "Documents that describe the preparation of the library.",
+            "type": "array",
             "default": [],
             "items": {
+                "title": "Protocol document",
+                "description": "A document that describe the preparation of the library. ",
                 "comment": "See document.json for available identifiers.",
                 "type": "string",
-                "description": "A document that describe the preparation of the library. ",
-                "linkTo": "document",
-                "title": "Protocol document"
-            },
+                "linkTo": "Document"
+            }
+        },
+        "dbxrefs": {
+            "@type": "@id",
+            "rdfs:subPropertyOf": "rdfs:seeAlso",
+            "title": "External identifiers",
+            "description": "Unique identifiers from external resources.",
             "type": "array",
-            "description": "Documents that describe the preparation of the library.",
-            "title": "Protocol documents"
+            "default": [],
+            "items": {
+                "title": "External identifier",
+                "description": "A unique identifier from external resource.",
+                "type":  "string",
+                "pattern": "^GEO:GSM\\d+$"
+            }
         },
-        "fragmentation_date": {
-            "comment": "Date can be submitted in as YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSTZD (TZD is the time zone designator; use Z to express time in UTC or for time expressed in local time add a time zone offset from UTC +HH:MM or -HH:MM).",
+        "nucleic_acid_starting_quantity": {
+            "title": "Nucleic acid starting quantity",
+            "description": "The starting amount of nucleic acid before selection and purification.",
             "type": "string",
-            "anyOf": [
-                {
-                    "format": "date-time"
-                },
-                {
-                    "format": "date"
-                }
-            ],
-            "description": "The date that the nucleic acid was fragmented.",
-            "title": "Fragmentation date"
-        },
-        "uuid": {
-            "format": "uuid",
-            "serverDefault": "uuid4",
-            "title": "UUID",
-            "requestMethod": "POST",
-            "permission": "import_items",
-            "type": "string"
-        },
-        "strand_specificity": {
-            "default": false,
-            "type": "boolean",
-            "description": "The preparation of the library using a strand-specific protocol.",
-            "title": "Strand specificity"
-        },
-        "fragmentation_method": {
-            "description": "A short description or reference of the nucleic acid fragmentation protocol used in library preparation, if applicable.",
-            "title": "Fragmentation method",
-            "default": "see document",
-            "format": "semi-controlled",
-            "XXXenum": [
-                "sonication",
-                "see document",
-                "covaris shearing",
-                "chemical (part of Illumina TruSeq mRNA Kit)",
-                "Illumina/Nextera tagmentation",
-                "bioruptor twin",
-                "n/a"
-            ],
-            "type": "string"
+            "pattern": "[0-9]+"
         },
-        "schema_version": {
-            "comment": "Do not submit, value is assigned by the server. The version of the JSON schema that the server uses to validate the object. Schema version indicates generation of schema used to save version to to enable upgrade steps to work. Individual schemas should set the default.",
-            "pattern": "^\\d+(\\.\\d+)*$",
-            "default": "2",
+        "nucleic_acid_starting_quantity_units": {
+            "title": "Nucleic acid starting quantity units",
+            "description": "The units used for starting amount of nucleic acid.",
             "type": "string",
-            "requestMethod": []
+            "enum": [
+                "cells",
+                "cell-equivalent",
+                "µg",
+                "ng",
+                "pg",
+                "mg"
+            ]
         },
-        "lysis_method": {
-            "description": "A short description or reference of the cell lysis protocol used in library preparation, if applicable",
-            "title": "Lysis method",
-            "default": "see document",
-            "format": "semi-controlled",
+        "extraction_method": {
+            "title": "Extraction method",
+            "description": "A short description or reference of the nucleic acid extraction protocol used in library preparation, if applicable.",
+            "type": "string",
             "XXXenum": [
                 "miRNeasy Mini kit (QIAGEN cat#:217004)",
                 "Trizol (LifeTech cat#: 15596-018)",
                 "see document",
                 "n/a"
             ],
-            "type": "string"
+            "format": "semi-controlled"
         },
-        "source": {
-            "comment": "See source.json for available identifiers.",
-            "title": "Source",
+        "fragmentation_method": {
+            "title": "Fragmentation method",
+            "description": "A short description or reference of the nucleic acid fragmentation protocol used in library preparation, if applicable.",
             "type": "string",
-            "description": "The originating lab or vendor.",
-            "linkTo": "source"
+            "enum": [
+                "chemical (generic)",
+                "chemical (DnaseI)",
+                "chemical (HindIII/DpnII restriction)",
+                "chemical (Tn5 transposase)",
+                "chemical (micrococcal nuclease)",
+                "chemical (Illumina TruSeq)",
+                "chemical (Nextera tagmentation)",
+                "shearing (generic)",
+                "shearing (Covaris generic)",
+                "shearing (Covaris S2)",
+                "sonication (generic)",
+                "sonication (Bioruptor generic)",
+                "sonication (Bioruptor Plus)",
+                "sonication (Bioruptor Twin)",
+                "sonication (generic microtip)",
+                "sonication (Branson Sonifier 450)",
+                "shearing (Covaris LE Series)",
+                "see document",
+                "none",
+                "n/a"
+            ]
         },
-        "biosample": {
-            "comment": "See biosample.json for available identifiers.",
-            "title": "Biosample",
+        "fragmentation_date":{
+            "title": "Fragmentation date",
+            "description": "The date that the nucleic acid was fragmented.",
+            "comment": "Date can be submitted in as YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSTZD (TZD is the time zone designator; use Z to express time in UTC or for time expressed in local time add a time zone offset from UTC +HH:MM or -HH:MM).",
             "type": "string",
-            "description": "The biosample that nucleic acid was isolated from to generate the library.",
-            "linkTo": "biosample"
+            "anyOf": [
+                {"format": "date-time"},
+                {"format": "date"}
+            ]
         },
-        "extraction_method": {
-            "description": "A short description or reference of the nucleic acid extraction protocol used in library preparation, if applicable.",
-            "title": "Extraction method",
-            "default": "see document",
-            "format": "semi-controlled",
+        "library_size_selection_method": {
+            "title": "Size selection method",
+            "description": "A short description or reference of the size selection protocol used in library preparation, if applicable.",
+            "type": "string",
+            "XXXenum": [
+                "gel",
+                "see document",
+                "SPRI beads"
+            ],
+            "format": "semi-controlled"
+        },
+        "lysis_method": {
+            "title": "Lysis method",
+            "description": "A short description or reference of the cell lysis protocol used in library preparation, if applicable",
+            "type": "string",
             "XXXenum": [
                 "miRNeasy Mini kit (QIAGEN cat#:217004)",
                 "Trizol (LifeTech cat#: 15596-018)",
                 "see document",
                 "n/a"
             ],
-            "type": "string"
-        },
-        "library_size_selection_method": {
-            "description": "A short description or reference of the size selection protocol used in library preparation, if applicable.",
-            "title": "Size selection method",
-            "default": "see document",
-            "format": "semi-controlled",
-            "XXXenum": [
-                "gel",
-                "see document",
-                "SPRI beads"
-            ],
-            "type": "string"
+            "format": "semi-controlled"
         },
-        "status": {
-            "default": "CURRENT",
-            "enum": [
-                "CURRENT",
-                "DELETED"
-            ],
+        "crosslinking_method": {
+            "title": "Crosslinking method",
+            "description": "A short description or reference of the crosslinking protocol used in library preparation, if applicable.",
             "type": "string",
-            "title": "Status"
-        },
-        "nucleic_acid_term_name": {
             "enum": [
-                "DNA",
-                "RNA",
-                "polyadenylated mRNA",
-                "miRNA"
-            ],
+                "formaldehyde",
+                "ultraviolet irradiation"
+            ]
+        },
+        "size_range": {
+            "title": "Size range",
+            "description": "The measured size range of the purified nucleic acid, in bp.",
             "type": "string",
-            "description": "SO (Sequence Ontology) term best matching the nucleic acid isolated to generate the library (e.g. 'RNA' for a total RNA library, even if that library is subsequently reverse transcribed for DNA sequencing.)",
-            "title": "Nucleic acid term"
+            "pattern": "(^[0-9]+-[0-9]+$|^[<>][0-9]+$)"
+        },
+        "strand_specificity": {
+            "title": "Strand specificity",
+            "description": "The preparation of the library using a strand-specific protocol.",
+            "type": "boolean",
+            "default": false
         },
         "treatments": {
+            "title": "Treatments",
+            "type": "array",
             "default": [],
             "items": {
+                "title": "Treatment",
                 "comment": "See treatment.json for available identifiers.",
                 "type": "string",
-                "linkTo": "treatment",
-                "title": "Treatment"
-            },
-            "type": "array",
-            "title": "Treatments"
-        },
-        "award": {
-            "comment": "See award.json for list of available identifiers.",
-            "title": "Grant",
-            "type": "string",
-            "description": "Grant associated with the submission.",
-            "linkTo": "award"
+                "linkTo": "Treatment"
+            }
         },
         "depleted_in_term_name": {
+            "@id": null,
+            "type": "array",
+            "title": "Depleted in term",
+            "description": "SO (Sequence Ontology) term best matching the nucleic acid that was diminished from the library.",
             "default": [],
             "items": {
+                "type": "string",
                 "enum": [
                     "rRNA",
                     "polyadenylated mRNA",
                     "capped mRNA"
-                ],
-                "type": "string",
-                "description": "SO (Sequence Ontology) term best matching the nucleic acid that was diminished from the library.",
-                "title": "Depleted in term"
-            },
-            "type": "array"
-        },
-        "paired_ended": {
-            "default": false,
-            "XXXnote": "Is this redundant to the field found in replicate.json",
-            "type": "boolean",
-            "description": "Whether or not the library was prepared with paired ends",
-            "title": "Paired ended"
-        },
-        "lab": {
-            "comment": "See lab.json for list of available identifiers.",
-            "title": "Lab",
-            "type": "string",
-            "description": "Lab associated with the submission.",
-            "linkTo": "lab"
+                ]
+            }
         },
         "depleted_in_term_id": {
+            "@type": "@id",
+            "type": "array",
+            "title": "Depleted in ID",
+            "description": "SO (Sequence Ontology) identifier best matching the nucleic acid that was diminished from the library.",
+            "comment": "Based on the choice in depleted_in_term_name use the following guide: rRNA - SO:0000252,  polyadenylated mRNA - SO:0000871 or capped mRNA - SO:0000862" ,
             "default": [],
             "items": {
-                "comment": "Based on the choice in depleted_in_term_name use the following guide: rRNA - SO:0000252,  polyadenylated mRNA - SO:0000871 or capped mRNA - SO:0000862",
+                "type": "string",
                 "enum": [
                     "SO:0000252",
                     "SO:0000871",
                     "SO:0000862"
-                ],
-                "type": "string",
-                "description": "SO (Sequence Ontology) identifier best matching the nucleic acid that was diminished from the library.",
-                "title": "Depleted in ID"
-            },
-            "type": "array"
-        },
-        "product_id": {
-            "type": "string",
-            "description": "The product identifier provided by the originating lab or vendor.",
-            "title": "Product ID"
-        },
-        "size_range": {
-            "pattern": "(^[0-9]+-[0-9]+$|^[<>][0-9]+$)",
-            "type": "string",
-            "description": "The measured size range of the purified nucleic acid, in kD.",
-            "title": "Size range"
-        },
-        "notes": {
-            "title": "Notes",
-            "type": "string",
-            "description": "Additional information.",
-            "permission": "import_items"
-        },
-        "nucleic_acid_term_id": {
-            "comment": "Based on the choice in nucleic_acid_term_name use the following guide: DNA - SO:0000352, RNA - SO:0000356,  polyadenylated mRNA - SO:0000871 or miRNA - SO:0000276",
-            "enum": [
-                "SO:0000352",
-                "SO:0000356",
-                "SO:0000871",
-                "SO:0000276"
-            ],
-            "type": "string",
-            "description": "SO (Sequence Ontology) identifier best matching the nucleic acid isolated to generate the library (e.g. 'SO:0000356' for a total RNA library, even if that library is subsequently reverse transcribed for DNA sequencing.)",
-            "title": "Nucleic acid ID"
-        },
-        "nucleic_acid_starting_quantity": {
-            "pattern": "[0-9]+",
-            "type": "string",
-            "description": "The starting amount of nucleic acid before selection and purification.",
-            "title": "Nucleic acid starting quantity"
-        },
-        "date_created": {
-            "comment": "Do not submit, value is assigned by the server. The date the object is created.",
-            "title": "Date created",
-            "serverDefault": "now",
-            "permission": "import_items",
-            "anyOf": [
-                {
-                    "format": "date-time"
-                },
-                {
-                    "format": "date"
-                }
-            ],
-            "type": "string"
+                ]
+            }
         }
     },
-    "description": "Schema for submitting a nucleic acid library.",
-    "title": "Library",
-    "required": [
-        "award",
-        "lab",
-        "nucleic_acid_term_id"
-    ],
-    "mixinProperties": [
-        {
-            "$ref": "mixins.json#/schema_version"
-        },
-        {
-            "$ref": "mixins.json#/uuid"
-        },
-        {
-            "$ref": "mixins.json#/accession"
-        },
-        {
-            "$ref": "mixins.json#/aliases"
-        },
-        {
-            "$ref": "mixins.json#/attribution"
-        },
-        {
-            "$ref": "mixins.json#/standard_status"
+    "columns": {
+        "accession": {
+            "title": "Accession",
+            "type": "string"
         },
-        {
-            "$ref": "mixins.json#/submitted"
+        "award": {
+            "title": "Award",
+            "type": "string"
         },
-        {
-            "$ref": "mixins.json#/source"
+        "lab": {
+            "title": "Lab",
+            "type": "string"
         },
-        {
-            "$ref": "mixins.json#/product_id"
+        "biosample.biosample_term_name": {
+            "title": "Biosample",
+            "type": "string"
         },
-        {
-            "$ref": "mixins.json#/lot_id"
+        "biosample.organism.name": {
+            "title": "Species",
+            "type": "string"
         },
-        {
-            "$ref": "mixins.json#/notes"
+        "nucleic_acid_term_name": {
+            "title": "Nucleic Acid Term Name",
+            "type": "string"
         }
-    ],
-    "XXXcomment": "is source required?",
-    "identifyingProperties": [
-        "uuid",
-        "accession",
-        "aliases"
-    ],
-    "additionalProperties": false,
-    "$schema": "http://json-schema.org/draft-04/schema#",
-    "type": "object",
-    "id": "/profiles/library.json"
+    },
+    "boost_values": {
+        "accession": 1.0,
+        "alternate_accessions": 1.0,
+        "aliases": 1.0,
+        "biosample.accession": 1.0,
+        "biosample.alternate_accessions": 1.0,
+        "biosample.aliases": 1.0,
+        "biosample.donor.accession": 1.0,
+        "biosample.donor.organism.name": 1.0
+    },
+    "changelog": "/profiles/changelogs/library.md"
 }
index 336424c1aa762360fd0cc16512229a887df2ffb4..618f6c9bda999c146f4c9142dc184847266bdab0 100644 (file)
@@ -31,7 +31,7 @@ class TestEncoded(TestCase):
         schema = json.loads(open(schema_file, 'r').read())
 
         obj = {u'@id': u'/libraries/ENCLB045ZZZ/',
-               u'@type': [u'library', u'item'],
+               u'@type': [u'Library', u'Item'],
                u'accession': u'ENCLB045ZZZ',
                u'aliases': [],
                u'alternate_accessions': [],
@@ -42,16 +42,15 @@ class TestEncoded(TestCase):
                u'depleted_in_term_name': [],
                u'documents': [],
                u'extraction_method': u'Ambion mirVana',
-               u'fragmentation_method': u'Illumina/Nextera tagmentation',
+               u'fragmentation_method': u'chemical (Nextera tagmentation)',
                u'lab': u'/labs/barbara-wold/',
                u'library_size_selection_method': u'SPRI beads',
                u'lysis_method': u'Ambion mirVana',
                u'nucleic_acid_term_id': u'SO:0000871',
                u'nucleic_acid_term_name': u'polyadenylated mRNA',
-               u'paired_ended': False,
                u'schema_version': u'2',
                u'size_range': u'>200',
-               u'status': u'CURRENT',
+               u'status': u'released',
                u'strand_specificity': False,
                u'submitted_by': u'/users/0e3dde9b-aaf9-42dd-87f7-975a85072ed2/',
                u'treatments': [],
@@ -63,14 +62,14 @@ class TestEncoded(TestCase):
 
     def test_create_context(self):
         linked_id = {'@type': '@id'}
-        library = { '@id': '/libraries/1234', '@type': ['library', 'item'] }
+        library = { '@id': '/libraries/1234', '@type': ['Library', 'Item'] }
 
         encode = ENCODED('test.encodedcc.org')
         url = encode.prepare_url(library['@id'])
         context = encode.create_jsonld_context(library, url)
-        self.assertEqual(context['@vocab'], 'https://test.encodedcc.org/profiles/library.json#')
+        self.assertEqual(context['@vocab'], 'https://www.encodeproject.org/profiles/Library.json#')
         self.assertEqual(context['award'], linked_id )
-        self._verify_context(context, 'library')
+        self._verify_context(context, 'Library')
         # namespaces not added yet.
         self.assertRaises(AssertionError, self._verify_namespaces, context)
         encode.add_jsonld_namespaces(context)
@@ -85,8 +84,8 @@ class TestEncoded(TestCase):
             "@id": "/libraries/ENCLB044ZZZ/",
             "schema_version": "1",
             "@type": [
-                "library",
-                "item"
+                "Library",
+                "Item"
             ],
             "lysis_method": "Ambion mirVana",
             "nucleic_acid_term_id": "SO:0000356",
@@ -102,8 +101,8 @@ class TestEncoded(TestCase):
                 ],
                 "organism": "/organisms/human/",
                 "@type": [
-                "biosample",
-                "item"
+                "Biosample",
+                "Item"
                 ]
             },
         }
@@ -118,9 +117,9 @@ class TestEncoded(TestCase):
 
         self.assertEqual(obj['biosample']['@context']['@base'], bio_base)
         self.assertEqual(obj['@context']['@vocab'], schema_url)
-        self._verify_context(obj['@context'], 'library')
+        self._verify_context(obj['@context'], 'Library')
         self._verify_namespaces(obj['@context'])
-        self._verify_context(obj['biosample']['@context'], 'biosample')
+        self._verify_context(obj['biosample']['@context'], 'Biosample')
         self.assertEqual(obj['@context']['rdf'], 'http://www.w3.org/1999/02/22-rdf-syntax-ns#')
         self.assertEqual(obj['@context']['OBO'], 'http://purl.obolibrary.org/obo/')
 
@@ -136,7 +135,7 @@ class TestEncoded(TestCase):
                    'facets': [],
                     '@graph': [{
                     u'@id': u'/biosamples/ENCBS125ENC/',
-                    u'@type': [u'biosample', u'item'],
+                    u'@type': [u'Biosample', u'Item'],
                     u'accession': u'ENCBS125ENC',
                     u'award.rfa': u'ENCODE2-Mouse',
                     u'biosample_term_name': u'myocyte',
@@ -150,7 +149,7 @@ class TestEncoded(TestCase):
                     u'status': u'CURRENT',
                     u'treatments.length': []},
                     {u'@id': u'/biosamples/ENCBS126ENC/',
-                    u'@type': [u'biosample', u'item'],
+                    u'@type': [u'Biosample', u'Item'],
                     u'accession': u'ENCBS126ENC',
                     u'award.rfa': u'ENCODE2-Mouse',
                     u'biosample_term_name': u'myocyte',