bio-publisci 0.0.8 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +10 -0
  3. data/Rakefile +1 -1
  4. data/bin/bio-publisci-server +50 -0
  5. data/features/reader_steps.rb +1 -1
  6. data/lib/bio-publisci.rb +11 -2
  7. data/lib/bio-publisci/datacube_model.rb +92 -88
  8. data/lib/bio-publisci/dataset/ORM/data_cube_orm.rb +0 -1
  9. data/lib/bio-publisci/dataset/data_cube.rb +78 -44
  10. data/lib/bio-publisci/dataset/dataset_for.rb +26 -27
  11. data/lib/bio-publisci/metadata/metadata_model.rb +21 -23
  12. data/lib/bio-publisci/metadata/prov/model/prov_models.rb +5 -5
  13. data/lib/bio-publisci/output.rb +1 -1
  14. data/lib/bio-publisci/parser.rb +130 -12
  15. data/lib/bio-publisci/post_processor.rb +95 -0
  16. data/lib/bio-publisci/query/query_helper.rb +13 -8
  17. data/lib/bio-publisci/readers/arff.rb +1 -1
  18. data/lib/bio-publisci/readers/base.rb +57 -0
  19. data/lib/bio-publisci/readers/csv.rb +2 -5
  20. data/lib/bio-publisci/readers/dataframe.rb +2 -2
  21. data/lib/bio-publisci/readers/maf.rb +199 -0
  22. data/lib/bio-publisci/readers/r_cross.rb +6 -10
  23. data/lib/bio-publisci/readers/r_matrix.rb +1 -1
  24. data/lib/bio-publisci/writers/base.rb +16 -0
  25. data/lib/bio-publisci/writers/json.rb +18 -0
  26. data/resources/maf_example.maf +10 -0
  27. data/resources/maf_rdf.ttl +1173 -0
  28. data/resources/primer.ttl +38 -0
  29. data/resources/queries/gene.rq +16 -0
  30. data/resources/queries/hugo_to_ensembl.rq +7 -0
  31. data/resources/queries/maf_column.rq +26 -0
  32. data/resources/queries/patient.rq +11 -0
  33. data/resources/queries/patient_list.rq +11 -0
  34. data/resources/queries/patients_with_mutation.rq +18 -0
  35. data/scripts/get_gene_lengths.rb +50 -0
  36. data/scripts/islet_mlratio.rb +1 -1
  37. data/scripts/scan_islet.rb +1 -1
  38. data/scripts/update_reference.rb +8 -3
  39. data/server/helpers.rb +215 -0
  40. data/server/public/src-min-noconflict/LICENSE +24 -0
  41. data/server/public/src-min-noconflict/ace.js +11 -0
  42. data/server/public/src-min-noconflict/ext-chromevox.js +1 -0
  43. data/server/public/src-min-noconflict/ext-elastic_tabstops_lite.js +1 -0
  44. data/server/public/src-min-noconflict/ext-emmet.js +1 -0
  45. data/server/public/src-min-noconflict/ext-keybinding_menu.js +1 -0
  46. data/server/public/src-min-noconflict/ext-language_tools.js +1 -0
  47. data/server/public/src-min-noconflict/ext-modelist.js +1 -0
  48. data/server/public/src-min-noconflict/ext-old_ie.js +1 -0
  49. data/server/public/src-min-noconflict/ext-searchbox.js +1 -0
  50. data/server/public/src-min-noconflict/ext-settings_menu.js +1 -0
  51. data/server/public/src-min-noconflict/ext-spellcheck.js +1 -0
  52. data/server/public/src-min-noconflict/ext-split.js +1 -0
  53. data/server/public/src-min-noconflict/ext-static_highlight.js +1 -0
  54. data/server/public/src-min-noconflict/ext-statusbar.js +1 -0
  55. data/server/public/src-min-noconflict/ext-textarea.js +1 -0
  56. data/server/public/src-min-noconflict/ext-themelist.js +1 -0
  57. data/server/public/src-min-noconflict/ext-whitespace.js +1 -0
  58. data/server/public/src-min-noconflict/keybinding-emacs.js +1 -0
  59. data/server/public/src-min-noconflict/keybinding-vim.js +1 -0
  60. data/server/public/src-min-noconflict/mode-ruby.js +1 -0
  61. data/server/public/src-min-noconflict/snippets/ruby.js +1 -0
  62. data/server/public/src-min-noconflict/theme-twilight.js +1 -0
  63. data/server/public/src-min-noconflict/worker-coffee.js +1 -0
  64. data/server/public/src-min-noconflict/worker-css.js +1 -0
  65. data/server/public/src-min-noconflict/worker-javascript.js +1 -0
  66. data/server/public/src-min-noconflict/worker-json.js +1 -0
  67. data/server/public/src-min-noconflict/worker-lua.js +1 -0
  68. data/server/public/src-min-noconflict/worker-php.js +1 -0
  69. data/server/public/src-min-noconflict/worker-xquery.js +1 -0
  70. data/server/routes.rb +123 -0
  71. data/server/views/dsl.haml +65 -0
  72. data/server/views/dump.haml +3 -0
  73. data/server/views/import.haml +35 -0
  74. data/server/views/new_repository.haml +25 -0
  75. data/server/views/query.haml +28 -0
  76. data/server/views/repository.haml +25 -0
  77. data/spec/ORM/data_cube_orm_spec.rb +1 -0
  78. data/spec/bnode_spec.rb +66 -0
  79. data/spec/data_cube_spec.rb +66 -63
  80. data/spec/dataset_for_spec.rb +36 -16
  81. data/spec/dsl_spec.rb +41 -0
  82. data/spec/generators/csv_spec.rb +3 -3
  83. data/spec/generators/dataframe_spec.rb +2 -2
  84. data/spec/generators/maf_spec.rb +40 -0
  85. data/spec/generators/r_cross_spec.rb +2 -2
  86. data/spec/generators/r_matrix_spec.rb +2 -2
  87. data/spec/length_lookup_spec.rb +0 -0
  88. data/spec/maf_query_spec.rb +343 -0
  89. data/spec/resource/example.Rhistory +1 -1
  90. data/spec/turtle/bacon +9 -9
  91. data/spec/turtle/reference +43 -43
  92. data/spec/turtle/weather +10 -10
  93. data/spec/writer_spec.rb +16 -2
  94. metadata +212 -61
