Skip to content

Latest commit

 

History

History
83 lines (53 loc) · 2.19 KB

README.rdoc

File metadata and controls

83 lines (53 loc) · 2.19 KB

publisci

<img src=“https://secure.travis-ci.org/wstrinz/publisci.png” />

Note: this software is under active development!

Installation

gem install publisci

Usage

Most of the gem’s functions can be accessed through its DSL

require 'publisci'
include PubliSci::DSL

# Specify input data
data do
  # use local or remote paths
  source 'https://github.com/wstrinz/publisci/raw/master/spec/csv/bacon.csv'

  # specify datacube properties
  dimension 'producer', 'pricerange'
  measure 'chunkiness'

  # set parser specific options
  option 'label_column', 'producer'
end

# Describe dataset
metadata do
  dataset 'bacon'
  title 'Bacon dataset'
  creator 'Will Strinz'
  description 'some data about bacon'
  date '1-10-2010'
end

# Send output to an RDF::Repository
#  can also use 'generate_n3' to output a turtle string
repo = to_repository

# run SPARQL queries on the dataset
PubliSci::QueryHelper.execute('select * where {?s ?p ?o} limit 5', repo)

# export in other formats
PubliSci::Writers::ARFF.new.from_store(repo)

Developers

To use the library

require 'publisci'

The API doc is online. For more code examples see also the test files in the source tree.

Project home page

Information on the source tree, documentation, issues and how to contribute, see

http://github.com/wstrinz/publisci

The BioRuby community is on IRC server: irc.freenode.org, channel: #bioruby.

Cite

If you use this software, please cite one of

Biogems.info

This Biogem is published at biogems.info/index.html#publisci

Copyright © 2013 wstrinz. See LICENSE.txt for further details.