lib/bio-publisci/writers/dataframe.rb in bio-publisci-0.0.6 vs lib/bio-publisci/writers/dataframe.rb in bio-publisci-0.0.7

- old
+ new

@@ -1,6 +1,6 @@ -module R2RDF +module PubliSci module Writer module Dataframe def framestring(name,vectors) framestr = "#{name} = data.frame(" @@ -37,11 +37,11 @@ end end class Builder - include R2RDF::Writer::Dataframe + include PubliSci::Writer::Dataframe def from_turtle(turtle_file, connection, variable_in=nil, variable_out=nil, verbose=true, save=true) unless variable_in && variable_out puts "no variable specified. Simple inference coming soon" if verbose @@ -49,11 +49,11 @@ end puts "loading #{turtle_file}" if verbose repo = RDF::Repository.load(turtle_file) puts "loaded #{repo.size} statements into temporary repo" if verbose # connection = Rserve::Connection.new - query = R2RDF::QueryHelper.new + query = PubliSci::QueryHelper.new rows = get_rownames(variable_in, query, repo) puts "frame has #{rows.size} rows" if verbose vectors = get_vectors(variable_in, query, repo) puts "got vectors of size #{vectors.first.last.size}" if verbose && vectors.first @@ -67,11 +67,11 @@ puts "no variable specified. Simple inference coming soon" if verbose return end puts "connecting to endpoint at #{endpoint_url}" if verbose sparql = SPARQL::Client.new(endpoint_url) - # client = R2RDF::Client.new - query = R2RDF::QueryHelper.new + # client = PubliSci::Client.new + query = PubliSci::QueryHelper.new rows = query.get_ary(sparql.query(query.row_names(variable_in))).flatten end \ No newline at end of file