@@ -1,3 +1,3 @@
1
1
  library(qtl)
2
2
  data(listeria)
3
- mr = scanone(listeria,method='mr')
3
+ mr = scanone(listeria,method='mr')
@@ -1,13 +1,13 @@
1
- @base <http://www.rqtl.org/ns/dc/> .
2
- @prefix ns: <http://www.rqtl.org/ns/dataset/bacon/> .
1
+ @base <http://onto.strinz.me/dc/dataset/bacon/> .
2
+ @prefix ns: <http://onto.strinz.me/dc/dataset/bacon/> .
3
3
  @prefix qb: <http://purl.org/linked-data/cube#> .
4
4
  @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
5
5
  @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
6
- @prefix prop: <http://www.rqtl.org/dc/properties/> .
6
+ @prefix prop: <http://onto.strinz.me/properties/> .
7
7
  @prefix dct: <http://purl.org/dc/terms/> .
8
8
  @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
9
- @prefix cs: <http://www.rqtl.org/dc/dataset/bacon/cs/> .
10
- @prefix code: <http://www.rqtl.org/dc/dataset/bacon/code/> .
9
+ @prefix cs: <http://onto.strinz.me/dc/dataset/bacon/cs/> .
10
+ @prefix code: <http://onto.strinz.me/dc/dataset/bacon/code/> .
11
11
  @prefix owl: <http://www.w3.org/2002/07/owl#> .
12
12
  @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
13
13
  @prefix foaf: <http://xmlns.com/foaf/0.1/> .
@@ -25,19 +25,19 @@ ns:dataset-bacon a qb:DataSet ;
25
25
  qb:structure ns:dsd-bacon .
26
26
 
27
27
  cs:producer a qb:ComponentSpecification ;
