Skip to content

Commit

Permalink
Added record series schema (INCF#355)
Browse files Browse the repository at this point in the history
* ADD record series

* FIX case and removed unnecessary props

* FIX schema name

* ADD cell record series

* FIX json syntax

* FIX id of shape

* FIX id of shape

* FIX RecordSeries

* FIX list of RecordMesure

* removed the list thing

* removed temp file

* removed Travis before script

* typo
  • Loading branch information
jonathanlurie authored and MFSY committed Dec 2, 2019
1 parent 6a25811 commit 57ef7b8
Show file tree
Hide file tree
Showing 4 changed files with 212 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ matrix:
install:
- pip install pyshacl
- pip install pytest
before_script:
- mv ~/virtualenv/python3.7/bin/owlrl.py ~/virtualenv/python3.7/bin/owlrl
script:
- pytest tests

Expand Down
14 changes: 13 additions & 1 deletion shapes/neurosciencegraph/commons/quantitativevalue/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@
{
"datatype": "xsd:double"
},
{
"datatype": "xsd:int"
},
{
"datatype": "xsd:long"
},
{
"datatype": "xsd:unsignedInt"
},
{
"datatype": "xsd:unsignedLong"
},
{
"datatype": "xsd:integer"
}
Expand Down Expand Up @@ -137,4 +149,4 @@
]
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"@context": [
"https://incf.github.io/neuroshapes/contexts/schema.json",
{
"this": "https://neuroshapes.org/dash/cellrecordseries/shapes/"
}
],
"@id": "https://neuroshapes.org/dash/cellrecordseries",
"@type": "nxv:Schema",
"imports": [
"https://neuroshapes.org/dash/recordseries",
"https://neuroshapes.org/commons/brainlocation",
"https://neuroshapes.org/commons/typedlabeledontologyterm"
],
"shapes": [
{
"@id": "this:CellRecordSeriesShape",
"@type": "sh:NodeShape",
"label": "A Record Series for cells",
"targetClass": [
"nsg:RecordSeries",
"nsg:CellRecordSeries"
],
"nodeKind": "sh:BlankNodeOrIRI",
"and": [
{
"node": "https://neuroshapes.org/dash/recordseries/shapes/RecordSeriesShape"
},
{
"property": [
{
"path": "nsg:mType",
"name": "Morphology type",
"description": "The morphology type of the reconstructed cell.",
"editorialNote": "Need the cell type for class restriction.",
"node": "https://neuroshapes.org/commons/typedlabeledontologyterm/shapes/CellTypeOntologyTermShape",
"maxCount": 1
},
{
"path": "nsg:isRegisteredIn",
"class": "nsg:BrainAtlasSpatialReferenceSystem",
"maxCount": 1
}
]
}
]
},
{
"@id": "this:BrainLocationShape",
"@type": "sh:NodeShape",
"label": "A morphology release distribution shape.",
"nodekind": "sh:BlankNodeOrIRI",
"and": [
{
"node": "https://neuroshapes.org/commons/brainlocation/shapes/BrainLocationShape"
},
{
"property": [
{
"path": "nsg:atlasSpatialReferenceSystem",
"name": "Atlas Spatial Reference System",
"class": "nsg:BrainAtlasSpatialReferenceSystem",
"minCount": 1,
"maxCount": 1
}
]
}
]
}
]
}
128 changes: 128 additions & 0 deletions shapes/neurosciencegraph/datashapes/atlas/recordseries/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{
"@context": [
"https://incf.github.io/neuroshapes/contexts/schema.json",
{
"this": "https://neuroshapes.org/dash/recordseries/shapes/"
}
],
"@id": "https://neuroshapes.org/dash/recordseries",
"@type": "nxv:Schema",
"imports": [
"https://neuroshapes.org/commons/entity"
],
"shapes": [
{
"@id": "this:RecordSeriesShape",
"@type": "sh:NodeShape",
"label": "Record Series",
"description": "Definition of a series of records, each record having measures. Files types for this purpose are usually CSV, TSV or binary buffers",
"targetClass": [
"nsg:RecordSeries"
],
"nodeKind": "sh:BlankNodeOrIRI",
"and": [
{
"node": "https://neuroshapes.org/commons/entity/shapes/EntityShape"
},
{
"property": [

{
"path": "nsg:recordMeasure",
"name": "Record Measure",
"description": "List of measures performed or computed on a system",
"minCount": 1
},

{
"path": "nsg:numberOfRecords",
"name": "Number Of Records",
"description": "Number of record in this series",
"datatype": "xsd:long",
"minCount": 1
},

{
"path": "nsg:byteOffset",
"name": "Byte Offset",
"description": "Number of byte at the beginning of the file/buffer before the first measure or the first record. Mostly relevant for binary buffers as CSV would usually contain a header.",
"datatype": "xsd:long"
},

{
"path": "nsg:bufferEncoding",
"name": "Buffer Encoding",
"description": "Encoding used for the whole series, once uncompressed if any compression method was used.",
"in": [
"ascii",
"binary"
],
"minCount": 1,
"maxCount": 1
},

{
"path": "nsg:endianness",
"name": "Endianness",
"description": "Endianness of the encoding, not applicable if buffer encoding is ascii",
"in": [
"little",
"big"
],
"maxCount": 1
}

]
}
]
},

{
"@id": "this:RecordMeasureShape",
"@type": "sh:NodeShape",
"targetClass": "nsg:RecordMeasure",
"label": "Record Measure Shape",
"description": "A measure can be anything",
"property": [
{
"path": "schema:name",
"name": "Name",
"description": "Name of the measure",
"datatype": "xsd:string",
"minCount": 1,
"maxCount": 1
},

{
"path": "schema:description",
"name": "Description",
"description": "Description of what this measure is about",
"datatype": "xsd:string",
"maxCount": 1
},

{
"path": "nsg:componentEncoding",
"name": "Data Type",
"description": "Type of the value",
"minCount": 1,
"maxCount": 1,
"in": [
"ascii",
"uint8",
"int8",
"uint16",
"int16",
"uint32",
"int32",
"uint64",
"int64",
"float16",
"float32",
"float64"
]
}
]
}
]
}

0 comments on commit 57ef7b8

Please sign in to comment.