/SwissParser

Ruby DSL to build parsers for typical bioinformatics flat-file "database".

Primary LanguageRubyGNU General Public License v3.0GPL-3.0

SwissParser

by Paradigmatic
http://github.com/paradigmatic/SwissParser

DESCRIPTION:

Simple DSL to define parser for flat files formats common in biofinformatics, such as Swissprot, Uniprot, KEGG, TREMBL, etc.

SwissParser API was changed in its version 1.0.0 to simplify parser definition. The code was tested on entire Uniprot and KEGG releases and functional testing guarantees that existing features will not break after an update.

Compatibility with 0.x versions

The 1.x versions represent an API change which is not backward compatible. However, the rules definitions and helper need small changes. A wiki page will soon give instructions for updating your parsers.

FEATURES:

  • Defines parsers with a clear and compact declarative syntax.

  • The whole parsing workflow is configurable.

  • Able to parse remote files accessible from a web or an FTP server.

  • Users can create new parsers by extending existing parsers.

  • Parser rules have access to user defined helper methods.

USAGE:

See:

REQUIREMENTS:

SwissParser uses only pure standard ruby.

Thanks to rvm it was successfuly tested with versions:

* ruby-1.8.7-p302
* ruby-1.9.2-p136
* jruby-1.5.2

No other gems are required to use it. However, if you want to participate in SwissParser developpement, you will need the gem bones, rspec and cucumber.

INSTALL:

Then you can simply install SwissParser with:

gem install swissparser

and start parsers definitions by requiring it:

require 'swissparser'

Alternatively, you can download the whole source tree or just the swissparser.rb file using the github site:

github.com/paradigmatic/SwissParser

Finally, if you want to participate in the development or use the edge version you can clone the project with git:

$ git clone git://github.com/paradigmatic/SwissParser

LICENSE:

Free and open software distributed under GPLv3.

See the included LICENSE file for details.