28
- rdfs:label "producer Component" ;
28
+ rdfs:label "producer" ;
29
29
  qb:dimension prop:producer .
30
30
 
31
31
  cs:pricerange a qb:ComponentSpecification ;
32
- rdfs:label "pricerange Component" ;
32
+ rdfs:label "pricerange" ;
33
33
  qb:dimension prop:pricerange .
34
34
 
35
35
  cs:chunkiness a qb:ComponentSpecification ;
36
- rdfs:label "chunkiness Component" ;
36
+ rdfs:label "chunkiness" ;
37
37
  qb:measure prop:chunkiness .
38
38
 
39
39
  cs:deliciousness a qb:ComponentSpecification ;
40
- rdfs:label "deliciousness Component" ;
40
+ rdfs:label "deliciousness" ;
41
41
  qb:measure prop:deliciousness .
42
42
 
43
43
  prop:producer a rdf:Property, qb:DimensionProperty ;
@@ -1,13 +1,13 @@
1
- @base <http://www.rqtl.org/ns/dc/> .
2
- @prefix ns: <http://www.rqtl.org/ns/dataset/mr/> .
1
+ @base <http://onto.strinz.me/dc/dataset/mr/> .
2
+ @prefix ns: <http://onto.strinz.me/dc/dataset/mr/> .
3
3
  @prefix qb: <http://purl.org/linked-data/cube#> .
4
4
  @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
5
5
  @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
6
- @prefix prop: <http://www.rqtl.org/dc/properties/> .
6
+ @prefix prop: <http://onto.strinz.me/properties/> .
7
7
  @prefix dct: <http://purl.org/dc/terms/> .
8
8
  @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
9
- @prefix cs: <http://www.rqtl.org/dc/dataset/mr/cs/> .
10
- @prefix code: <http://www.rqtl.org/dc/dataset/mr/code/> .
9
+ @prefix cs: <http://onto.strinz.me/dc/dataset/mr/cs/> .
10
+ @prefix code: <http://onto.strinz.me/dc/dataset/mr/code/> .
11
11
  @prefix owl: <http://www.w3.org/2002/07/owl#> .
12
12
  @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
13
13
  @prefix foaf: <http://xmlns.com/foaf/0.1/> .
@@ -25,19 +25,19 @@ ns:dataset-mr a qb:DataSet ;
25
25
  qb:structure ns:dsd-mr .
26
26
 
27
27
  cs:refRow a qb:ComponentSpecification ;
28
- rdfs:label "refRow Component" ;
28
+ rdfs:label "refRow" ;
29
29
  qb:dimension prop:refRow .
30
30
 
31
31
  cs:chr a qb:ComponentSpecification ;
32
- rdfs:label "chr Component" ;
32
+ rdfs:label "chr" ;
33
33
  qb:measure prop:chr .
34
34
 
35
35
  cs:pos a qb:ComponentSpecification ;
36
- rdfs:label "pos Component" ;
36
+ rdfs:label "pos" ;
37
37
  qb:measure prop:pos .
38
38
 
39
39
  cs:lod a qb:ComponentSpecification ;
40
- rdfs:label "lod Component" ;
40
+ rdfs:label "lod" ;
41
41
  qb:measure prop:lod .
42
42
 
43
43
  prop:refRow a rdf:Property, qb:DimensionProperty ;
@@ -898,7 +898,7 @@ ns:obsD1M215 a qb:Observation ;
898
898
  prop:refRow <code/refrow/D1M215> ;
899
899
  prop:chr 1 ;
900
900
  prop:pos 40.41360872065924 ;
901
- prop:lod 0.07012015768917834 ;
901
+ prop:lod 0.07012015768922852 ;
902
902
  .
903
903
 
904
904
  ns:obsD1M309 a qb:Observation ;
@@ -943,7 +943,7 @@ ns:obsD1M113 a qb:Observation ;
943
943
  prop:refRow <code/refrow/D1M113> ;
944
944
  prop:chr 1 ;
945
945
  prop:pos 80.62323562923214 ;
946
- prop:lod 2.0726083948737966 ;
946
+ prop:lod 2.072608394873848 ;
947
947
  .
948
948
 
949
949
  ns:obsD1M355 a qb:Observation ;
@@ -970,7 +970,7 @@ ns:obsD1M209 a qb:Observation ;
970
970
  prop:refRow <code/refrow/D1M209> ;
971
971
  prop:chr 1 ;
972
972
  prop:pos 92.68393779641761 ;
973
- prop:lod 1.0770292807569852 ;
973
+ prop:lod 1.077029280756939 ;
974
974
  .
975
975
 
976
976
  ns:obsD1M155 a qb:Observation ;
@@ -1042,7 +1042,7 @@ ns:obsD3M265 a qb:Observation ;
1042
1042
  prop:refRow <code/refrow/D3M265> ;
1043
1043
  prop:chr 3 ;
1044
1044
  prop:pos 0.0 ;
1045
- prop:lod 1.6120906204520224 ;
1045
+ prop:lod 1.612090620452074 ;
1046
1046
  .
1047
1047
 
1048
1048
  ns:obsD3M51 a qb:Observation ;
@@ -1060,7 +1060,7 @@ ns:obsD3M106 a qb:Observation ;
1060
1060
  prop:refRow <code/refrow/D3M106> ;
1061
1061
  prop:chr 3 ;
1062
1062
  prop:pos 43.938030995679 ;
1063
- prop:lod 0.45374023883481307 ;
1063
+ prop:lod 0.4537402388347749 ;
1064
1064
  .
1065
1065
 
1066
1066
  ns:obsD3M257 a qb:Observation ;
@@ -1087,7 +1087,7 @@ ns:obsD3M19 a qb:Observation ;
1087
1087
  prop:refRow <code/refrow/D3M19> ;
1088
1088
  prop:chr 3 ;
1089
1089
  prop:pos 70.83899918659391 ;
1090
- prop:lod 0.5681404735365145 ;
1090
+ prop:lod 0.5681404735364763 ;
1091
1091
  .
1092
1092
 
1093
1093
  ns:obsD4M2 a qb:Observation ;
@@ -1096,7 +1096,7 @@ ns:obsD4M2 a qb:Observation ;
1096
1096
  prop:refRow <code/refrow/D4M2> ;
1097
1097
  prop:chr 4 ;
1098
1098
  prop:pos 0.0 ;
1099
- prop:lod 0.24331723281215023 ;
1099
+ prop:lod 0.24331723281211204 ;
1100
1100
  .
1101
1101
 
1102
1102
  ns:obsD4M178 a qb:Observation ;
@@ -1114,7 +1114,7 @@ ns:obsD4M187 a qb:Observation ;
1114
1114
  prop:refRow <code/refrow/D4M187> ;
1115
1115
  prop:chr 4 ;
1116
1116
  prop:pos 35.32085637897066 ;
1117
- prop:lod 0.08949770136010748 ;
1117
+ prop:lod 0.08949770136006929 ;
1118
1118
  .
1119
1119
 
1120
1120
  ns:obsD4M251 a qb:Observation ;
@@ -1123,7 +1123,7 @@ ns:obsD4M251 a qb:Observation ;
1123
1123
  prop:refRow <code/refrow/D4M251> ;
1124
1124
  prop:chr 4 ;
1125
1125
  prop:pos 68.10315769609147 ;
1126
- prop:lod 1.1744313367512351 ;
1126
+ prop:lod 1.1744313367512866 ;
1127
1127
  .
1128
1128
 
1129
1129
  ns:obsD5M148 a qb:Observation ;
@@ -1186,7 +1186,7 @@ ns:obsD5M205 a qb:Observation ;
1186
1186
  prop:refRow <code/refrow/D5M205> ;
1187
1187
  prop:chr 5 ;
1188
1188
  prop:pos 30.896651923893483 ;
1189
- prop:lod 5.72843784026729 ;
1189
+ prop:lod 5.72843784026734 ;
1190
1190
  .
1191
1191
 
1192
1192
  ns:obsD5M398 a qb:Observation ;
@@ -1195,7 +1195,7 @@ ns:obsD5M398 a qb:Observation ;
1195
1195
  prop:refRow <code/refrow/D5M398> ;
1196
1196
  prop:chr 5 ;
1197
1197
  prop:pos 30.897651923893616 ;
1198
- prop:lod 3.180821290624097 ;
1198
+ prop:lod 3.1808212906241233 ;
1199
1199
  .
1200
1200
 
1201
1201
  ns:obsD5M91 a qb:Observation ;
@@ -1258,7 +1258,7 @@ ns:obsD6M188 a qb:Observation ;
1258
1258
  prop:refRow <code/refrow/D6M188> ;
1259
1259
  prop:chr 6 ;
1260
1260
  prop:pos 18.187535696625936 ;
1261
- prop:lod 1.296092065769776 ;
1261
+ prop:lod 1.296092065769738 ;
1262
1262
  .
1263
1263
 
1264
1264
  ns:obsD6M284 a qb:Observation ;
@@ -1294,7 +1294,7 @@ ns:obsD6M194 a qb:Observation ;
1294
1294
  prop:refRow <code/refrow/D6M194> ;
1295
1295
  prop:chr 6 ;
1296
1296
  prop:pos 45.14579226981843 ;
1297
- prop:lod 1.4515021912783288 ;
1297
+ prop:lod 1.4515021912782906 ;
1298
1298
  .
1299
1299
 
1300
1300
  ns:obsD6M290 a qb:Observation ;
@@ -1330,7 +1330,7 @@ ns:obsD6M59_ a qb:Observation ;
1330
1330
  prop:refRow <code/refrow/D6M59_> ;
1331
1331
  prop:chr 6 ;
1332
1332
  prop:pos 55.304776117994045 ;
1333
- prop:lod 2.9298420181331597 ;
1333
+ prop:lod 2.9298420181331215 ;
1334
1334
  .
1335
1335
 
1336
1336
  ns:obsD6M201 a qb:Observation ;
@@ -1429,7 +1429,7 @@ ns:obsD8M339 a qb:Observation ;
1429
1429
  prop:refRow <code/refrow/D8M339> ;
1430
1430
  prop:chr 8 ;
1431
1431
  prop:pos 1.3398698853272393 ;
1432
- prop:lod 0.5508803120345327 ;
1432
+ prop:lod 0.5508803120345833 ;
1433
1433
  .
1434
1434
 
1435
1435
  ns:obsD8M178 a qb:Observation ;
@@ -1447,7 +1447,7 @@ ns:obsD8M242 a qb:Observation ;
1447
1447
  prop:refRow <code/refrow/D8M242> ;
1448
1448
  prop:chr 8 ;
1449
1449
  prop:pos 27.140658391256373 ;
1450
- prop:lod 0.018444232219069434 ;
1450
+ prop:lod 0.018444232219031242 ;
1451
1451
  .
1452
1452
 
1453
1453
  ns:obsD8M213 a qb:Observation ;
@@ -1465,7 +1465,7 @@ ns:obsD8M156 a qb:Observation ;
1465
1465
  prop:refRow <code/refrow/D8M156> ;
1466
1466
  prop:chr 8 ;
1467
1467
  prop:pos 50.8636380045854 ;
1468
- prop:lod 0.02846649364377729 ;
1468
+ prop:lod 0.028466493643733326 ;
1469
1469
  .
1470
1470
 
1471
1471
  ns:obsD9M247 a qb:Observation ;
@@ -1501,7 +1501,7 @@ ns:obsD9M269 a qb:Observation ;
1501
1501
  prop:refRow <code/refrow/D9M269> ;
1502
1502
  prop:chr 9 ;
1503
1503
  prop:pos 27.324165906766122 ;
1504
- prop:lod 0.6881242583427829 ;
1504
+ prop:lod 0.6881242583427478 ;
1505
1505
  .
1506
1506
 
1507
1507
  ns:obsD9M346 a qb:Observation ;
@@ -1510,7 +1510,7 @@ ns:obsD9M346 a qb:Observation ;
1510
1510
  prop:refRow <code/refrow/D9M346> ;
1511
1511
  prop:chr 9 ;
