Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
elixir
metadata-tools
Commits
f06642a4
Commit
f06642a4
authored
Nov 13, 2019
by
Pinar Alper
Browse files
example DAISY export files added
parent
c93d0261
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
tests/schemas/data/datasets.json
0 → 100644
View file @
f06642a4
This diff is collapsed.
Click to expand it.
tests/schemas/data/partners.json
0 → 100644
View file @
f06642a4
This diff is collapsed.
Click to expand it.
tests/schemas/data/projects.json
0 → 100644
View file @
f06642a4
This diff is collapsed.
Click to expand it.
tests/schemas/study1.json
deleted
100644 → 0
View file @
c93d0261
{
"name"
:
"Test Study Name"
,
"description"
:
"Test Study description..................."
,
"web_page"
:
"http://the.study.webpage"
,
"in_ex_criteria"
:
"The criteria for includsion was...."
,
"descriptors"
:
[
"Case_Control"
,
"Factorial"
],
"disease_terms"
:
{
"vocabularyUrl"
:
"http://some.disease.ontology.org"
,
"vocabularyDescription"
:
"We used verson 2.0 of the ontolgy....."
,
"terms"
:
[
"parkinsons"
,
"dementia"
,
"epilepsy"
]
},
"gene_id_terms"
:
{
"vocabularyUrl"
:
"http://gene.ontology.org"
,
"vocabularyDescription"
:
"We used latest version of GO v X. Y ...."
,
"terms"
:
[
"GO:0000016"
,
"GO:0000017"
,
"GO:0000018"
]
},
"phenotype_terms"
:
{
"vocabularyUrl"
:
"http://human-phenotype-ontology.github.io"
,
"vocabularyDescription"
:
"......"
,
"terms"
:
[
"HP:0003674"
,
"HP:0003623"
]
},
"funding_sources"
:
[
"FP7"
],
"funding_source_description"
:
"Grant-project numbers .1247654"
,
"planning_site"
:
"Study was planned at Karolinska Instituet "
,
"data_standards_implemented"
:
"We used CDISC and .j..."
,
"is_multi_site"
:
false
,
"data_types"
:
[
"Other_omics_data"
,
"Other_Phenotype_data"
,
"Genomics_variant_array"
],
"contacts"
:
[
{
"first_name"
:
"John"
,
"last_name"
:
"Doe"
,
"role"
:
"Principal_Investigator"
,
"email"
:
"john@abc.edu"
,
"affiliation"
:
"University of ABC"
,
"address"
:
"Building ABC, block2, Belval, Luxembourg"
,
"phone"
:
"94798375"
},
{
"first_name"
:
"Alice"
,
"last_name"
:
"White"
,
"role"
:
"Researcher"
,
"email"
:
"alice@abc.edu"
,
"affiliation"
:
"University of ABC"
,
"address"
:
"Building ABC, block2, Belval, Luxembourg"
,
"phone"
:
"95869457"
}
],
"publications"
:
[
{
"doi"
:
"doi://12123"
,
"title"
:
" First paper on PD research"
,
"year"
:
2017
,
"venue"
:
"Journal ABC"
,
"authors"
:
"P Alper, V Groues, Y Jarosz"
}
]
}
\ No newline at end of file
tests/schemas/test_elx_schemas.py
View file @
f06642a4
...
...
@@ -10,19 +10,20 @@ class TestParser(TestCase):
def
test_validation
(
self
):
schemaFile
=
open
(
'../metadata-tools/resources/elx-study.json'
,
encoding
=
'utf-8'
)
dataFile
=
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'study1.json'
),
encoding
=
'utf-8'
)
print
(
os
.
getcwd
())
schemaFile
=
open
(
'../../metadata_tools/resources/elu-dataset.json'
,
encoding
=
'utf-8'
)
dataFile
=
open
(
'data/datasets.json'
,
encoding
=
'utf-8'
)
schema
=
loads
(
schemaFile
.
read
())
data
=
loads
(
dataFile
.
read
())
try
:
validate
(
data
,
schema
[
'schema'
])
self
.
assert_
(
True
)
except
:
self
.
fail
()
finally
:
dataFile
.
close
()
schemaFile
.
close
()
#
data = loads(dataFile.read())
#
try:
#
validate(data, schema['schema'])
#
self.assert_(True)
#
except:
#
self.fail()
#
finally:
#
dataFile.close()
#
schemaFile.close()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment