RDF::VCF
This is an RDF.rb reader plugin for Variant Call Format (VCF) files, widely used in bioinformatics.
This project grew out of BioHackathon 2014 work by Raoul J.P. Bonnal and Francesco Strozzi, and was further developed during BioHackathon 2015.
Note: at present, the project requires JRuby 9.0 (or newer) due to the Java-based VCF parser. We hope to eventually substitute the pure-Ruby Bio-vcf instead.
Features
- Implements an RDF.rb reader for VCF and BCF files, supporting also bgzipped files.
- Includes a CLI tool called
vcf2rdf
to transform VCF files into RDF.
Examples
Reading VCF Files
The gem can be used like any other RDF.rb reader plugin:
require 'rdf/vcf'
RDF::VCF::Reader.open('Homo_sapiens.vcf.gz') do |reader|
reader.each_statement do |statement|
p statement
end
end
Command-Line Interface (CLI)
The gem includes a CLI tool called vcf2rdf
which transforms VCF files into
RDF (currently, N-Triples):
vcf2rdf your_vcf_file.vcf.gz
Input files can be either plain text VCF or else compressed by bgzip
, as
above.
Notes
Please create the tabix
index by
youself. In the future, this gem will create the index automatically.
Dependencies
Mailing List
Authors
License
This is free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying {file:UNLICENSE} file.