1512
1512
  prop:pos 32.95643946351727 ;
1513
- prop:lod 0.37223400725767464 ;
1513
+ prop:lod 0.372234007257759 ;
1514
1514
  .
1515
1515
 
1516
1516
  ns:obsD9M55 a qb:Observation ;
@@ -1519,7 +1519,7 @@ ns:obsD9M55 a qb:Observation ;
1519
1519
  prop:refRow <code/refrow/D9M55> ;
1520
1520
  prop:chr 9 ;
1521
1521
  prop:pos 45.335668616330956 ;
1522
- prop:lod 0.48324303581163264 ;
1522
+ prop:lod 0.48324303581159445 ;
1523
1523
  .
1524
1524
 
1525
1525
  ns:obsD9M18 a qb:Observation ;
@@ -1528,7 +1528,7 @@ ns:obsD9M18 a qb:Observation ;
1528
1528
  prop:refRow <code/refrow/D9M18> ;
1529
1529
  prop:chr 9 ;
1530
1530
  prop:pos 52.504037355687565 ;
1531
- prop:lod 0.2559094007707392 ;
1531
+ prop:lod 0.255909400770701 ;
1532
1532
  .
1533
1533
 
1534
1534
  ns:obsD10M298 a qb:Observation ;
@@ -1546,7 +1546,7 @@ ns:obsD10M294 a qb:Observation ;
1546
1546
  prop:refRow <code/refrow/D10M294> ;
1547
1547
  prop:chr 10 ;
1548
1548
  prop:pos 24.747450377130114 ;
1549
- prop:lod 0.7596876212377977 ;
1549
+ prop:lod 0.7596876212377595 ;
1550
1550
  .
1551
1551
 
1552
1552
  ns:obsD10M42_ a qb:Observation ;
@@ -1582,7 +1582,7 @@ ns:obsD11M78 a qb:Observation ;
1582
1582
  prop:refRow <code/refrow/D11M78> ;
1583
1583
  prop:chr 11 ;
1584
1584
  prop:pos 0.0 ;
1585
- prop:lod 0.18398849359838465 ;
1585
+ prop:lod 0.18398849359834646 ;
1586
1586
  .
1587
1587
 
1588
1588
  ns:obsD11M20 a qb:Observation ;
@@ -1636,7 +1636,7 @@ ns:obsD12M105 a qb:Observation ;
1636
1636
  prop:refRow <code/refrow/D12M105> ;
1637
1637
  prop:chr 12 ;
1638
1638
  prop:pos 0.0 ;
1639
- prop:lod 0.6422735562058088 ;
1639
+ prop:lod 0.6422735562057706 ;
1640
1640
  .
1641
1641
 
1642
1642
  ns:obsD12M46 a qb:Observation ;
@@ -1672,7 +1672,7 @@ ns:obsD12M99 a qb:Observation ;
1672
1672
  prop:refRow <code/refrow/D12M99> ;
1673
1673
  prop:chr 12 ;
1674
1674
  prop:pos 41.79568874486233 ;
1675
- prop:lod 1.1794642920048428 ;
1675
+ prop:lod 1.1794642920048046 ;
1676
1676
  .
1677
1677
 
1678
1678
  ns:obsD12M150 a qb:Observation ;
@@ -1816,7 +1816,7 @@ ns:obsD14M265 a qb:Observation ;
1816
1816
  prop:refRow <code/refrow/D14M265> ;
1817
1817
  prop:chr 14 ;
1818
1818
  prop:pos 32.786788153054445 ;
1819
- prop:lod 0.05689288973059092 ;
1819
+ prop:lod 0.05689288973064066 ;
1820
1820
  .
1821
1821
 
1822
1822
  ns:obsD14M266 a qb:Observation ;
@@ -1825,7 +1825,7 @@ ns:obsD14M266 a qb:Observation ;
1825
1825
  prop:refRow <code/refrow/D14M266> ;
1826
1826
  prop:chr 14 ;
1827
1827
  prop:pos 45.55021769882338 ;
1828
- prop:lod 0.07253305417930189 ;
1828
+ prop:lod 0.0725330541792637 ;
1829
1829
  .
