publisci 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c6637653467bc88d6c6b4962475a21b202e2ee8f
4
- data.tar.gz: a640bd102a6e072497c2dc72e03b6493b6dbc1f2
3
+ metadata.gz: 52f1dffb13ce9735f75d98d6b461994da1643f09
4
+ data.tar.gz: 53dc3ce59d126384d7159e946f3d9c246385ee0a
5
5
  SHA512:
6
- metadata.gz: 2439c3a64279f6b26e8d09c3e4be13e4d6d136bda6e975b710e59a9ff1947e8c8fae96396ae9d638e06f47243623fbe246dc8a80e137f7954938240b5e3fbb6c
7
- data.tar.gz: de3fa480a0ef27a3e640672fe902c46ba7a5e62caa45d7ebf819e1c0c1508d4f3c9fb53b686296ddff7847839e54ebf50795c6b1096b2f369ed5c4c130eef580
6
+ metadata.gz: 39ab17a7bd5d161d6fb6cc4ac83dea16af423e566dc59d7bdb105b6e64a19ca8f293b7e565f69cfa510a861bb94eb2da1c284de9e483d549e7b85064725a69d6
7
+ data.tar.gz: 11c0f923d4c07a1d654e34a865f6aa699a8210d81b9bdae4af92c457fb38dd7a229593d4f4311f454498b3cd2242895297cb5ae3b9c7685ff0c475bb00644391
data/Gemfile CHANGED
@@ -8,7 +8,7 @@ source "http://rubygems.org"
8
8
  group :development do
9
9
  gem "rspec", "~> 2.8.0"
10
10
  gem "cucumber", ">= 0"
11
- gem "jeweler", "~> 1.8.4", :git => "https://github.com/technicalpickles/jeweler.git"
11
+ gem "jeweler"
12
12
  gem "bundler", ">= 1.0.21"
13
13
  gem "bio", ">= 1.4.2"
14
14
  gem "rdoc"
@@ -26,4 +26,4 @@ gem 'json-ld'
26
26
  gem 'rserve-client'
27
27
  gem 'sparql'
28
28
 
29
- gem "spira", git: "https://github.com/ruby-rdf/spira.git"
29
+ gem "spira", git: "https://github.com/ruby-rdf/spira.git"
data/README.md CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  [![Build Status](https://travis-ci.org/wstrinz/publisci.png?branch=master)](https://travis-ci.org/wstrinz/publisci)
4
4
 
5
- Note: this software is under active development! Until it hits v 1.0.0, the overall API and usage pattern is subject to change.
6
-
7
5
  ## Installation
8
6
 
9
7
  ```sh
@@ -12,6 +12,43 @@ Note: this software is under active development!
12
12
 
13
13
  == Usage
14
14
 
15
+ Most of the gem's functions can be accessed through its DSL
16
+
17
+ require 'publisci'
18
+ include PubliSci::DSL
19
+
20
+ # Specify input data
21
+ data do
22
+ # use local or remote paths
23
+ source 'https://github.com/wstrinz/publisci/raw/master/spec/csv/bacon.csv'
24
+
25
+ # specify datacube properties
26
+ dimension 'producer', 'pricerange'
27
+ measure 'chunkiness'
28
+
29
+ # set parser specific options
30
+ option 'label_column', 'producer'
31
+ end
32
+
33
+ # Describe dataset
34
+ metadata do
35
+ dataset 'bacon'
36
+ title 'Bacon dataset'
37
+ creator 'Will Strinz'
38
+ description 'some data about bacon'
39
+ date '1-10-2010'
40
+ end
41
+
42
+ # Send output to an RDF::Repository
43
+ # can also use 'generate_n3' to output a turtle string
44
+ repo = to_repository
45
+
46
+ # run SPARQL queries on the dataset
47
+ PubliSci::QueryHelper.execute('select * where {?s ?p ?o} limit 5', repo)
48
+
49
+ # export in other formats
50
+ PubliSci::Writers::ARFF.new.from_store(repo)
51
+
15
52
  == Developers
16
53
 
17
54
  To use the library
data/Rakefile CHANGED
@@ -21,7 +21,7 @@ Jeweler::Tasks.new do |gem|
21
21
  gem.description = %Q{A toolkit for publishing scientific results and datasets using RDF, OWL, and related technologies }
22
22
  gem.email = "wstrinz@gmail.com"
23
23
  gem.authors = ["Will Strinz"]
24
- gem.version = "0.1.5"
24
+ gem.version = "0.1.6"
25
25
 
26
26
  end
27
27
  Jeweler::RubygemsDotOrgTasks.new
@@ -0,0 +1,43 @@
1
+ require 'publisci'
2
+ include PubliSci::DSL
3
+
4
+ # Specify input data
5
+ # Not that every statement in the datablock is essentially declarative;
6
+ # since the generator won't be run until the end of the block, you can
7
+ # specify input parameters in any order.
8
+
9
+ data do
10
+ # use local or remote paths
11
+ # The gem will determine which transformer to use for your input data based
12
+ # on the file's extension
13
+ source 'https://github.com/wstrinz/publisci/raw/master/spec/csv/bacon.csv'
14
+
15
+ # specify datacube properties
16
+ # see http://www.w3.org/TR/vocab-data-cube/#cubes-model
17
+ dimension 'producer', 'pricerange'
18
+ measure 'chunkiness'
19
+
20
+ # set transformer options
21
+ # These will generally be parameters relevant only to a certain input type
22
+ # In this case, we're using the "producer" column to label each operation.
23
+ option 'label_column', 'producer'
24
+ end
25
+
26
+ # Describe dataset
27
+ metadata do
28
+ dataset 'bacon'
29
+ title 'Bacon dataset'
30
+ creator 'Will Strinz'
31
+ description 'some data about bacon'
32
+ date '1-10-2010'
33
+ end
34
+
35
+ # Send output to an RDF::Repository
36
+ # can also use 'generate_n3' to output a turtle string
37
+ repo = to_repository
38
+
39
+ # run SPARQL queries on the dataset
40
+ PubliSci::QueryHelper.execute('select * where {?s ?p ?o} limit 5', repo)
41
+
42
+ # export in other formats
43
+ PubliSci::Writers::ARFF.new.from_store(repo)
@@ -46,8 +46,8 @@ begin
46
46
  property :dataset, predicate: QB.dataSet
47
47
 
48
48
  def load_properties
49
- comps = dataset.as(DataSet).structure.as(DataStructureDefinition).component.map{|comp| comp.as(Component)}
50
- props = comps.map{|comp| comp.dimension ? comp.dimension.as(Dimension) : comp.measure.as(Measure) }
49
+ comps = RDF::URI(RDF::URI(dataset).as(DataSet).structure).as(DataStructureDefinition).component.map{|comp| RDF::URI(comp).as(Component)}
50
+ props = comps.map{|comp| comp.dimension ? RDF::URI(comp.dimension).as(Dimension) : RDF::URI(comp.measure).as(Measure) }
51
51
  props.each{|prop|
52
52
  ss = strip_uri(prop.subject.to_s)
53
53
 
@@ -13,7 +13,7 @@ module PubliSci
13
13
  {
14
14
  type: :dataframe,
15
15
  encode_nulls: false,
16
- base_url: "http://onto.strinz.me",
16
+ base_url: "http://example.org",
17
17
  }
18
18
  end
19
19
 
@@ -62,9 +62,10 @@ module PubliSci
62
62
 
63
63
  def activities
64
64
  #should do this in a SPARQL query instead
65
+ #
65
66
  Activity.enum_for.map{|act|
66
67
  subj = subject()
67
- act if act.wasAssociatedWith.any?{|assoc| assoc == subj}
68
+ act if act.wasAssociatedWith.any?{|assoc| RDF::URI(assoc) == subj}
68
69
  }.reject{|x| x==nil}
69
70
  end
70
71
  end
@@ -106,4 +107,4 @@ module PubliSci
106
107
  end
107
108
  rescue LoadError
108
109
  # puts "spira not installed, ORM unavailable"
109
- end
110
+ end
@@ -1,6 +1,6 @@
1
1
  module PubliSci
2
- module Readers
3
- class CSV
2
+ module Readers
3
+ class CSV
4
4
  include Base
5
5
  def automatic(file=nil,dataset_name=nil,options={},interactive=true)
6
6
  #to do
@@ -39,51 +39,51 @@ module PubliSci
39
39
  generate_n3(file,dataset_name,options)
40
40
  end
41
41
 
42
- def generate_n3(file, dataset_name, options={})
43
- @data = ::CSV.read(file)
44
- @options = options
45
- generate(measures, dimensions, codes, observation_data, observation_labels, dataset_name, options)
46
- end
47
-
48
- def dimensions
49
- @options[:dimensions] || [@data[0][0]]
50
- end
51
-
52
- def codes
53
- @options[:codes] || dimensions()
54
- end
55
-
56
- def measures
57
- @options[:measures] || @data[0] - dimensions()
58
- end
59
-
60
- def observation_labels
61
- if @options[:label_column]
62
- tmp = @data.dup
63
- tmp.shift
64
- tmp.map{|row|
65
- row[@options[:label_column]]
66
- }
67
- else
68
- (1..@data.size - 1).to_a
69
- end
70
- end
71
-
72
- def observation_data
73
- obs = {}
74
- @data[0].map{|label|
75
- obs[label] = []
76
- }
77
- tmp = @data.dup
78
- tmp.shift
79
-
80
- tmp.map{|row|
81
- row.each_with_index{|entry,i|
82
- obs[@data[0][i]] << entry
83
- }
84
- }
85
- obs
86
- end
87
- end
88
- end
89
- end
42
+ def generate_n3(file, dataset_name, options={})
43
+ @data = ::CSV.read(file)
44
+ @options = options
45
+ generate(measures, dimensions, codes, observation_data, observation_labels, dataset_name, options)
46
+ end
47
+
48
+ def dimensions
49
+ @options[:dimensions] || [@data[0][0]]
50
+ end
51
+
52
+ def codes
53
+ @options[:codes] || dimensions()
54
+ end
55
+
56
+ def measures
57
+ @options[:measures] || @data[0] - dimensions()
58
+ end
59
+
60
+ def observation_labels
61
+ if @options[:label_column]
62
+ tmp = @data.dup
63
+ tmp.shift
64
+ tmp.map{|row|
65
+ row[@options[:label_column]]
66
+ }
67
+ else
68
+ (1..@data.size - 1).to_a
69
+ end
70
+ end
71
+
72
+ def observation_data
73
+ obs = {}
74
+ @data[0].map{|label|
75
+ obs[label] = []
76
+ }
77
+ tmp = @data.dup
78
+ tmp.shift
79
+
80
+ tmp.map{|row|
81
+ row.each_with_index{|entry,i|
82
+ obs[@data[0][i]] << entry
83
+ }
84
+ }
85
+ obs
86
+ end
87
+ end
88
+ end
89
+ end
@@ -1,20 +1,20 @@
1
- @base <http://onto.strinz.me/dc/dataset/MAF_ah1iit/> .
2
- @prefix ns: <http://onto.strinz.me/dc/dataset/MAF_ah1iit/> .
1
+ @base <http://example.org/dc/dataset/MAF_h94778/> .
2
+ @prefix ns: <http://example.org/dc/dataset/MAF_h94778/> .
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://onto.strinz.me/properties/> .
6
+ @prefix prop: <http://example.org/properties/> .
7
7
  @prefix dct: <http://purl.org/dc/terms/> .
8
8
  @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
9
- @prefix cs: <http://onto.strinz.me/dc/dataset/MAF_ah1iit/cs/> .
10
- @prefix code: <http://onto.strinz.me/dc/dataset/MAF_ah1iit/code/> .
9
+ @prefix cs: <http://example.org/dc/dataset/MAF_h94778/cs/> .
10
+ @prefix code: <http://example.org/dc/dataset/MAF_h94778/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/> .
14
14
  @prefix org: <http://www.w3.org/ns/org#> .
15
15
  @prefix prov: <http://www.w3.org/ns/prov#> .
16
16
 
17
- ns:dsd-MAF_ah1iit a qb:DataStructureDefinition;
17
+ ns:dsd-MAF_h94778 a qb:DataStructureDefinition;
18
18
  qb:component cs:Variant_Classification ;
19
19
  qb:component cs:Variant_Type ;
20
20
  qb:component cs:dbSNP_Val_Status ;
@@ -52,9 +52,9 @@ ns:dsd-MAF_ah1iit a qb:DataStructureDefinition;
52
52
  qb:component cs:patient_id ;
53
53
  qb:component cs:sample_id .
54
54
 
55
- ns:dataset-MAF_ah1iit a qb:DataSet ;
56
- rdfs:label "MAF_ah1iit"@en ;
57
- qb:structure ns:dsd-MAF_ah1iit .
55
+ ns:dataset-MAF_h94778 a qb:DataSet ;
56
+ rdfs:label "MAF_h94778"@en ;
57
+ qb:structure ns:dsd-MAF_h94778 .
58
58
 
59
59
  cs:Variant_Classification a qb:ComponentSpecification ;
60
60
  rdfs:label "Variant_Classification" ;
@@ -951,7 +951,7 @@ code:sequencer a skos:ConceptScheme;
951
951
  skos:inScheme code:sequencer .
952
952
 
953
953
  ns:obs2 a qb:Observation ;
954
- qb:dataSet ns:dataset-MAF_ah1iit ;
954
+ qb:dataSet ns:dataset-MAF_h94778 ;
955
955
  prop:Variant_Classification <code/variant_classification/Missense_Mutation> ;
956
956
  prop:Variant_Type <code/variant_type/SNP> ;
957
957
  prop:dbSNP_Val_Status <code/dbsnp_val_status/> ;
@@ -986,7 +986,7 @@ ns:obs2 a qb:Observation ;
986
986
  .
987
987
 
988
988
  ns:obs3 a qb:Observation ;
989
- qb:dataSet ns:dataset-MAF_ah1iit ;
989
+ qb:dataSet ns:dataset-MAF_h94778 ;
990
990
  prop:Variant_Classification <code/variant_classification/Missense_Mutation> ;
991
991
  prop:Variant_Type <code/variant_type/SNP> ;
992
992
  prop:dbSNP_Val_Status <code/dbsnp_val_status/byFrequency> ;
@@ -1021,7 +1021,7 @@ ns:obs3 a qb:Observation ;
1021
1021
  .
1022
1022
 
1023
1023
  ns:obs4 a qb:Observation ;
1024
- qb:dataSet ns:dataset-MAF_ah1iit ;
1024
+ qb:dataSet ns:dataset-MAF_h94778 ;
1025
1025
  prop:Variant_Classification <code/variant_classification/Missense_Mutation> ;
1026
1026
  prop:Variant_Type <code/variant_type/SNP> ;
1027
1027
  prop:dbSNP_Val_Status <code/dbsnp_val_status/> ;
@@ -1057,7 +1057,7 @@ ns:obs4 a qb:Observation ;
1057
1057
  .
1058
1058
 
1059
1059
  ns:obs5 a qb:Observation ;
1060
- qb:dataSet ns:dataset-MAF_ah1iit ;
1060
+ qb:dataSet ns:dataset-MAF_h94778 ;
1061
1061
  prop:Variant_Classification <code/variant_classification/Silent> ;
1062
1062
  prop:Variant_Type <code/variant_type/SNP> ;
1063
1063
  prop:dbSNP_Val_Status <code/dbsnp_val_status/> ;
@@ -1093,7 +1093,7 @@ ns:obs5 a qb:Observation ;
1093
1093
  .
1094
1094
 
1095
1095
  ns:obs6 a qb:Observation ;
1096
- qb:dataSet ns:dataset-MAF_ah1iit ;
1096
+ qb:dataSet ns:dataset-MAF_h94778 ;
1097
1097
  prop:Variant_Classification <code/variant_classification/Silent> ;
1098
1098
  prop:Variant_Type <code/variant_type/SNP> ;
1099
1099
  prop:dbSNP_Val_Status <code/dbsnp_val_status/> ;
@@ -1128,7 +1128,7 @@ ns:obs6 a qb:Observation ;
1128
1128
  .
1129
1129
 
1130
1130
  ns:obs7 a qb:Observation ;
1131
- qb:dataSet ns:dataset-MAF_ah1iit ;
1131
+ qb:dataSet ns:dataset-MAF_h94778 ;
1132
1132
  prop:Variant_Classification <code/variant_classification/Missense_Mutation> ;
1133
1133
  prop:Variant_Type <code/variant_type/SNP> ;
1134
1134
  prop:dbSNP_Val_Status <code/dbsnp_val_status/> ;
@@ -1168,7 +1168,7 @@ ns:obs7 a qb:Observation ;
1168
1168
  .
1169
1169
 
1170
1170
  ns:obs8 a qb:Observation ;
1171
- qb:dataSet ns:dataset-MAF_ah1iit ;
1171
+ qb:dataSet ns:dataset-MAF_h94778 ;
1172
1172
  prop:Variant_Classification <code/variant_classification/Silent> ;
1173
1173
  prop:Variant_Type <code/variant_type/SNP> ;
1174
1174
  prop:dbSNP_Val_Status <code/dbsnp_val_status/> ;
@@ -1208,7 +1208,7 @@ ns:obs8 a qb:Observation ;
1208
1208
  .
1209
1209
 
1210
1210
  ns:obs9 a qb:Observation ;
1211
- qb:dataSet ns:dataset-MAF_ah1iit ;
1211
+ qb:dataSet ns:dataset-MAF_h94778 ;
1212
1212
  prop:Variant_Classification <code/variant_classification/Nonsense_Mutation> ;
1213
1213
  prop:Variant_Type <code/variant_type/SNP> ;
1214
1214
  prop:dbSNP_Val_Status <code/dbsnp_val_status/> ;
@@ -8,9 +8,9 @@ SELECT DISTINCT ?gene WHERE {
8
8
 
9
9
  ?patient_obs a qb:Observation;
10
10
  ?barcode_measure ?barcode;
11
- <http://onto.strinz.me/properties/patient_id> "%{patient}";
12
- <http://onto.strinz.me/properties/Hugo_Symbol> ?gene.
11
+ <http://example.org/properties/patient_id> "%{patient}";
12
+ <http://example.org/properties/Hugo_Symbol> ?gene.
13
13
 
14
14
 
15
15
  # ?node <http://semanticscience.org/resource/SIO_000300> ?gene ;
16
- }
16
+ }
@@ -69,4 +69,4 @@ describe PubliSci::Prov::Model do
69
69
  PubliSci::Prov::Model::Entity.first.has_data?.should == true
70
70
  end
71
71
  end
72
- end
72
+ end
@@ -36,7 +36,7 @@ describe PubliSci::DSL do
36
36
  qry = <<-EOF
37
37
  SELECT ?observation where {
38
38
  ?observation a <http://purl.org/linked-data/cube#Observation>;
39
- <http://onto.strinz.me/properties/Hugo_Symbol> ?node.
39
+ <http://example.org/properties/Hugo_Symbol> ?node.
40
40
 
41
41
  }
42
42
 
@@ -141,4 +141,4 @@ describe PubliSci::DSL do
141
141
  repo.is_a?(RDF::FourStore::Repository).should be true
142
142
  repo.size.should > old_size
143
143
  end
144
- end
144
+ end
@@ -35,10 +35,10 @@ describe PubliSci::Readers::CSV do
35
35
 
36
36
  dims = RDF::Query.execute(graph){ pattern [:dataset, qb.dimension, :dimension] }
37
37
  dims.size.should == 1
38
- dims.first[:dimension].to_s.should == "http://onto.strinz.me/properties/producer"
38
+ dims.first[:dimension].to_s.should == "http://example.org/properties/producer"
39
39
 
40
40
  measures = RDF::Query.execute(graph){ pattern [:dataset, qb.measure, :measure] }
41
41
  measures.map{|s| s[:measure].to_s.split('/').last}.should == ["pricerange", "chunkiness", "deliciousness"]
42
42
  end
43
43
 
44
- end
44
+ end
@@ -4,9 +4,9 @@ require_relative '../lib/publisci.rb'
4
4
 
5
5
  class MafQuery
6
6
  RESTRICTIONS = {
7
- patient: '<http://onto.strinz.me/properties/patient_id>',
8
- sample: '<http://onto.strinz.me/properties/sample_id>',
9
- gene: '<http://onto.strinz.me/properties/Hugo_Symbol>',
7
+ patient: '<http://example.org/properties/patient_id>',
8
+ sample: '<http://example.org/properties/sample_id>',
9
+ gene: '<http://example.org/properties/Hugo_Symbol>',
10
10
  }
11
11
 
12
12
  def to_por(solution)
@@ -78,7 +78,7 @@ class MafQuery
78
78
  property = Array(property)
79
79
  selects = property
80
80
  property = property.map{|prop|
81
- RESTRICTIONS[prop.to_sym] || "<http://onto.strinz.me/properties/#{prop}>"
81
+ RESTRICTIONS[prop.to_sym] || "<http://example.org/properties/#{prop}>"
82
82
  }
83
83
 
84
84
  targets = ""
@@ -88,7 +88,7 @@ class MafQuery
88
88
 
89
89
  str = ""
90
90
  restrictions.each{|restrict,value|
91
- prop = RESTRICTIONS[restrict.to_sym] || "<http://onto.strinz.me/properties/#{restrict}>"
91
+ prop = RESTRICTIONS[restrict.to_sym] || "<http://example.org/properties/#{restrict}>"
92
92
  if value.is_a? String
93
93
  if RDF::Resource(value).valid?
94
94
  if(value[/http:\/\//])
@@ -191,10 +191,6 @@ class MafQuery
191
191
  end
192
192
  end
193
193
 
194
- def derive_gene_lengths
195
-
196
- end
197
-
198
194
  def patient_info(id,repo)
199
195
  symbols = Array(to_por(select_property(repo,"Hugo_Symbol",patient: id)))
200
196
  # patient_id = select_property(repo,"patient_id",patient: id).to_s
@@ -337,7 +333,10 @@ describe QueryScript do
337
333
  it { @ev.instance_eval("select 'patient_count', patient: 'BH-A0HP'").should > 0 }
338
334
  it { @ev.instance_eval("select 'Hugo_Symbol', patient: 'BH-A0HP'").should == 'http://identifiers.org/hgnc.symbol/A1CF' }
339
335
  it { @ev.instance_eval("select 'Chromosome', patient: 'BH-A0HP'").is_a?(Fixnum).should be true }
340
- it { @ev.instance_eval("report_for 'patient', 'BH-A0HP'").is_a?(Hash).should be true }
336
+ it {
337
+ pending("bio2rdf vocabulary changed")
338
+ #@ev.instance_eval("report_for 'patient', 'BH-A0HP'").is_a?(Hash).should be true
339
+ }
341
340
  end
342
341
  end
343
- end
342
+ end
@@ -1,13 +1,13 @@
1
- @base <http://onto.strinz.me/dc/dataset/bacon/> .
2
- @prefix ns: <http://onto.strinz.me/dc/dataset/bacon/> .
1
+ @base <http://example.org/dc/dataset/bacon/> .
2
+ @prefix ns: <http://example.org/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://onto.strinz.me/properties/> .
6
+ @prefix prop: <http://example.org/properties/> .
7
7
  @prefix dct: <http://purl.org/dc/terms/> .
8
8
  @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
9
- @prefix cs: <http://onto.strinz.me/dc/dataset/bacon/cs/> .
10
- @prefix code: <http://onto.strinz.me/dc/dataset/bacon/code/> .
9
+ @prefix cs: <http://example.org/dc/dataset/bacon/cs/> .
10
+ @prefix code: <http://example.org/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/> .
@@ -1,13 +1,13 @@
1
- @base <http://onto.strinz.me/dc/dataset/mr/> .
2
- @prefix ns: <http://onto.strinz.me/dc/dataset/mr/> .
1
+ @base <http://example.org/dc/dataset/mr/> .
2
+ @prefix ns: <http://example.org/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://onto.strinz.me/properties/> .
6
+ @prefix prop: <http://example.org/properties/> .
7
7
  @prefix dct: <http://purl.org/dc/terms/> .
8
8
  @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
9
- @prefix cs: <http://onto.strinz.me/dc/dataset/mr/cs/> .
10
- @prefix code: <http://onto.strinz.me/dc/dataset/mr/code/> .
9
+ @prefix cs: <http://example.org/dc/dataset/mr/cs/> .
10
+ @prefix code: <http://example.org/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/> .
@@ -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.07012015768922852 ;
901
+ prop:lod 0.07012015768917834 ;
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.072608394873848 ;
946
+ prop:lod 2.0726083948737966 ;
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.077029280756939 ;
973
+ prop:lod 1.0770292807569852 ;
974
974
  .
975
975
 
976
976
  ns:obsD1M155 a qb:Observation ;
@@ -979,7 +979,7 @@ ns:obsD1M155 a qb:Observation ;
979
979
  prop:refRow <code/refrow/D1M155> ;
980
980
  prop:chr 1 ;
981
981
  prop:pos 93.64343584009433 ;
982
- prop:lod 1.1873613330194863 ;
982
+ prop:lod 1.187361333019437 ;
983
983
  .
984
984
 
985
985
  ns:obsD2M365 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.4537402388347749 ;
1063
+ prop:lod 0.45374023883481307 ;
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.5681404735364763 ;
1090
+ prop:lod 0.5681404735365145 ;
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.24331723281211204 ;
1099
+ prop:lod 0.24331723281215023 ;
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.08949770136006929 ;
1117
+ prop:lod 0.08949770136010748 ;
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.1744313367512866 ;
1126
+ prop:lod 1.1744313367512351 ;
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.72843784026734 ;
1189
+ prop:lod 5.72843784026729 ;
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.1808212906241233 ;
1198
+ prop:lod 3.180821290624097 ;
1199
1199
  .
1200
1200
 
1201
1201
  ns:obsD5M91 a qb:Observation ;
@@ -1222,7 +1222,7 @@ ns:obsD5M188 a qb:Observation ;
1222
1222
  prop:refRow <code/refrow/D5M188> ;
1223
1223
  prop:chr 5 ;
1224
1224
  prop:pos 44.02376273652883 ;
1225
- prop:lod 3.249708646147218 ;
1225
+ prop:lod 3.249708646147167 ;
1226
1226
  .
1227
1227
 
1228
1228
  ns:obsD5M29 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.296092065769738 ;
1261
+ prop:lod 1.296092065769776 ;
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.4515021912782906 ;
1297
+ prop:lod 1.4515021912783288 ;
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.9298420181331215 ;
1333
+ prop:lod 2.9298420181331597 ;
1334
1334
  .
1335
1335
 
1336
1336
  ns:obsD6M201 a qb:Observation ;
@@ -1411,7 +1411,7 @@ ns:obsD7M259 a qb:Observation ;
1411
1411
  prop:refRow <code/refrow/D7M259> ;
1412
1412
  prop:chr 7 ;
1413
1413
  prop:pos 72.084242243197 ;
1414
- prop:lod 0.10483451594920368 ;
1414
+ prop:lod 0.10483451594923476 ;
1415
1415
  .
1416
1416
 
1417
1417
  ns:obsD8M94 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.5508803120345833 ;
1432
+ prop:lod 0.5508803120345327 ;
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.018444232219031242 ;
1450
+ prop:lod 0.018444232219069434 ;
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.028466493643733326 ;
1468
+ prop:lod 0.02846649364377729 ;
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.6881242583427478 ;
1504
+ prop:lod 0.6881242583427829 ;
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.372234007257759 ;
1513
+ prop:lod 0.3722340072577168 ;
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.48324303581159445 ;
1522
+ prop:lod 0.48324303581163264 ;
1523
1523
  .
1524
1524
 
1525
1525
  ns:obsD9M18 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.7596876212377595 ;
1549
+ prop:lod 0.7596876212377977 ;
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.18398849359834646 ;
1585
+ prop:lod 0.18398849359838465 ;
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.6422735562057706 ;
1639
+ prop:lod 0.6422735562058088 ;
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.1794642920048046 ;
1675
+ prop:lod 1.1794642920048428 ;
1676
1676
  .
1677
1677
 
1678
1678
  ns:obsD12M150 a qb:Observation ;
@@ -1708,7 +1708,7 @@ ns:obsD13M21 a qb:Observation ;
1708
1708
  prop:refRow <code/refrow/D13M21> ;
1709
1709
  prop:chr 13 ;
1710
1710
  prop:pos 10.365882919967524 ;
1711
- prop:lod 2.8121111806924652 ;
1711
+ prop:lod 2.812111180692509 ;
1712
1712
  .
1713
1713
 
1714
1714
  ns:obsD13M39 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.0725330541792637 ;
1828
+ prop:lod 0.07253305417930189 ;
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.5400677999540768 ;
1909
+ prop:lod 0.540067799954115 ;
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.7981309541993609 ;
1936
+ prop:lod 0.7981309541993991 ;
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.18188727999483412 ;
1945
+ prop:lod 0.1818872799948723 ;
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.41891147924969907 ;
1954
+ prop:lod 0.41891147924973726 ;
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.230336527961505 ;
1981
+ prop:lod 1.2303365279615814 ;
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.37693262717035303 ;
2017
+ prop:lod 0.3769326271704294 ;
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.007363598013061079 ;
2035
+ prop:lod 0.0073635980130237755 ;
2036
2036
  .
2037
2037
 
2038
2038
  ns:obsD19M10 a qb:Observation ;
@@ -1,13 +1,13 @@
1
- @base <http://onto.strinz.me/dc/dataset/weather/> .
2
- @prefix ns: <http://onto.strinz.me/dc/dataset/weather/> .
1
+ @base <http://example.org/dc/dataset/weather/> .
2
+ @prefix ns: <http://example.org/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://onto.strinz.me/properties/> .
6
+ @prefix prop: <http://example.org/properties/> .
7
7
  @prefix dct: <http://purl.org/dc/terms/> .
8
8
  @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
9
- @prefix cs: <http://onto.strinz.me/dc/dataset/weather/cs/> .
10
- @prefix code: <http://onto.strinz.me/dc/dataset/weather/code/> .
9
+ @prefix cs: <http://example.org/dc/dataset/weather/cs/> .
10
+ @prefix code: <http://example.org/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/> .
@@ -58,7 +58,7 @@ describe PubliSci::Writers do
58
58
  writer = PubliSci::Writers::ARFF.new
59
59
  repo = RDF::Repository.load('spec/turtle/weather')
60
60
  repo.load('spec/turtle/bacon')
61
- out = writer.from_store(repo, 'http://onto.strinz.me/dc/dataset/weather/dataset-weather','weather')
61
+ out = writer.from_store(repo, 'http://example.org/dc/dataset/weather/dataset-weather','weather')
62
62
 
63
63
  out = out.gsub(/%.*\n/,'')
64
64
 
@@ -69,9 +69,9 @@ describe PubliSci::Writers do
69
69
  writer = PubliSci::Writers::CSV.new
70
70
  repo = RDF::Repository.load('spec/turtle/reference')
71
71
  repo.load('spec/turtle/bacon')
72
- out = writer.from_store(repo,'http://onto.strinz.me/dc/dataset/bacon/dataset-bacon')
72
+ out = writer.from_store(repo,'http://example.org/dc/dataset/bacon/dataset-bacon')
73
73
 
74
74
  out.should == IO.read('spec/csv/bacon.csv')
75
75
  end
76
76
  end
77
- end
77
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: publisci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Strinz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-09 00:00:00.000000000 Z
11
+ date: 2014-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -168,16 +168,16 @@ dependencies:
168
168
  name: jeweler
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ~>
171
+ - - '>='
172
172
  - !ruby/object:Gem::Version
173
- version: 1.8.4
173
+ version: '0'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ~>
178
+ - - '>='
179
179
  - !ruby/object:Gem::Version
180
- version: 1.8.4
180
+ version: '0'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: bundler
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -269,6 +269,7 @@ files:
269
269
  - Rakefile
270
270
  - bin/publisci
271
271
  - examples/bio-band_integration.rb
272
+ - examples/dsl.rb
272
273
  - examples/no_magic.prov
273
274
  - examples/no_magic.rb
274
275
  - examples/orm.prov
@@ -458,7 +459,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
458
459
  version: '0'
459
460
  requirements: []
460
461
  rubyforge_project:
461
- rubygems_version: 2.0.3
462
+ rubygems_version: 2.2.2
462
463
  signing_key:
463
464
  specification_version: 4
464
465
  summary: Publish scientific results to the semantic web