1830
1830
 
1831
1831
  ns:obsD15M226 a qb:Observation ;
@@ -1906,7 +1906,7 @@ ns:obsD16M154 a qb:Observation ;
1906
1906
  prop:refRow <code/refrow/D16M154> ;
1907
1907
  prop:chr 16 ;
1908
1908
  prop:pos 0.0 ;
1909
- prop:lod 0.540067799954115 ;
1909
+ prop:lod 0.5400677999540768 ;
1910
1910
  .
1911
1911
 
1912
1912
  ns:obsD16M4 a qb:Observation ;
@@ -1933,7 +1933,7 @@ ns:obsD16M86 a qb:Observation ;
1933
1933
  prop:refRow <code/refrow/D16M86> ;
1934
1934
  prop:chr 16 ;
1935
1935
  prop:pos 41.79901031770399 ;
1936
- prop:lod 0.7981309541993991 ;
1936
+ prop:lod 0.7981309541993609 ;
1937
1937
  .
1938
1938
 
1939
1939
  ns:obsD17M260 a qb:Observation ;
@@ -1942,7 +1942,7 @@ ns:obsD17M260 a qb:Observation ;
1942
1942
  prop:refRow <code/refrow/D17M260> ;
1943
1943
  prop:chr 17 ;
1944
1944
  prop:pos 0.0 ;
1945
- prop:lod 0.1818872799948723 ;
1945
+ prop:lod 0.18188727999483412 ;
1946
1946
  .
1947
1947
 
1948
1948
  ns:obsD17M66 a qb:Observation ;
@@ -1951,7 +1951,7 @@ ns:obsD17M66 a qb:Observation ;
1951
1951
  prop:refRow <code/refrow/D17M66> ;
1952
1952
  prop:chr 17 ;
1953
1953
  prop:pos 11.728225830166531 ;
1954
- prop:lod 0.41891147924973726 ;
1954
+ prop:lod 0.41891147924969907 ;
1955
1955
  .
1956
1956
 
1957
1957
  ns:obsD17M88 a qb:Observation ;
@@ -1978,7 +1978,7 @@ ns:obsD18M94 a qb:Observation ;
1978
1978
  prop:refRow <code/refrow/D18M94> ;
1979
1979
  prop:chr 18 ;
1980
1980
  prop:pos 0.0 ;
1981
- prop:lod 1.2303365279615814 ;
1981
+ prop:lod 1.230336527961505 ;
1982
1982
  .
1983
1983
 
1984
1984
  ns:obsD18M58 a qb:Observation ;
@@ -2014,7 +2014,7 @@ ns:obsD19M68 a qb:Observation ;
2014
2014
  prop:refRow <code/refrow/D19M68> ;
2015
2015
  prop:chr 19 ;
2016
2016
  prop:pos 0.0 ;
2017
- prop:lod 0.3769326271704294 ;
2017
+ prop:lod 0.37693262717035303 ;
2018
2018
  .
2019
2019
 
2020
2020
  ns:obsD19M117 a qb:Observation ;
@@ -2032,7 +2032,7 @@ ns:obsD19M65 a qb:Observation ;
2032
2032
  prop:refRow <code/refrow/D19M65> ;
2033
2033
  prop:chr 19 ;
2034
2034
  prop:pos 32.82934898998137 ;
2035
- prop:lod 0.0073635980130237755 ;
2035
+ prop:lod 0.007363598013061079 ;
2036
2036
  .
2037
2037
 
2038
2038
  ns:obsD19M10 a qb:Observation ;
@@ -1,13 +1,13 @@
1
- @base <http://www.rqtl.org/ns/dc/> .
2
- @prefix ns: <http://www.rqtl.org/ns/dataset/weather/> .
1
+ @base <http://onto.strinz.me/dc/dataset/weather/> .
2
+ @prefix ns: <http://onto.strinz.me/dc/dataset/weather/> .
3
3
  @prefix qb: <http://purl.org/linked-data/cube#> .
4
4
  @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
5
5
  @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
6
- @prefix prop: <http://www.rqtl.org/dc/properties/> .
6
+ @prefix prop: <http://onto.strinz.me/properties/> .
7
7
  @prefix dct: <http://purl.org/dc/terms/> .
8
8
  @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
9
- @prefix cs: <http://www.rqtl.org/dc/dataset/weather/cs/> .
10
- @prefix code: <http://www.rqtl.org/dc/dataset/weather/code/> .
9
+ @prefix cs: <http://onto.strinz.me/dc/dataset/weather/cs/> .
10
+ @prefix code: <http://onto.strinz.me/dc/dataset/weather/code/> .
11
11
  @prefix owl: <http://www.w3.org/2002/07/owl#> .
12
12
  @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
13
13
  @prefix foaf: <http://xmlns.com/foaf/0.1/> .
@@ -26,23 +26,23 @@ ns:dataset-weather a qb:DataSet ;
26
26
  qb:structure ns:dsd-weather .
27
27
 
28
28
  cs:outlook a qb:ComponentSpecification ;
29
- rdfs:label "outlook Component" ;
29
+ rdfs:label "outlook" ;
30
30
  qb:dimension prop:outlook .
31
31
 
32
32
  cs:play a qb:ComponentSpecification ;
33
- rdfs:label "play Component" ;
33
+ rdfs:label "play" ;
34
34
  qb:dimension prop:play .
35
35
 
36
36
  cs:windy a qb:ComponentSpecification ;
37
- rdfs:label "windy Component" ;
37
+ rdfs:label "windy" ;
38
38
  qb:dimension prop:windy .
39
39
 
40
40
  cs:humidity a qb:ComponentSpecification ;
41
- rdfs:label "humidity Component" ;
41
+ rdfs:label "humidity" ;
42
42
  qb:measure prop:humidity .
43
43
 
44
44
  cs:temperature a qb:ComponentSpecification ;
45
- rdfs:label "temperature Component" ;
45
+ rdfs:label "temperature" ;
46
46
  qb:measure prop:temperature .
47
47
 
48
48
  prop:outlook a rdf:Property, qb:DimensionProperty ;
@@ -37,12 +37,26 @@ describe PubliSci::Writers do
37
37
  out.should == IO.read('resources/weather.numeric.arff').gsub(/%.*\n/,'')
38
38
  end
39
39
 
40
+ it "can output JSON from turtle string" do
41
+ writer = PubliSci::Writers::JSON.new
42
+ out = writer.from_turtle('spec/turtle/weather')
43
+ JSON.parse(out).size.should > 0
44
+ end
45
+
46
+ it "can output JSON from a store" do
47
+ writer = PubliSci::Writers::JSON.new
48
+ repo = RDF::Repository.load('spec/turtle/weather')
49
+ out = writer.from_store(repo)
50
+ # minor hack since metadata isn't the same
51
+ JSON.parse(out).size.should > 0
52
+ end
53
+
40
54
  context "can restrict to a particular dataset" do
41
55
  it "for arff" do
42
56
  writer = PubliSci::Writers::ARFF.new
43
57
  repo = RDF::Repository.load('spec/turtle/weather')
44
58
  repo.load('spec/turtle/bacon')
45
- out = writer.from_store(repo, 'http://www.rqtl.org/ns/dataset/weather/dataset-weather','weather')
59
+ out = writer.from_store(repo, 'http://onto.strinz.me/dc/dataset/weather/dataset-weather','weather')
46
60
 
47
61
  out = out.gsub(/%.*\n/,'')
48
62
 
@@ -53,7 +67,7 @@ describe PubliSci::Writers do
53
67
  writer = PubliSci::Writers::CSV.new
54
68
  repo = RDF::Repository.load('spec/turtle/reference')
55
69
  repo.load('spec/turtle/bacon')
56
- out = writer.from_store(repo,'http://www.rqtl.org/ns/dataset/bacon/dataset-bacon')
70
+ out = writer.from_store(repo,'http://onto.strinz.me/dc/dataset/bacon/dataset-bacon')
57
71
 
58
72
  out.should == IO.read('spec/csv/bacon.csv')
59
73
  end